From fa099a3efcab1306b789db13a9c0962fd3be2592 Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Mon, 27 Aug 2018 13:08:03 -0700 Subject: [PATCH 1/5] Update ui for azure ad endpoint issues rancher/rancher#15175 --- .../components/azuread-endpoints/template.hbs | 92 +++++++++---------- 1 file changed, 42 insertions(+), 50 deletions(-) diff --git a/lib/global-admin/addon/components/azuread-endpoints/template.hbs b/lib/global-admin/addon/components/azuread-endpoints/template.hbs index 0a6fcf198..5502e8532 100644 --- a/lib/global-admin/addon/components/azuread-endpoints/template.hbs +++ b/lib/global-admin/addon/components/azuread-endpoints/template.hbs @@ -1,59 +1,51 @@
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-{{!-- {{#if (eq region 'custom')}} --}} -
-
-
- - {{input id="endpoint" type="url" value=authConfig.endpoint classNames="form-control"}} +
+
+
-
-
-
- - {{input id="graph-endpoint" type="url" value=authConfig.graphEndpoint classNames="form-control"}} +
+ +
+
+
+{{#if (eq region 'custom')}} +
+
+
+ + {{input id="endpoint" type="url" value=authConfig.endpoint classNames="form-control"}} +
+
+
+
+ + {{input id="graph-endpoint" type="url" value=authConfig.graphEndpoint classNames="form-control"}} +
+
+
-
-
-
- - {{input id="token-endpoint" type="url" value=authConfig.tokenEndpoint classNames="form-control"}} +
+
+
+ + {{input id="token-endpoint" type="url" value=authConfig.tokenEndpoint classNames="form-control"}} +
+
+
+
+ + {{input id="auth-endpoint" type="url" value=authConfig.authEndpoint classNames="form-control"}} +
-
-
- - {{input id="auth-endpoint" type="url" value=authConfig.authEndpoint classNames="form-control"}} -
-
-
-{{!-- {{/if}} --}} \ No newline at end of file +{{/if}} \ No newline at end of file From cb1b2b2e7844a0e84c4c74346a220667295149cc Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Mon, 27 Aug 2018 16:43:28 -0700 Subject: [PATCH 2/5] Add new RKE Defaults Setting rancher/rancher#15111 --- app/components/modal-edit-setting/component.js | 9 +++++++-- app/components/modal-edit-setting/template.hbs | 2 ++ ember-cli-build.js | 1 + .../settings/danger-zone/component.js | 5 +++++ .../settings/danger-zone/template.hbs | 10 +++++++--- lib/shared/addon/helpers/from-json.js | 7 +++++++ lib/shared/addon/helpers/to-json.js | 2 +- lib/shared/addon/utils/constants.js | 6 ++++-- lib/shared/app/helpers/from-json.js | 1 + tests/integration/helpers/from-json-test.js | 17 +++++++++++++++++ translations/en-us.yaml | 1 + 11 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 lib/shared/addon/helpers/from-json.js create mode 100644 lib/shared/app/helpers/from-json.js create mode 100644 tests/integration/helpers/from-json-test.js diff --git a/app/components/modal-edit-setting/component.js b/app/components/modal-edit-setting/component.js index 6aaa47761..f3c830b8d 100644 --- a/app/components/modal-edit-setting/component.js +++ b/app/components/modal-edit-setting/component.js @@ -10,7 +10,7 @@ export default Component.extend(ModalBase, { settings: service(), growl: service(), layout, - classNames: ['span-8', 'offset-2'], + classNames: ['modal-edit-setting', 'span-8', 'offset-2'], value: null, removing: false, @@ -19,7 +19,12 @@ export default Component.extend(ModalBase, { init() { this._super(...arguments); - this.set('value', this.get('model.obj.value') || ''); + + if (this.get('model.kind') === 'json') { + this.set('value', JSON.stringify(JSON.parse(this.get('model.obj.value')), undefined, 2)); + } else { + this.set('value', this.get('model.obj.value') || ''); + } }, didInsertElement() { diff --git a/app/components/modal-edit-setting/template.hbs b/app/components/modal-edit-setting/template.hbs index 0c84c0b55..8286b2ec7 100644 --- a/app/components/modal-edit-setting/template.hbs +++ b/app/components/modal-edit-setting/template.hbs @@ -15,6 +15,8 @@ {{textarea class="form-control" value=value rows=10}} {{else if (eq model.kind 'int')}} {{input-integer value=value class="form-control"}} + {{else if (eq model.kind 'json')}} + {{ivy-codemirror value=value}} {{else if (eq model.kind 'boolean')}}
diff --git a/ember-cli-build.js b/ember-cli-build.js index f38aba34c..da1fa35cd 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -83,6 +83,7 @@ module.exports = function(defaults) { app.import('node_modules/prismjs/prism.js'); app.import('node_modules/prismjs/components/prism-bash.js'); app.import('node_modules/prismjs/components/prism-yaml.js'); + app.import('node_modules/prismjs/components/prism-json.js'); app.import('node_modules/ember-source/dist/ember-template-compiler.js') // app.import('vendor/aws-sdk-ec2.js'); diff --git a/lib/shared/addon/components/settings/danger-zone/component.js b/lib/shared/addon/components/settings/danger-zone/component.js index 8b03b74d2..8f2ecdd82 100644 --- a/lib/shared/addon/components/settings/danger-zone/component.js +++ b/lib/shared/addon/components/settings/danger-zone/component.js @@ -65,6 +65,11 @@ export default Component.extend({ out.set('hide', true); } + if (get(details, 'kind') === 'json') { + out.set('hide', true); + out.set('parsedJSON', JSON.stringify(JSON.parse(out.get('obj.value')), undefined, 2)) + } + (Object.keys(details) || []).forEach((key2) => { out.set(key2, details[key2]); }); diff --git a/lib/shared/addon/components/settings/danger-zone/template.hbs b/lib/shared/addon/components/settings/danger-zone/template.hbs index 471a172e4..0429f00fa 100644 --- a/lib/shared/addon/components/settings/danger-zone/template.hbs +++ b/lib/shared/addon/components/settings/danger-zone/template.hbs @@ -26,15 +26,19 @@
{{else}}
-
+              {{#if (eq row.kind "json" )}}
+                {{code-block code=row.parsedJSON language="json"}}
+              {{else}}
+                
                 {{~#if row.obj.value~}}
                   {{~row.obj.value~}}
                 {{~else~}}
                   <none>
                 {{~/if~}}
-              
+
+ {{/if}}
- {{#if (eq row.kind 'multiline')}} + {{#if (or (eq row.kind 'multiline') (eq row.kind 'json'))}}
Hide {{row.key}}
{{/if}}
diff --git a/lib/shared/addon/helpers/from-json.js b/lib/shared/addon/helpers/from-json.js new file mode 100644 index 000000000..3644711a4 --- /dev/null +++ b/lib/shared/addon/helpers/from-json.js @@ -0,0 +1,7 @@ +import Helper from '@ember/component/helper'; + +export default Helper.extend({ + compute(params/* , options*/) { + return JSON.parse(params[0]); + }, +}); diff --git a/lib/shared/addon/helpers/to-json.js b/lib/shared/addon/helpers/to-json.js index e46e0eb80..833516a58 100644 --- a/lib/shared/addon/helpers/to-json.js +++ b/lib/shared/addon/helpers/to-json.js @@ -2,6 +2,6 @@ import Helper from '@ember/component/helper'; export default Helper.extend({ compute(params/* , options*/) { - return JSON.stringify(params[0]); + return JSON.stringify(params[0], undefined, 2); }, }); diff --git a/lib/shared/addon/utils/constants.js b/lib/shared/addon/utils/constants.js index f2ef0857e..81f095072 100644 --- a/lib/shared/addon/utils/constants.js +++ b/lib/shared/addon/utils/constants.js @@ -479,6 +479,7 @@ var C = { API_HOST: 'api-host', CA_CERTS: 'cacerts', + CLUSTER_DEFAULTS: 'cluster-defaults', ENGINE_URL: 'engine-install-url', ENGINE_ISO_URL: 'engine-iso-url', FIRST_LOGIN: 'first-login', @@ -512,6 +513,7 @@ var C = { C.SETTING.ALLOWED = { [C.SETTING.CA_CERTS]: { kind: 'multiline' }, + [C.SETTING.CLUSTER_DEFAULTS]: { kind: 'json' }, [C.SETTING.ENGINE_URL]: {}, [C.SETTING.ENGINE_ISO_URL]: {}, [C.SETTING.PL]: {}, @@ -519,8 +521,8 @@ C.SETTING.ALLOWED = { [C.SETTING.SERVER_URL]: {}, 'system-default-registry': {}, [C.SETTING.TELEMETRY]: { - kind: 'enum', - options: ['prompt', 'in', 'out'] + kind: 'enum', + options: ['prompt', 'in', 'out'] }, 'ui-index': {}, }; diff --git a/lib/shared/app/helpers/from-json.js b/lib/shared/app/helpers/from-json.js new file mode 100644 index 000000000..b78f76954 --- /dev/null +++ b/lib/shared/app/helpers/from-json.js @@ -0,0 +1 @@ +export { default, fromJson } from 'shared/helpers/from-json'; diff --git a/tests/integration/helpers/from-json-test.js b/tests/integration/helpers/from-json-test.js new file mode 100644 index 000000000..0e8eb72f2 --- /dev/null +++ b/tests/integration/helpers/from-json-test.js @@ -0,0 +1,17 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render } from '@ember/test-helpers'; +import hbs from 'htmlbars-inline-precompile'; + +module('Integration | Helper | from-json', function(hooks) { + setupRenderingTest(hooks); + + // Replace this with your real tests. + test('it renders', async function(assert) { + this.set('inputValue', '1234'); + + await render(hbs`{{from-json inputValue}}`); + + assert.equal(this.element.textContent.trim(), '1234'); + }); +}); diff --git a/translations/en-us.yaml b/translations/en-us.yaml index 71847c03e..de80bae43 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -2896,6 +2896,7 @@ dangerZone: showLabel: I understand that I can break things by changing advanced settings. description: 'cacerts': "CA Certificates needed to verify the server's certificate" + 'cluster-defaults': 'Override RKE Defaults when creating new clusters.' 'engine-install-url': 'Default Docker engine installation URL (for most node drivers)' 'engine-iso-url': 'Default OS installation URL (for vSphere driver)' 'engine-newest-version': 'The newest supported version of Docker at the time of this release. A Docker version that does not satisfy supported docker range but is newer than this will be marked as untested' From 1c8d5d7b254776a993d0905522caade2c5edab99 Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Tue, 28 Aug 2018 14:17:40 -0700 Subject: [PATCH 3/5] Add code mirror and code blocks for edit default rke settings rancher/rancher#15111 --- .../modal-edit-setting/component.js | 35 +++++++++++++++---- .../modal-edit-setting/template.hbs | 6 +++- app/styles/components/_modals.scss | 8 +++++ app/styles/pages/_settings.scss | 8 ++++- .../settings/danger-zone/component.js | 4 +-- .../settings/danger-zone/template.hbs | 8 ++++- lib/shared/addon/settings/service.js | 4 +-- 7 files changed, 59 insertions(+), 14 deletions(-) diff --git a/app/components/modal-edit-setting/component.js b/app/components/modal-edit-setting/component.js index f3c830b8d..ebd8f4393 100644 --- a/app/components/modal-edit-setting/component.js +++ b/app/components/modal-edit-setting/component.js @@ -6,22 +6,38 @@ import { normalizeName } from 'shared/settings/service'; import ModalBase from 'shared/mixins/modal-base'; import layout from './template'; +const cmOpts = { + autofocus: true, + gutters: ['CodeMirror-lint-markers'], + lineNumbers: true, + lineWrapping: true, + lint: true, + mode: { + name: 'javascript', + json: true, + }, + theme: 'monokai', + viewportMargin: Infinity, +}; + export default Component.extend(ModalBase, { - settings: service(), - growl: service(), + settings: service(), + growl: service(), layout, - classNames: ['modal-edit-setting', 'span-8', 'offset-2'], + classNames: ['modal-edit-setting', 'span-8', 'offset-2'], - value: null, - removing: false, + codeMirrorOptions: cmOpts, + value: null, + formattedValue: null, + removing: false, - model: alias('modalService.modalOpts'), + model: alias('modalService.modalOpts'), init() { this._super(...arguments); if (this.get('model.kind') === 'json') { - this.set('value', JSON.stringify(JSON.parse(this.get('model.obj.value')), undefined, 2)); + this.set('formattedValue', JSON.stringify(JSON.parse(this.get('model.obj.value')), undefined, 2)); } else { this.set('value', this.get('model.obj.value') || ''); } @@ -54,6 +70,11 @@ export default Component.extend(ModalBase, { done() { this.send('cancel'); + window.location.href = window.location.href; + }, + + updateJson(json) { + this.set('value', json); } }, }); diff --git a/app/components/modal-edit-setting/template.hbs b/app/components/modal-edit-setting/template.hbs index 8286b2ec7..1660e2359 100644 --- a/app/components/modal-edit-setting/template.hbs +++ b/app/components/modal-edit-setting/template.hbs @@ -16,7 +16,11 @@ {{else if (eq model.kind 'int')}} {{input-integer value=value class="form-control"}} {{else if (eq model.kind 'json')}} - {{ivy-codemirror value=value}} + {{ivy-codemirror + value=formattedValue + valueUpdated=(action 'updateJson') + options=codeMirrorOptions + }} {{else if (eq model.kind 'boolean')}}
diff --git a/app/styles/components/_modals.scss b/app/styles/components/_modals.scss index da9a5c9c6..da8ebf893 100644 --- a/app/styles/components/_modals.scss +++ b/app/styles/components/_modals.scss @@ -56,6 +56,13 @@ $modal-overlay : rgba($light-grey, 0.75) !default; padding: 20px; margin-bottom: 20px; + &.modal-edit-setting { + .container-setting { + max-height: 70vh !important; + overflow-y: scroll; + } + } + &.large-modal { &.modal-container { width: calc(100% - 40px); @@ -120,4 +127,5 @@ $modal-overlay : rgba($light-grey, 0.75) !default; .modal-yaml { max-width: calc(100vw - 40px); } + } diff --git a/app/styles/pages/_settings.scss b/app/styles/pages/_settings.scss index 2c901c4a2..183c09d0c 100644 --- a/app/styles/pages/_settings.scss +++ b/app/styles/pages/_settings.scss @@ -32,7 +32,7 @@ &.gitlab { background-image: url('images/providers/gitlab.svg'); } - + &.github-for-pipeline { background-image: url('images/providers/github-for-pipeline.svg'); } @@ -95,3 +95,9 @@ } } } + +.container-json-setting { + max-height: 50vh; + overflow-y: scroll; + margin-bottom: 15px; +} diff --git a/lib/shared/addon/components/settings/danger-zone/component.js b/lib/shared/addon/components/settings/danger-zone/component.js index 8f2ecdd82..d2c73f8f0 100644 --- a/lib/shared/addon/components/settings/danger-zone/component.js +++ b/lib/shared/addon/components/settings/danger-zone/component.js @@ -30,7 +30,7 @@ export default Component.extend({ }, }, - allowed: computed(() => { + allowed: computed('settings.all.@each.{name,customized}', () => { let out = {}; Object.keys(C.SETTING.ALLOWED).forEach((key) => { @@ -43,7 +43,7 @@ export default Component.extend({ return out; }), - current: computed('settings.all.@each.{name,source}', function() { + current: computed('allowed.@each.{name,customized}', function() { let all = get(this, 'settings.asMap'); let allowed = get(this, 'allowed'); let isLocalDev = window.location.host === 'localhost:8000'; diff --git a/lib/shared/addon/components/settings/danger-zone/template.hbs b/lib/shared/addon/components/settings/danger-zone/template.hbs index 0429f00fa..1fff644df 100644 --- a/lib/shared/addon/components/settings/danger-zone/template.hbs +++ b/lib/shared/addon/components/settings/danger-zone/template.hbs @@ -27,7 +27,13 @@ {{else}}
{{#if (eq row.kind "json" )}} - {{code-block code=row.parsedJSON language="json"}} +
+ {{code-block + class="setting-json" + code=row.parsedJSON + language="json" + }} +
{{else}}
                 {{~#if row.obj.value~}}
diff --git a/lib/shared/addon/settings/service.js b/lib/shared/addon/settings/service.js
index 47da3750c..4e9a0179f 100644
--- a/lib/shared/addon/settings/service.js
+++ b/lib/shared/addon/settings/service.js
@@ -95,7 +95,7 @@ export default Service.extend(Evented, {
   },
 
   loadAll() {
-    return get(this, 'globalStore').find('setting');
+    return get(this, 'globalStore').findAll('setting');
   },
 
   load(names) {
@@ -137,7 +137,7 @@ export default Service.extend(Evented, {
     });
 
     return out;
-  }.property('all.@each.{name,value}'),
+  }.property('all.@each.{name,value,customized}'),
 
   uiVersion: function() {
     return `v${  get(this, 'app.version') }`;

From ef01a64c93dab1a9a73a1e2ea267c0a9698f7525 Mon Sep 17 00:00:00 2001
From: Westly Wright 
Date: Tue, 28 Aug 2018 14:24:09 -0700
Subject: [PATCH 4/5] removed unused component

---
 lib/shared/addon/helpers/from-json.js       |  7 -------
 lib/shared/app/helpers/from-json.js         |  1 -
 tests/integration/helpers/from-json-test.js | 17 -----------------
 3 files changed, 25 deletions(-)
 delete mode 100644 lib/shared/addon/helpers/from-json.js
 delete mode 100644 lib/shared/app/helpers/from-json.js
 delete mode 100644 tests/integration/helpers/from-json-test.js

diff --git a/lib/shared/addon/helpers/from-json.js b/lib/shared/addon/helpers/from-json.js
deleted file mode 100644
index 3644711a4..000000000
--- a/lib/shared/addon/helpers/from-json.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import Helper from '@ember/component/helper';
-
-export default Helper.extend({
-  compute(params/* , options*/) {
-    return JSON.parse(params[0]);
-  },
-});
diff --git a/lib/shared/app/helpers/from-json.js b/lib/shared/app/helpers/from-json.js
deleted file mode 100644
index b78f76954..000000000
--- a/lib/shared/app/helpers/from-json.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default, fromJson } from 'shared/helpers/from-json';
diff --git a/tests/integration/helpers/from-json-test.js b/tests/integration/helpers/from-json-test.js
deleted file mode 100644
index 0e8eb72f2..000000000
--- a/tests/integration/helpers/from-json-test.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import { module, test } from 'qunit';
-import { setupRenderingTest } from 'ember-qunit';
-import { render } from '@ember/test-helpers';
-import hbs from 'htmlbars-inline-precompile';
-
-module('Integration | Helper | from-json', function(hooks) {
-  setupRenderingTest(hooks);
-
-  // Replace this with your real tests.
-  test('it renders', async function(assert) {
-    this.set('inputValue', '1234');
-
-    await render(hbs`{{from-json inputValue}}`);
-
-    assert.equal(this.element.textContent.trim(), '1234');
-  });
-});

From fe9845d3579c150a71feecaf786d0e19db69bdd5 Mon Sep 17 00:00:00 2001
From: Westly Wright 
Date: Tue, 28 Aug 2018 14:30:25 -0700
Subject: [PATCH 5/5] fix property extensions

---
 lib/shared/addon/settings/service.js | 56 ++++++++++++++--------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/lib/shared/addon/settings/service.js b/lib/shared/addon/settings/service.js
index 4e9a0179f..10a581397 100644
--- a/lib/shared/addon/settings/service.js
+++ b/lib/shared/addon/settings/service.js
@@ -5,7 +5,7 @@ import Evented from '@ember/object/evented';
 import Service, { inject as service } from '@ember/service';
 import C from 'shared/utils/constants';
 import { minorVersion } from 'shared/utils/parse-version';
-import { get, set, computed } from '@ember/object';
+import { get, set, computed, observer } from '@ember/object';
 import { isEmpty } from '@ember/utils';
 
 export function normalizeName(str) {
@@ -84,11 +84,11 @@ export default Service.extend(Evented, {
     return value;
   },
 
-  promiseCountObserver: function() {
+  promiseCountObserver: observer('promiseCount', function() {
     if (get(this, 'promiseCount') <= 0) {
       this.trigger('settingsPromisesResolved');
     }
-  }.observes('promiseCount'),
+  }),
 
   findByName(name) {
     return get(this, 'asMap')[normalizeName(name)];
@@ -127,7 +127,15 @@ export default Service.extend(Evented, {
     return promise;
   },
 
-  asMap: function() {
+  cliVersion:           alias(`asMap.${ C.SETTING.VERSION_CLI }.value`),
+  dockerMachineVersion: alias(`asMap.${ C.SETTING.VERSION_MACHINE }.value`),
+  helmVersion:          alias(`asMap.${ C.SETTING.VERSION_HELM }.value`),
+  minDockerVersion:     alias(`asMap.${ C.SETTING.MIN_DOCKER }.value`),
+  rancherImage:         alias(`asMap.${ C.SETTING.IMAGE_RANCHER }.value`),
+  rancherVersion:       alias(`asMap.${ C.SETTING.VERSION_RANCHER }.value`),
+  serverUrl:            alias(`asMap.${ C.SETTING.SERVER_URL }.value`),
+
+  asMap: computed('all.@each.{name,value,customized}', function() {
     var out = {};
 
     (get(this, 'all') || []).forEach((setting) => {
@@ -137,15 +145,15 @@ export default Service.extend(Evented, {
     });
 
     return out;
-  }.property('all.@each.{name,value,customized}'),
+  }),
 
-  uiVersion: function() {
+  uiVersion: computed('app.version', function() {
     return `v${  get(this, 'app.version') }`;
-  }.property('app.version'),
+  }),
 
-  issueUrl: function() {
+  issueUrl: computed('app.currentRouteName', 'access.{provider,admin}', 'rancherVersion', 'uiVersion', function() {
     var str = '*Describe your issue here*\n\n\n---\n| Useful | Info |\n| :-- | :-- |\n' +
-      `|Versions|Rancher \`${ get(this, 'rancherVersion') || '-' }\` ` +
+        `|Versions|Rancher \`${ get(this, 'rancherVersion') || '-' }\` ` +
         `UI: \`${ get(this, 'uiVersion') || '--' }\` |\n`;
 
     if ( get(this, 'access.enabled') ) {
@@ -161,39 +169,31 @@ export default Service.extend(Evented, {
     var url = `${ C.EXT_REFERENCES.GITHUB  }/issues/new?body=${  encodeURIComponent(str) }`;
 
     return url;
-  }.property('app.currentRouteName', 'access.{provider,admin}', 'rancherVersion', 'uiVersion'),
+  }),
 
-  rancherImage:         alias(`asMap.${ C.SETTING.IMAGE_RANCHER }.value`),
-  rancherVersion:       alias(`asMap.${ C.SETTING.VERSION_RANCHER }.value`),
-  cliVersion:           alias(`asMap.${ C.SETTING.VERSION_CLI }.value`),
-  dockerMachineVersion: alias(`asMap.${ C.SETTING.VERSION_MACHINE }.value`),
-  helmVersion:          alias(`asMap.${ C.SETTING.VERSION_HELM }.value`),
-  serverUrl:            alias(`asMap.${ C.SETTING.SERVER_URL }.value`),
   serverUrlIsEmpty:     computed('serverUrl', function() {
     return isEmpty(get(this, 'serverUrl'));
   }),
 
-  isRancher: function() {
+  isRancher: computed(C.SETTING.PL, function() {
     const out = (get(this, C.SETTING.PL) || '').toUpperCase() === C.SETTING.PL_RANCHER_VALUE.toUpperCase();
 
     return out;
-  }.property(C.SETTING.PL),
+  }),
 
-  isEnterprise: function() {
+  isEnterprise: computed('rancherImage', function() {
     return get(this, 'rancherImage') === 'rancher/enterprise';
-  }.property('rancherImage'),
+  }),
 
-  appName: function() {
+  appName: computed('isRancher', C.SETTING.PL, function() {
     if ( get(this, 'isRancher') ) {
       return get(this, 'app.appName');
     }
 
     return get(this, C.SETTING.PL) || '';
-  }.property('isRancher', C.SETTING.PL),
+  }),
 
-  minDockerVersion: alias(`asMap.${ C.SETTING.MIN_DOCKER }.value`),
-
-  minorVersion: function() {
+  minorVersion: computed('rancherVersion', function() {
     let version = get(this, 'rancherVersion');
 
     if ( !version ) {
@@ -201,9 +201,9 @@ export default Service.extend(Evented, {
     }
 
     return minorVersion(version);
-  }.property('rancherVersion'),
+  }),
 
-  docsBase: function() {
+  docsBase: computed('intl.locale', 'minorVersion', function() {
     let full = get(this, 'rancherVersion');
     let version;
 
@@ -222,5 +222,5 @@ export default Service.extend(Evented, {
     }
 
     return `${ C.EXT_REFERENCES.DOCS }/${ version }/${ lang }`;
-  }.property('intl.locale', 'minorVersion')
+  })
 });