diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2020-05-28 02:19:04 +0300 |
---|---|---|
committer | Muhammet Kara <muhammet.kara@collabora.com> | 2020-05-28 13:05:30 +0300 |
commit | f750288bc65e5b09d0a402bc4955d8926765fdc7 (patch) | |
tree | 01d8abe19048fbb4141630b5682f670f41f538c1 /src | |
parent | 32bd3b9dd6ec62f4aada242d6c807c803b5a46f9 (diff) |
Platform and OS checks for the built-in server option
Signed-off-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/components/AdminSettings.vue | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/components/AdminSettings.vue b/src/components/AdminSettings.vue index 1d23ae1b..a20cf6e1 100644 --- a/src/components/AdminSettings.vue +++ b/src/components/AdminSettings.vue @@ -71,7 +71,7 @@ </form> </div> </div> - <div> + <div v-if="CODECompatible"> <input id="builtinserver" v-model="serverMode" type="radio" name="serverMode" value="builtin" class="radio" :disabled="updating || !CODEInstalled" @click="setBuiltinServer"> @@ -80,7 +80,8 @@ <em>{{ t('richdocuments', 'easy, just a bit slower than a normal server, and of course not with the usual excellent scalability, but fine for testing or personal use or small teams.') }}</em> </p> <p v-else class="option-inline"> - <em>{{ t('richdocuments', 'This installation does not have a built in server') }}</em> + <em>{{ t('richdocuments', 'This installation does not have ') }}<a title="Built-in CODE Server App" :href="appUrl" target="_blank" + rel="noopener" class="external">{{ t('richdocuments', 'a built in server') }}</a></em> </p> </div> <div> @@ -268,7 +269,9 @@ export default { hostErrors: [window.location.host === 'localhost' || window.location.host === '127.0.0.1', window.location.protocol !== 'https:', false], demoServers: null, CODEInstalled: 'richdocumentscode' in OC.appswebroots, + CODECompatible: true, isNginx: false, + appUrl: OC.generateUrl('/settings/apps/app-bundles/richdocumentscode'), approvedDemoModal: false, updating: false, groups: [], @@ -341,6 +344,12 @@ export default { if (this.initial.web_server && this.initial.web_server.length > 0) { this.isNginx = this.initial.web_server.indexOf('nginx') !== -1 } + if (this.initial.os_family && this.initial.os_family.length > 0) { + this.CODECompatible = this.CODECompatible && this.initial.os_family === 'Linux' + } + if (this.initial.platform && this.initial.platform.length > 0) { + this.CODECompatible = this.CODECompatible && this.initial.platform === 'x86_64' + } this.checkIfDemoServerIsActive() }, methods: { |