From d35ba678a7980c2277296b2bb96ab2e7b66abd4a Mon Sep 17 00:00:00 2001 From: Vincent Fiduccia Date: Tue, 6 Feb 2018 18:23:03 -0700 Subject: [PATCH] Bugs --- app/models/machine.js | 2 +- app/models/machineconfig.js | 15 +++++++++ app/models/machinetemplate.js | 6 +--- app/styles/pages/_cluster-welcome.scss | 6 +++- .../addon/clusters/new/index/template.hbs | 2 +- .../container/new-edit/component.js | 4 +++ .../machine/driver-custom/template.hbs | 3 +- public/assets/images/logos/rke.svg | 32 +++++++++++++++++++ translations/en-us.yaml | 8 ++--- 9 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 app/models/machineconfig.js create mode 100644 public/assets/images/logos/rke.svg diff --git a/app/models/machine.js b/app/models/machine.js index ed1c3e112..c1c9541c0 100644 --- a/app/models/machine.js +++ b/app/models/machine.js @@ -89,7 +89,7 @@ var Machine = Resource.extend(StateCounts, ResourceUsage, { displayIp: alias('ipAddress'), - displayName: computed('name','nodeName','id', function() { + displayName: computed('name','nodeName','requestedHostname','id', function() { let name = get(this,'name'); if ( name ) { return name; diff --git a/app/models/machineconfig.js b/app/models/machineconfig.js new file mode 100644 index 000000000..7655ab71c --- /dev/null +++ b/app/models/machineconfig.js @@ -0,0 +1,15 @@ +import Resource from 'ember-api-store/models/resource'; +import { get, computed } from '@ember/object'; + +export default Resource.extend({ + type: 'machineconfig', + + displayName: computed('requestedHostname','id', function() { + let name = get(this,'requestedHostname'); + if ( name ) { + return name; + } + + return '('+get(this,'id')+')'; + }), +}); diff --git a/app/models/machinetemplate.js b/app/models/machinetemplate.js index a1a286357..d56485642 100644 --- a/app/models/machinetemplate.js +++ b/app/models/machinetemplate.js @@ -1,9 +1,7 @@ import Resource from 'ember-api-store/models/resource'; -var MachineTemplate = Resource.extend({ +export default Resource.extend({ type: 'machinetemplate', - actions: { - }, availableActions: function() { let l = this.get('links'); @@ -15,5 +13,3 @@ var MachineTemplate = Resource.extend({ ]; }.property('links.{remove}'), }); - -export default MachineTemplate; diff --git a/app/styles/pages/_cluster-welcome.scss b/app/styles/pages/_cluster-welcome.scss index 929ead18b..d8f2cecc7 100644 --- a/app/styles/pages/_cluster-welcome.scss +++ b/app/styles/pages/_cluster-welcome.scss @@ -9,9 +9,13 @@ } .box-sm { - padding: 75px 30px 30px 30px; + padding: 75px 30px 80px 30px; min-height: 370px; position: relative; + + P { + margin: 10px 0 0 0; + } } .box { diff --git a/lib/global-admin/addon/clusters/new/index/template.hbs b/lib/global-admin/addon/clusters/new/index/template.hbs index 5f2bdf1ba..2a4820275 100644 --- a/lib/global-admin/addon/clusters/new/index/template.hbs +++ b/lib/global-admin/addon/clusters/new/index/template.hbs @@ -23,7 +23,7 @@ {{#link-to "clusters.new.rke" class="btn bg-primary"}}{{t 'clusterWelcome.select'}}{{/link-to}} -
+
diff --git a/lib/shared/addon/components/container/new-edit/component.js b/lib/shared/addon/components/container/new-edit/component.js index 606bb54e1..52729eced 100644 --- a/lib/shared/addon/components/container/new-edit/component.js +++ b/lib/shared/addon/components/container/new-edit/component.js @@ -389,6 +389,10 @@ export default Component.extend(NewOrEdit, { } next(() => { + if ( this.isDestroyed || this.isDestroying ) { + return; + } + this.set('header', this.get('intl').t(k, args)); }); }.observes('isUpgrade','isService','isSidekick','isGlobal','service.displayName','intl.locale').on('init'), diff --git a/lib/shared/addon/components/machine/driver-custom/template.hbs b/lib/shared/addon/components/machine/driver-custom/template.hbs index 3e70e30ac..603c8b701 100644 --- a/lib/shared/addon/components/machine/driver-custom/template.hbs +++ b/lib/shared/addon/components/machine/driver-custom/template.hbs @@ -70,7 +70,8 @@
{{form-name-description - model=primaryResource + name=primaryResource.requestedHostname + description=primaryResource.description nameRequired=true namePlaceholder="hostsPage.new.name.placeholder" descriptionShown=true diff --git a/public/assets/images/logos/rke.svg b/public/assets/images/logos/rke.svg new file mode 100644 index 000000000..8c14a1331 --- /dev/null +++ b/public/assets/images/logos/rke.svg @@ -0,0 +1,32 @@ + + + + + + + + + diff --git a/translations/en-us.yaml b/translations/en-us.yaml index dc463f23c..392384fdf 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -671,11 +671,11 @@ clustersPage: label: Disk indexPage: cloud: - header: Create a Cloud Cluster - desc: Create and use a new cluster and nodes managed by a cloud Kubernetes provider. + header: Launch a Cloud Cluster + desc: Launch a new cluster on a hosted cloud Kubernetes provider (e.g Google GKE). The cloud provider manages the care and feeding of the nodes and cluster. rke: - header: Create a RKE Cluster - desc: Rancher deploys and automatically manages a Kubernetes cluster for you. Supports on-premise nodes or cloud infrastructure providers. + header: Create a Cluster + desc: Deploy and automatically manage a Kubernetes cluster with Rancher Kubernetes Engine (RKE). Import existing nodes or launch new ones to use with the cluster. Supports bare-metal and virtual machines in cloud infrastructure providers on on-premise. import: header: Import an Existing Cluster desc: Use an existing Kubernetes installation and the nodes it provides.