diff --git a/app/components/form-name-description/component.js b/app/components/form-name-description/component.js index 9d7017959..36646600b 100644 --- a/app/components/form-name-description/component.js +++ b/app/components/form-name-description/component.js @@ -21,6 +21,7 @@ export default Ember.Component.extend({ descriptionPlaceholder : 'formNameDescription.description.placeholder', descriptionRequired : false, descriptionDisabled : false, + descriptionShown : true, init() { this._super(...arguments); diff --git a/app/components/form-name-description/template.hbs b/app/components/form-name-description/template.hbs index 3caba0085..79f04ed45 100644 --- a/app/components/form-name-description/template.hbs +++ b/app/components/form-name-description/template.hbs @@ -8,11 +8,15 @@
-
- -
- {{textarea-autogrow value=_description classNames="form-control no-resize" rows="1" placeholder=descriptionPlaceholder disabled=descriptionDisabled}} - {{#if descriptionHelp}}

{{t descriptionHelp}}

{{/if}} + {{#if descriptionShown}} +
+ +
+ {{textarea-autogrow value=_description classNames="form-control no-resize" rows="1" placeholder=descriptionPlaceholder disabled=descriptionDisabled}} + {{#if descriptionHelp}}

{{t descriptionHelp}}

{{/if}} + {{else}} + {{yield}} + {{/if}}
diff --git a/app/components/machine/driver-amazonec2/template.hbs b/app/components/machine/driver-amazonec2/template.hbs index b1c52805c..b76521bac 100644 --- a/app/components/machine/driver-amazonec2/template.hbs +++ b/app/components/machine/driver-amazonec2/template.hbs @@ -1,7 +1,7 @@
-
+
{{t 'machine.driverAmazon.accessSection'}}
diff --git a/app/components/machine/driver-custom/template.hbs b/app/components/machine/driver-custom/template.hbs index 1c1027a90..9ba075168 100644 --- a/app/components/machine/driver-custom/template.hbs +++ b/app/components/machine/driver-custom/template.hbs @@ -1,64 +1,55 @@ -
-
-
-
    -
  • - 1 - {{format-html-message 'machine.driverCustom.step1'}} -
  • -
  • - 2 - {{t 'machine.driverCustom.step2'}} -
      -
    • {{format-html-message 'machine.driverCustom.step2li'}}
    • -
    -
  • -
  • - 3 - {{t 'machine.driverCustom.step3'}} -
    - {{form-user-labels setLabels=(action 'setLabels')}} -
    -
  • -
  • - 4 - {{format-html-message 'machine.driverCustom.step4' rancherImage=settings.rancherImage}} -
    - {{input type="text" value=cattleAgentIp classNames="form-control" placeholder="e.g. 172.16.0.2"}} -
    -
  • -
  • - 5 - {{t 'machine.driverCustom.step5Copy'}} {{settings.appName}}: - {{#if registrationCommand}} -
    -
    {{registrationCommand}}
    - {{copy-to-clipboard clipboardText=registrationCommand}} +
    +
    +
    +
    +
      +
    • + 1 + {{format-html-message 'machine.driverCustom.step1'}} +
    • +
    • + 2 + {{t 'machine.driverCustom.step2'}} +
        +
      • {{format-html-message 'machine.driverCustom.step2li'}}
      • +
      +
    • +
    • + 3 + {{t 'machine.driverCustom.step3'}} +
      + {{form-user-labels setLabels=(action 'setLabels')}}
      - {{else}} -
      {{t 'machine.driverCustom.generating'}}
      - {{/if}} -
    • -
    • - 5 - {{t 'machine.driverCustom.step5Close.part1'}} {{#link-to "hosts"}}{{t 'machine.driverCustom.step5Close.link'}}{{/link-to}} {{t 'machine.driverCustom.step5Close.part2'}} -
    • -
    +
  • +
  • + 4 + {{format-html-message 'machine.driverCustom.step4' rancherImage=settings.rancherImage}} +
    + {{input type="text" value=cattleAgentIp classNames="form-control" placeholder="e.g. 172.16.0.2"}} +
    +
  • +
  • + 5 + {{t 'machine.driverCustom.step5Copy'}} {{settings.appName}}: + {{#if registrationCommand}} +
    +
    {{registrationCommand}}
    + {{copy-to-clipboard clipboardText=registrationCommand}} +
    + {{else}} +
    {{t 'machine.driverCustom.generating'}}
    + {{/if}} +
  • +
  • + 5 + {{t 'machine.driverCustom.step5Close.part1'}} {{#link-to "hosts"}}{{t 'machine.driverCustom.step5Close.link'}}{{/link-to}} {{t 'machine.driverCustom.step5Close.part2'}} +
  • +
+
-
- - - - - - - - - - - - + +
diff --git a/app/components/machine/driver-digitalocean/component.js b/app/components/machine/driver-digitalocean/component.js index a0dee09ad..740c56112 100644 --- a/app/components/machine/driver-digitalocean/component.js +++ b/app/components/machine/driver-digitalocean/component.js @@ -2,8 +2,22 @@ import Ember from 'ember'; import Driver from 'ui/mixins/driver'; import { ajaxPromise } from 'ember-api-store/utils/ajax-promise'; -const DIGITALOCEAN_API = 'api.digitalocean.com/v2'; -const VALID_IMAGES = ['centos-6-x64', 'centos-7-0-x64', 'coreos-alpha', 'coreos-beta', 'coreos-stable', 'debian-7-x64', 'debian-8-x64', 'fedora-23-x64', 'fedora-24-x64', 'freebsd-10-1-x64', 'freebsd-10-2-x64', 'ubuntu-14-04-x64', 'ubuntu-16-04-x64']; +const DIGITALOCEAN_API = 'api.digitalocean.com/v2'; +const VALID_IMAGES = [ +// 'centos-6-x64', +// 'centos-7-0-x64', +// 'coreos-alpha', +// 'coreos-beta', +// 'coreos-stable', +// 'debian-7-x64', +// 'debian-8-x64', +// 'fedora-23-x64', +// 'fedora-24-x64', +// 'freebsd-10-1-x64', +// 'freebsd-10-2-x64', + 'ubuntu-14-04-x64', +// 'ubuntu-16-04-x64' +]; export default Ember.Component.extend(Driver, { driverName: 'digitalocean', @@ -46,8 +60,11 @@ export default Ember.Component.extend(Driver, { }); let filteredImages = hash.images.images.filter(function(image) { - return VALID_IMAGES.indexOf(image.slug) >= 0; - }).sortBy('distribution'); + return !((image.name||'').match(/x32$/)); + }).map(function(image) { + image.disabled = VALID_IMAGES.indexOf(image.slug) === -1; + return image; + }).sortBy('distribution','name'); this.setProperties({ regionChoices: filteredRegions, @@ -120,7 +137,7 @@ export default Ember.Component.extend(Driver, { apiRequest: function(command, params, method='GET') { let proxyEndpoint = this.get('app.proxyEndpoint'); - let url = `${proxyEndpoint}/${DIGITALOCEAN_API}/${command}`; + let url = `${proxyEndpoint}/${DIGITALOCEAN_API}/${command}?per_page=100`; let accessToken = this.get('model.digitaloceanConfig.accessToken'); return ajaxPromise({ diff --git a/app/components/machine/driver-digitalocean/template.hbs b/app/components/machine/driver-digitalocean/template.hbs index 59b8ea7e1..92bee39f5 100644 --- a/app/components/machine/driver-digitalocean/template.hbs +++ b/app/components/machine/driver-digitalocean/template.hbs @@ -1,7 +1,7 @@
{{#if step1}} -
+
{{t 'machine.driverDigitalocean.accountSection'}}
@@ -57,7 +57,7 @@
@@ -67,7 +67,7 @@
diff --git a/app/components/machine/driver-exoscale/template.hbs b/app/components/machine/driver-exoscale/template.hbs index 62d2a703d..6770a4700 100644 --- a/app/components/machine/driver-exoscale/template.hbs +++ b/app/components/machine/driver-exoscale/template.hbs @@ -1,7 +1,7 @@
-
+
{{t 'machine.driverExoscale.accountSection'}}
diff --git a/app/components/machine/driver-ubiquity/template.hbs b/app/components/machine/driver-ubiquity/template.hbs index 2e487a559..0f5131941 100644 --- a/app/components/machine/driver-ubiquity/template.hbs +++ b/app/components/machine/driver-ubiquity/template.hbs @@ -1,7 +1,7 @@
-
+
{{t 'machine.driverUbiquity.accountSection'}}
diff --git a/app/hosts/new/template.hbs b/app/hosts/new/template.hbs index 7c1a30e8a..44464c904 100644 --- a/app/hosts/new/template.hbs +++ b/app/hosts/new/template.hbs @@ -6,7 +6,7 @@
{{#if model.apiHostSet}} -
+
{{#if showPicker}}
{{#if driver}} -
- {{component (if (or (not driverObj) driverObj.hasUi) (concat "machine/driver-" driver) 'machine/driver-other') - cancel=(route-action 'cancel') - goBack=(route-action 'goBack') - clonedModel=model.clonedModel - driver=(concat driver 'Config') - schemas=model.schemas - typeDocumentations=model.typeDocumentations - availableDrivers=model.availableDrivers - }} -
+ {{component (if (or (not driverObj) driverObj.hasUi) (concat "machine/driver-" driver) 'machine/driver-other') + cancel=(route-action 'cancel') + goBack=(route-action 'goBack') + clonedModel=model.clonedModel + driver=(concat driver 'Config') + schemas=model.schemas + typeDocumentations=model.typeDocumentations + availableDrivers=model.availableDrivers + }} {{/if}} {{else}}
diff --git a/app/k8s-tab/apply/route.js b/app/k8s-tab/apply/route.js index 76ed7a35a..998d4d916 100644 --- a/app/k8s-tab/apply/route.js +++ b/app/k8s-tab/apply/route.js @@ -104,7 +104,6 @@ export default Ember.Route.extend({ break; case 'deployment': fn = k8s.getDeployment; - label = 'Deployment'; break; default: return Ember.RSVP.reject('Unknown Kind'); diff --git a/app/templates/host/add-common.hbs b/app/templates/host/add-common.hbs index a406648a9..a684d4a15 100644 --- a/app/templates/host/add-common.hbs +++ b/app/templates/host/add-common.hbs @@ -1,23 +1,18 @@ -
-
-
- -
-
-
- -
-
- {{count}} -
-
- {{input-slider value=count valueMin=1 valueMax=11}} -
-
- -{{form-name-description +{{#form-name-description name=prefix namePlaceholder="hostPartial.host.addCommon.new.form.name.placeholder" nameHelpText=nameCountLabel - description=primaryResource.description + descriptionShown=false }} +
+ +
+
+
+ {{count}} +
+
+ {{input-slider value=count valueMin=1 valueMax=11}} +
+
+{{/form-name-description}} diff --git a/tests/unit/components/radio-button-test.js b/tests/unit/components/radio-button-test.js deleted file mode 100644 index d5af8906b..000000000 --- a/tests/unit/components/radio-button-test.js +++ /dev/null @@ -1,21 +0,0 @@ -import { - moduleForComponent, - test -} from 'ember-qunit'; - -moduleForComponent('radio-button', 'RadioButtonComponent', { - // specify the other units that are required for this test - // needs: ['component:foo', 'helper:bar'] -}); - -test('it renders', function(assert) { - assert.expect(2); - - // creates the component instance - var component = this.subject(); - assert.equal(component._state, 'preRender'); - - // appends the component to the page - this.append(); - assert.equal(component._state, 'inDOM'); -}); diff --git a/translations/en-us.yaml b/translations/en-us.yaml index 7eb467751..6d0ba1cd9 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -2155,7 +2155,7 @@ machine: provided: Provided region: label: Region - accessKeyHelp: Paste in your AWS key pair here. We'll use this key to create your new Instances. + accessKeyHelp: "Paste in your AWS key pair here. We'll use this key to create your new Instances." loginAction: "Next: Authenticate & select a network" loadingAvailability: Loading Availablility Zone and VPC info from EC2... vpcSection: Availability Zone & VPC @@ -2242,7 +2242,7 @@ machine: step2: "Make sure any security groups or firewalls allow traffic:" step2li: From and To all other hosts on UDP ports 500 and 4500 (for IPsec networking) step3: "Optional: Add labels to be applied to the host." - step4: "Optional: Specify the public IP that should be used for this host. This is required if you're trying to add the host the {rancherImage} container is on." + step4: "Optional: Specify the public IP that should be used for this host. This is required if you're trying to add the host the {rancherImage} container is on." step5Copy: Copy, paste, and run the command below to register the host with generating: Generating registration URL... step5Close: @@ -2252,11 +2252,11 @@ machine: close: Close driverDigitalocean: - imageChoices: - gb: gb - ram: RAM - vCpu: vCPU - disk: Disk + sizeLabel: | + {slug} RAM, {disk}gb Disk, {vcpus, plural, + =1 {# vCPU} + other {# vCPUs} + } accountSection: Account Access authAccountButton: 'Next: Configure Droplet' accessToken: