diff --git a/app/admin-tab/ha/controller.js b/app/admin-tab/ha/controller.js index 2793c713d..bdad8c54e 100644 --- a/app/admin-tab/ha/controller.js +++ b/app/admin-tab/ha/controller.js @@ -215,11 +215,11 @@ rancher/server:${version}`; hostRegistrationHelpText: Ember.computed('model.createScript.clusterSize', function() { const intl = this.get('intl'); - let out = intl.findTranslationByKey('haPage.haDisabled.haConfigScript.form.hostRegistrationHelpText.multiCluster'); + let out = intl.findTranslationByKey('haPage.haDisabled.haConfigScript.form.hostRegistration.helpText.multiCluster'); out = intl.formatHtmlMessage(out, {clusterSize: this.get('model.createScript.clusterSize')}); if (this.get('model.createScript.clusterSize') === 1) { - out = intl.findTranslationByKey('haPage.haDisabled.haConfigScript.form.hostRegistrationHelpText.singleCluster'); + out = intl.findTranslationByKey('haPage.haDisabled.haConfigScript.form.hostRegistration.helpText.singleCluster'); out = intl.formatHtmlMessage(out); } return out; diff --git a/app/admin-tab/ha/template.hbs b/app/admin-tab/ha/template.hbs index cc666d0e1..e63e5c22c 100644 --- a/app/admin-tab/ha/template.hbs +++ b/app/admin-tab/ha/template.hbs @@ -130,25 +130,25 @@
- +
diff --git a/app/admin-tab/settings/route.js b/app/admin-tab/settings/route.js index 3cf15d975..8574000c8 100644 --- a/app/admin-tab/settings/route.js +++ b/app/admin-tab/settings/route.js @@ -8,7 +8,6 @@ export default Ember.Route.extend({ return this.get('settings').load([ C.SETTING.API_HOST, C.SETTING.CATALOG_URL, - C.SETTING.VM_ENABLED, ]); }, @@ -19,7 +18,6 @@ export default Ember.Route.extend({ return Ember.Object.create({ host : settings.get(C.SETTING.API_HOST), catalog : settings.get(C.SETTING.CATALOG_URL), - vm : settings.get(C.SETTING.VM_ENABLED) || false, machineDrivers : drivers, }); }); diff --git a/app/admin-tab/settings/template.hbs b/app/admin-tab/settings/template.hbs index b724b09c1..84e474f0d 100644 --- a/app/admin-tab/settings/template.hbs +++ b/app/admin-tab/settings/template.hbs @@ -10,11 +10,6 @@ {{catalog-settings catalog=model.catalog}} -
- {{virtual-machine-settings virtualMachine=model.vm}} -
-
{{dynamic-driver-settings drivers=model.machineDrivers}}
- diff --git a/app/application/route.js b/app/application/route.js index 7e0441768..39a72dc8d 100644 --- a/app/application/route.js +++ b/app/application/route.js @@ -75,7 +75,6 @@ export default Ember.Route.extend({ error(err) { this.controllerFor('application').set('error',err); - this.set('app.showArticles',false); this.transitionTo('failWhale'); console.log('Application Error', (err ? err.stack : undefined)); }, diff --git a/app/authenticated/project/apikeys/template.hbs b/app/authenticated/project/apikeys/template.hbs index cba8159ca..15af38dc6 100644 --- a/app/authenticated/project/apikeys/template.hbs +++ b/app/authenticated/project/apikeys/template.hbs @@ -38,13 +38,13 @@ {{#advanced-section}}
-

{{t 'apiPage.advanced.header'}}

+

{{t 'apiPage.account.header'}}

- +
-

{{t 'apiPage.advanced.content.paragraph1'}} {{#if access.identity.name}}({{access.identity.displayName}}){{/if}} {{t 'apiPage.advanced.content.paragraph2'}}

+

{{t 'apiPage.account.content.paragraph1'}} {{#if access.identity.name}}({{access.identity.displayName}}){{/if}} {{t 'apiPage.account.content.paragraph2'}}

{{displayEndpoint}} {{copy-to-clipboard clipboardText=endpointWithAuth size="sm"}} @@ -63,7 +63,7 @@ {{#each accountArranged as |key|}} {{apikey-row model=key}} {{else}} - {{t 'apiPage.advanced.table.noData'}} + {{t 'apiPage.account.table.noData'}} {{/each}} diff --git a/app/components/environment-header/component.js b/app/components/environment-header/component.js index 9a2718fb1..8e4421c00 100644 --- a/app/components/environment-header/component.js +++ b/app/components/environment-header/component.js @@ -2,7 +2,8 @@ import Ember from 'ember'; export default Ember.Component.extend({ settings: Ember.inject.service(), - hasVm: Ember.computed.alias('settings.hasVm'), + projects: Ember.inject.service(), + hasVm: Ember.computed.alias('projects.current.virtualMachine'), actions: { changeStack(stack) { diff --git a/app/components/form-balancer-listeners/component.js b/app/components/form-balancer-listeners/component.js index db4a1e957..2f922e734 100644 --- a/app/components/form-balancer-listeners/component.js +++ b/app/components/form-balancer-listeners/component.js @@ -76,7 +76,7 @@ export default Ember.Component.extend(ManageLabels, { var sslPorts = this.get('listenersArray') .filterBy('ssl',true) .map((listener) => { return parseIpPort(listener.get('host'),'http'); }) - .filterBy('port') + .filter((obj) => { return obj && obj.port; }) .map((obj) => { return obj.port; }) .sort().uniq(); diff --git a/app/components/form-balancer-listeners/template.hbs b/app/components/form-balancer-listeners/template.hbs index 8c1e6395d..e3cfbf2f8 100644 --- a/app/components/form-balancer-listeners/template.hbs +++ b/app/components/form-balancer-listeners/template.hbs @@ -66,7 +66,7 @@ {{input type="text" classNames="form-control lb-listener-target-port input-sm" min="1" max="65535" step="1" value=listener.container placeholder=(t 'formBalancerListeners.container.placeholder')}}   - +
+ {{#if item.showAlert}} + {{#tooltip-element class="tooltip-warning" type='tooltip-warning'}} + {{#link-to item.alertRoute data-toggle="tooltip" data-placement="bottom"}}!{{/link-to}} + {{/tooltip-element}} + {{/if}} {{else}} {{! No submenu }} diff --git a/app/components/stack-section/component.js b/app/components/stack-section/component.js index 3db843cfc..d43459564 100644 --- a/app/components/stack-section/component.js +++ b/app/components/stack-section/component.js @@ -5,8 +5,8 @@ import FilterState from 'ui/mixins/filter-state'; export default Ember.Component.extend(FilterState, { prefs: Ember.inject.service(), - settings: Ember.inject.service(), - hasVm: Ember.computed.alias('settings.hasVm'), + projects: Ember.inject.service(), + hasVm: Ember.computed.alias('projects.current.virtualMachine'), model: null, single: false, diff --git a/app/components/view-edit-project/template.hbs b/app/components/view-edit-project/template.hbs index 69e2c685d..9e4685419 100644 --- a/app/components/view-edit-project/template.hbs +++ b/app/components/view-edit-project/template.hbs @@ -119,7 +119,7 @@ {{else}}

- {{t 'viewEditProject.helpBlock'}} + {{format-html-message 'viewEditProject.helpBlock'}}

{{/if}}
@@ -128,6 +128,26 @@
{{#if showEdit}} +
+
+
+ {{t 'viewEditProject.virtualMachine.label'}} +
+ +
+
+ + +
+

{{format-html-message 'viewEditProject.virtualMachine.subtext'}}

+
+
+
+ {{top-errors errors=errors}} {{save-cancel editing=editing save="save" cancel="cancel"}} {{/if}} diff --git a/app/components/virtual-machine-settings/component.js b/app/components/virtual-machine-settings/component.js deleted file mode 100644 index 8854ccdb2..000000000 --- a/app/components/virtual-machine-settings/component.js +++ /dev/null @@ -1,17 +0,0 @@ -import Ember from 'ember'; -import C from 'ui/utils/constants'; - -export default Ember.Component.extend({ - settings : Ember.inject.service(), - virtualMachine : null, - - actions: { - save: function(btnCb) { - this.get('settings').set(C.SETTING.VM_ENABLED, this.get('virtualMachine')); - this.get('settings').one('settingsPromisesResolved', () => { - btnCb(true); - this.sendAction('saved'); - }); - }, - } -}); diff --git a/app/components/virtual-machine-settings/template.hbs b/app/components/virtual-machine-settings/template.hbs deleted file mode 100644 index de978b64a..000000000 --- a/app/components/virtual-machine-settings/template.hbs +++ /dev/null @@ -1,14 +0,0 @@ -

{{t 'virtualMachineSettings.header'}}

-
-
{{format-html-message 'virtualMachineSettings.subtext'}}
- -
- - -
- -{{save-cancel cancelDisabled=true editing=true save="save"}} diff --git a/app/models/project.js b/app/models/project.js index 55c28a330..4c86bf62e 100644 --- a/app/models/project.js +++ b/app/models/project.js @@ -15,11 +15,6 @@ var Project = Resource.extend(PolledResource, { name: null, description: null, - init() { - this._super(...arguments); - console.log('INIT PROJECT'); - }, - actions: { edit: function() { this.get('router').transitionTo('settings.projects.detail', this.get('id'), {queryParams: {editing: true}}); @@ -85,6 +80,7 @@ var Project = Resource.extend(PolledResource, { { label: 'action.remove', icon: 'icon icon-trash', action: 'promptDelete', enabled: this.get('canRemove'), altAction: 'delete' }, { label: 'action.restore', icon: '', action: 'restore', enabled: !!a.restore }, { label: 'action.purge', icon: '', action: 'purge', enabled: !!a.purge }, + { label: 'action.viewInApi', icon: 'icon icon-external-link',action: 'goToApi', enabled: true }, ]; diff --git a/app/services/settings.js b/app/services/settings.js index bc75ae63d..99064b3d4 100644 --- a/app/services/settings.js +++ b/app/services/settings.js @@ -154,8 +154,6 @@ export default Ember.Service.extend(Ember.Evented, { dockerMachineVersion: Ember.computed.alias(`asMap.${C.SETTING.VERSION_MACHINE}.value`), goMachineVersion: Ember.computed.alias(`asMap.${C.SETTING.VERSION_GMS}.value`), - hasVm: Ember.computed.equal(`asMap.${C.SETTING.VM_ENABLED}.value`, 'true'), - _plValue: function() { return this.get(`cookies.${C.COOKIE.PL}`) || ''; }.property(`cookies.${C.COOKIE.PL}`), diff --git a/app/services/user-language.js b/app/services/user-language.js index c2a3dc3bc..d13c3371e 100644 --- a/app/services/user-language.js +++ b/app/services/user-language.js @@ -45,12 +45,13 @@ export default Ember.Service.extend({ }, sideLoadLanguage(language) { + let application = this.get('app'); let loadedLocales = this.get('loadedLocales'); if (loadedLocales.contains(language)) { this.get('intl').setLocale(language); return Ember.RSVP.resolve(); } else { - return ajaxPromise({url: `${this.get('app.baseAssets')}translations/${language}.json`, + return ajaxPromise({url: `${this.get('app.baseAssets')}translations/${language}.json?${application.version}`, method: 'GET', dataType: 'json', }).then((resp) => { diff --git a/app/styles/components/_tooltip.scss b/app/styles/components/_tooltip.scss index 29a6e0f9c..701b7ceae 100644 --- a/app/styles/components/_tooltip.scss +++ b/app/styles/components/_tooltip.scss @@ -186,8 +186,8 @@ div.tooltip-warning { width : 15px; border-radius : 50%; position : absolute; - right : 6px; - top : 10px; + right : 3px; + top : 13px; padding : 0; line-height : 15px; text-align : center; diff --git a/app/styles/layout/_layout.scss b/app/styles/layout/_layout.scss index eb9db80ac..b3194caa2 100644 --- a/app/styles/layout/_layout.scss +++ b/app/styles/layout/_layout.scss @@ -937,11 +937,6 @@ SECTION.header { } HEADER { - div.tooltip-warning { - right: 0; - left: 62px; - } - .gh-avatar { height: 30px; width: 30px; diff --git a/app/styles/vendors/_bootstrap-tweak.scss b/app/styles/vendors/_bootstrap-tweak.scss index 5de585c9d..fab7bade8 100644 --- a/app/styles/vendors/_bootstrap-tweak.scss +++ b/app/styles/vendors/_bootstrap-tweak.scss @@ -594,7 +594,7 @@ HR { } .divider { - margin: 6px 5px; + margin: 0; } .dropdown-header { diff --git a/app/utils/constants.js b/app/utils/constants.js index bc1873f12..4833ff2a8 100644 --- a/app/utils/constants.js +++ b/app/utils/constants.js @@ -196,7 +196,6 @@ var C = { }, API_HOST: 'api$host', CATALOG_URL: 'catalog$url', - VM_ENABLED: 'vm$enabled', SWARM_PORT: 'swarm$tls$port', ENGINE_URL: 'engine$install$url', MIN_DOCKER: 'ui$min$docker$version', diff --git a/app/utils/navigation-tree.js b/app/utils/navigation-tree.js index a48fdb393..9aeeb295c 100644 --- a/app/utils/navigation-tree.js +++ b/app/utils/navigation-tree.js @@ -12,11 +12,18 @@ export const mesosReady = function() { return this.get('mesosReady'); }; /* Tree item options { id: 'str' (identifier to allow removal... should be unique) - label: 'Displayed label', (or function that returns string) - icon: 'icon icon-somethign', - condition: function() { return true if this item should be displayed }, - // condition can depend on anything page-header/component.js shouldUpdateNavTree() depends on: - // 'currentPath','project.orchestrationState','projectId','namespaceId',`settings.${C.SETTING.CATALOG_URL}`,'settings.hasVm','isAdmin', + localizedLabel: 'i18n key', (or function that returns one) + label: 'Displayed unlocalized label', (or function that returns string) + icon: 'icon icon-something', + condition: function() { + // return true if this item should be displayed + // condition can depend on anything page-header/component.js shouldUpdateNavTree() depends on + } + alertRoute: 'target.route.path', // as in link-to + alertCondition: function() { + // return true if the alert (!) icon should be displayed + // can depend on anything page-header/component.js shouldUpdateNavTree() depends on + } url: 'http://any/url', (url or route required) target: '_blank', (for url only) route: 'target.route.path', // as in link-to @@ -238,7 +245,7 @@ const navTree = [ icon: 'icon icon-vm', route: 'virtualmachines', ctx: [getProjectId], - condition: function() { return this.get('settings.hasVm'); }, + condition: function() { return this.get('hasVm'); }, }, { id: 'infra-storagepools', @@ -270,6 +277,10 @@ const navTree = [ localizedLabel: 'nav.admin.tab', route: 'admin-tab', condition: function() { return this.get('isAdmin'); }, + alertRoute: 'admin-tab.auth', + alertCondition: function() { + return !this.get('access.enabled') && this.get('prefs.'+C.PREFS.ACCESS_WARNING) !== false; + }, submenu: [ { id: 'admin-audit', diff --git a/package.json b/package.json index ea5f75a50..2a2741ad6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ui", - "version": "1.0.8", + "version": "1.0.9", "private": true, "directories": { "doc": "doc", diff --git a/translations/en-us.yaml b/translations/en-us.yaml index 8f2ae303c..4596a7718 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -6,25 +6,25 @@ languageName: "English (US)" generic: actions: Actions closeModal: Close + default: Default + description: Description disabled: Disabled - enabled: Enabled emptyString: "" + enabled: Enabled id: ID + image: Image + ipAddress: IP Address loading: "Loading..." missing: "*%MISSING%*" moreActions: More Actions + na: 'N/A' name: Name none: None remove: Remove - state: State - unknown: Unknown - description: Description - default: Default - type: Type role: Role - na: 'N/A' - ipAddress: IP Address - image: Image + state: State + type: Type + unknown: Unknown ############################## # Routes @@ -76,12 +76,13 @@ apiPage: noName: None noDescription: None noPublicValue: No public value - advanced: + account: header: Account API Keys buttonText: Add Account API Key content: paragraph1: Account API Keys are tied to your specific account paragraph2: "and can create, delete, and manipulate all Environments which you have access to." + table: noData: "You don't have any Account API keys yet." auditLogsPage: @@ -226,7 +227,6 @@ authPage: pre: Enable Local Auth post: 'Enabling...' - catalogPage: index: header: 'Catalog:' @@ -237,12 +237,10 @@ catalogPage: singular: There are no compatible templates. plural: There are no compatible templates in this catalog. - consolePage: header: 'Shell:' closeButton: Close - certificatesPage: table: cn: Domain Name @@ -374,7 +372,6 @@ failWhalePage: Reload to try again or logoutButton: log out - haPage: header: enabled: 'High Availability is enabled' @@ -613,7 +610,6 @@ hostsPage: body: noData: This host does not have any volumes. - k8sTab: kubectl: header: kubectl @@ -742,7 +738,6 @@ registriesPage: labelText: Password placeholder: e.g. password - servicePage: header: 'Service:' multistat: @@ -801,7 +796,6 @@ servicePage: noData: This Service has no ports. notActive: Ports are only available while the service is Active. - settingsPage: index: header: Environments @@ -817,7 +811,6 @@ settingsPage: body: noData: You don't have any environments yet. - stacksPage: header: all: All Stacks @@ -936,8 +929,6 @@ virtualMachinePage: navTabs: labels: Labels - - virtualMachinesPage: header: Virtual Machines linkTo: Add Virtual Machine @@ -973,7 +964,6 @@ externalServicePartial: hostname: 'Host Name:' description: 'Description:' - hostPartial: host: addCommon: @@ -985,7 +975,6 @@ hostPartial: addOptions: labels: Labels - openLdap: configuredIndication: header: @@ -1135,7 +1124,6 @@ catalogSettings: valueLabel: URL valuePlaceholder: 'e.g. https://github.com/mycompany/mycatalog.git' - confirmDelete: title: 'Are you sure you want to delete' environmentNote: 'Note: All resources inside this Environment will be permanently removed, including any Hosts that were created through {appName}.' @@ -1237,6 +1225,7 @@ editApiKey: saveWarning1: Save the keys above! This is the only time you'll be able to see the secret. saveWarning2: If you lose it, you'll need to create a new API key. noteOptional: Name and/or description are optional to help you remember what it's used for. You can just create a key by clicking Create. + #' fixes syntax highlighting so i dont go crazy editBalancerService: title: Edit Load Balancer @@ -1252,7 +1241,6 @@ editBalancerService: label: 'defaults section' prompt: Custom defaults section lines - editCertificate: title: Edit Certificate name: @@ -1449,6 +1437,52 @@ formEngineOpts: valueLabel: Mirror URL valuePlaceholder: e.g. https://my-mirror.example.com:5000 +formHealthCheck: + label: Health Check + checkType: + none: None + tcp: TCP Connection Opens + http: HTTP Responds 2xx/3xx + request: + label: HTTP Request + method: + prompt: "Select a HTTP Method:" + path: + placeholder: Request Path e.g. /healthcheck + version: + prompt: "Select a HTTP Version:" + host: + label: Host Header + placeholder: e.g. www.example.com + port: + label: Port + placeholder: e.g. 80 + initializingTimeout: + label: Initializing Timeout + unit: ms + interval: + label: Check Interval + unit: ms + timeout: + label: Check Timeout + unit: ms + healthyThreshold: + label: Healthy Threshold + unit: successes + unhealthyThreshold: + label: Unhealthy Threshold + unit: failures + strategy: + label: When Unhealthy + none: Take no action + recreate: Re-create + recreateOnQuorumPrefix: Re-create, only when at least + recreateOnQuorumSuffix: | + {quorum, plural, + =1 {container is} + other {containers are} + } healthy + formKeyValue: addAction: Add Pair key: @@ -1460,6 +1494,16 @@ formKeyValue: placeholder: Value protip: 'ProTip: Paste one or more lines of key=value pairs into any key field for easy bulk entry.' +formImage: + label: Select Image + vm: + placeholder: e.g. rancher/vm-ubuntu + dropdownLabel: "{appName} Images" + container: + placeholder: "e.g. ubuntu:trusty" + pullImage: + label: Always pull image before creating + formNameDescription: name: label: Name @@ -1609,6 +1653,17 @@ machine: publishSettingsFile: placeholder: Your Publish Settings file +inputCertificate: + key: + label: Private Key + placeholder: "Paste in the private key, starting with -----BEGIN RSA PRIVATE KEY-----" + cert: + label: Certificate + placeholder: "Paste in the primary certificate, starting with -----BEGIN CERTIFICATE-----" + certChain: + label: Chain Certs + placeholder: "Optional; Paste in the additional chained certificates, starting with -----BEGIN CERTIFICATE-----" + inputPassword: buttonText: Generate @@ -1648,6 +1703,10 @@ newContainer: placeholder: e.g. myapp description: placeholder: e.g. My Application + emptyPrimaryService: "(Primary Service)" + emptySidekick: "(Sidekick #{num})" + addSidekickContainer: Add Sidekick Container + addSidekickVm: Add Sidekick VM pageFooter: notARelease: (Not a Release) @@ -1728,7 +1787,7 @@ stackSection: loadBalancer: Add Load Balancer serviceAlias: Add Service Alias externalService: Add External Service - virtualMachine: Add Virtual + virtualMachine: Add Virtual Machine storagePoolSection: outputs: Outputs @@ -1775,7 +1834,7 @@ viewEditDescription: placeholder: e.g. Environment for developer experimentation viewEditProject: - showDdit: + showEdit: edit: "Edit Environment:" add: Add Environment orchestration: Container Orchestration @@ -1785,11 +1844,11 @@ viewEditProject: helpBlock: | Access Control is not enabled.
Anybody with access to the API/UI acts as an admin and will be able to use any environment. + virtualMachine: + label: Virtual Machine Support + subtext: | + Requires hosts that have the KVM kernel module loaded. -virtualMachineSettings: - header: Virtual Machine Support - subtext: | - Requires hosts that have the KVM kernel module loaded. vmConsole: header: "console:"