mirror of https://github.com/rancher/ui.git
Disable DO images that don't work
This commit is contained in:
parent
99a5aa69d2
commit
c44a1c604d
|
|
@ -21,6 +21,7 @@ export default Ember.Component.extend({
|
||||||
descriptionPlaceholder : 'formNameDescription.description.placeholder',
|
descriptionPlaceholder : 'formNameDescription.description.placeholder',
|
||||||
descriptionRequired : false,
|
descriptionRequired : false,
|
||||||
descriptionDisabled : false,
|
descriptionDisabled : false,
|
||||||
|
descriptionShown : true,
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-label">
|
{{#if descriptionShown}}
|
||||||
<label class="form-control-static">{{t descriptionLabel}}{{if descriptionRequired '*'}}</label>
|
<div class="form-label">
|
||||||
</div>
|
<label class="form-control-static">{{t descriptionLabel}}{{if descriptionRequired '*'}}</label>
|
||||||
{{textarea-autogrow value=_description classNames="form-control no-resize" rows="1" placeholder=descriptionPlaceholder disabled=descriptionDisabled}}
|
</div>
|
||||||
{{#if descriptionHelp}}<p class="help-block">{{t descriptionHelp}}</p>{{/if}}
|
{{textarea-autogrow value=_description classNames="form-control no-resize" rows="1" placeholder=descriptionPlaceholder disabled=descriptionDisabled}}
|
||||||
|
{{#if descriptionHelp}}<p class="help-block">{{t descriptionHelp}}</p>{{/if}}
|
||||||
|
{{else}}
|
||||||
|
{{yield}}
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<section class="horizontal-form">
|
<section class="horizontal-form">
|
||||||
<form>
|
<form>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="over-hr r-mt20 r-mb20">
|
<div class="over-hr r-mb20">
|
||||||
<span>{{t 'machine.driverAmazon.accessSection'}}</span>
|
<span>{{t 'machine.driverAmazon.accessSection'}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,64 +1,55 @@
|
||||||
<div class="container-fluid">
|
<section>
|
||||||
<div class="row form-group">
|
<div class="container-fluid">
|
||||||
<div class="col-md-8 col-md-offset-2">
|
<div class="row form-group">
|
||||||
<ul class="list-circles list-circles-clear">
|
<div class="col-md-8 col-md-offset-2">
|
||||||
<li>
|
<ul class="list-circles list-circles-clear">
|
||||||
<i>1</i>
|
<li>
|
||||||
{{format-html-message 'machine.driverCustom.step1'}}
|
<i>1</i>
|
||||||
</li>
|
{{format-html-message 'machine.driverCustom.step1'}}
|
||||||
<li>
|
</li>
|
||||||
<i>2</i>
|
<li>
|
||||||
{{t 'machine.driverCustom.step2'}}
|
<i>2</i>
|
||||||
<ul>
|
{{t 'machine.driverCustom.step2'}}
|
||||||
<li>{{format-html-message 'machine.driverCustom.step2li'}}</li>
|
<ul>
|
||||||
</ul>
|
<li>{{format-html-message 'machine.driverCustom.step2li'}}</li>
|
||||||
</li>
|
</ul>
|
||||||
<li>
|
</li>
|
||||||
<i>3</i>
|
<li>
|
||||||
{{t 'machine.driverCustom.step3'}}
|
<i>3</i>
|
||||||
<div class="r-mt10">
|
{{t 'machine.driverCustom.step3'}}
|
||||||
{{form-user-labels setLabels=(action 'setLabels')}}
|
<div class="r-mt10">
|
||||||
</div>
|
{{form-user-labels setLabels=(action 'setLabels')}}
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<i>4</i>
|
|
||||||
{{format-html-message 'machine.driverCustom.step4' rancherImage=settings.rancherImage}}
|
|
||||||
<div class="checkbox r-mt10">
|
|
||||||
{{input type="text" value=cattleAgentIp classNames="form-control" placeholder="e.g. 172.16.0.2"}}
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<i>5</i>
|
|
||||||
{{t 'machine.driverCustom.step5Copy'}} {{settings.appName}}:
|
|
||||||
{{#if registrationCommand}}
|
|
||||||
<div class="copy-pre">
|
|
||||||
<pre id="registration-command">{{registrationCommand}}</pre>
|
|
||||||
{{copy-to-clipboard clipboardText=registrationCommand}}
|
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
</li>
|
||||||
<div><i class="icon icon-spinner icon-spin"></i> {{t 'machine.driverCustom.generating'}}</div>
|
<li>
|
||||||
{{/if}}
|
<i>4</i>
|
||||||
</li>
|
{{format-html-message 'machine.driverCustom.step4' rancherImage=settings.rancherImage}}
|
||||||
<li>
|
<div class="checkbox r-mt10">
|
||||||
<i>5</i>
|
{{input type="text" value=cattleAgentIp classNames="form-control" placeholder="e.g. 172.16.0.2"}}
|
||||||
{{t 'machine.driverCustom.step5Close.part1'}} {{#link-to "hosts"}}{{t 'machine.driverCustom.step5Close.link'}}{{/link-to}} {{t 'machine.driverCustom.step5Close.part2'}}
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
<li>
|
||||||
|
<i>5</i>
|
||||||
|
{{t 'machine.driverCustom.step5Copy'}} {{settings.appName}}:
|
||||||
|
{{#if registrationCommand}}
|
||||||
|
<div class="copy-pre">
|
||||||
|
<pre id="registration-command">{{registrationCommand}}</pre>
|
||||||
|
{{copy-to-clipboard clipboardText=registrationCommand}}
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div><i class="icon icon-spinner icon-spin"></i> {{t 'machine.driverCustom.generating'}}</div>
|
||||||
|
{{/if}}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i>5</i>
|
||||||
|
{{t 'machine.driverCustom.step5Close.part1'}} {{#link-to "hosts"}}{{t 'machine.driverCustom.step5Close.link'}}{{/link-to}} {{t 'machine.driverCustom.step5Close.part2'}}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="footer-actions">
|
|
||||||
<button {{action "cancel"}} class="btn btn-primary">{{t 'machine.driverCustom.close'}}</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="footer-actions">
|
||||||
|
<button {{action "cancel"}} class="btn btn-primary">{{t 'machine.driverCustom.close'}}</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,22 @@ import Ember from 'ember';
|
||||||
import Driver from 'ui/mixins/driver';
|
import Driver from 'ui/mixins/driver';
|
||||||
import { ajaxPromise } from 'ember-api-store/utils/ajax-promise';
|
import { ajaxPromise } from 'ember-api-store/utils/ajax-promise';
|
||||||
|
|
||||||
const DIGITALOCEAN_API = 'api.digitalocean.com/v2';
|
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 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, {
|
export default Ember.Component.extend(Driver, {
|
||||||
driverName: 'digitalocean',
|
driverName: 'digitalocean',
|
||||||
|
|
@ -46,8 +60,11 @@ export default Ember.Component.extend(Driver, {
|
||||||
});
|
});
|
||||||
|
|
||||||
let filteredImages = hash.images.images.filter(function(image) {
|
let filteredImages = hash.images.images.filter(function(image) {
|
||||||
return VALID_IMAGES.indexOf(image.slug) >= 0;
|
return !((image.name||'').match(/x32$/));
|
||||||
}).sortBy('distribution');
|
}).map(function(image) {
|
||||||
|
image.disabled = VALID_IMAGES.indexOf(image.slug) === -1;
|
||||||
|
return image;
|
||||||
|
}).sortBy('distribution','name');
|
||||||
|
|
||||||
this.setProperties({
|
this.setProperties({
|
||||||
regionChoices: filteredRegions,
|
regionChoices: filteredRegions,
|
||||||
|
|
@ -120,7 +137,7 @@ export default Ember.Component.extend(Driver, {
|
||||||
|
|
||||||
apiRequest: function(command, params, method='GET') {
|
apiRequest: function(command, params, method='GET') {
|
||||||
let proxyEndpoint = this.get('app.proxyEndpoint');
|
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');
|
let accessToken = this.get('model.digitaloceanConfig.accessToken');
|
||||||
|
|
||||||
return ajaxPromise({
|
return ajaxPromise({
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<section class="horizontal-form">
|
<section class="horizontal-form">
|
||||||
{{#if step1}}
|
{{#if step1}}
|
||||||
<form>
|
<form>
|
||||||
<div class="over-hr r-mt20 r-mb20">
|
<div class="over-hr r-mb20">
|
||||||
<span>{{t 'machine.driverDigitalocean.accountSection'}}</span>
|
<span>{{t 'machine.driverDigitalocean.accountSection'}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<select class="form-control" onchange={{action (mut digitaloceanConfig.image) value="target.value"}}>
|
<select class="form-control" onchange={{action (mut digitaloceanConfig.image) value="target.value"}}>
|
||||||
{{#each imageChoices as |choice|}}
|
{{#each imageChoices as |choice|}}
|
||||||
<option value={{choice.slug}} selected={{eq digitaloceanConfig.image choice.slug}}>{{choice.distribution}} {{choice.name}}</option>
|
<option value={{choice.slug}} disabled={{choice.disabled}} selected={{eq digitaloceanConfig.image choice.slug}}>{{choice.distribution}} {{choice.name}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<select class="form-control" onchange={{action (mut digitaloceanConfig.size) value="target.value"}}>
|
<select class="form-control" onchange={{action (mut digitaloceanConfig.size) value="target.value"}}>
|
||||||
{{#each filteredSizeChoices as |choice|}}
|
{{#each filteredSizeChoices as |choice|}}
|
||||||
<option value={{choice.slug}} selected={{eq digitaloceanConfig.size choice.slug}}>{{choice.slug}} {{t 'machine.driverDigitalocean.imageChoices.ram'}}, {{choice.disk}}{{t 'machine.driverDigitalocean.imageChoices.gb'}} {{t 'machine.driverDigitalocean.imageChoices.disk'}}, {{choice.vcpus}} {{t 'machine.driverDigitalocean.imageChoices.vCpu'}} </option>
|
<option value={{choice.slug}} selected={{eq digitaloceanConfig.size choice.slug}}>{{t 'machine.driverDigitalocean.sizeLabel' slug=choice.slug disk=choice.disk vcpus=choice.vcpus}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<section class="horizontal-form">
|
<section class="horizontal-form">
|
||||||
<form>
|
<form>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="over-hr r-mt20 r-mb20">
|
<div class="over-hr r-mb20">
|
||||||
<span>{{t 'machine.driverExoscale.accountSection'}}</span>
|
<span>{{t 'machine.driverExoscale.accountSection'}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<section class="horizontal-form">
|
<section class="horizontal-form">
|
||||||
<form name="login">
|
<form name="login">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="over-hr r-mt20 r-mb20">
|
<div class="over-hr r-mb20">
|
||||||
<span>{{t 'machine.driverUbiquity.accountSection'}}</span>
|
<span>{{t 'machine.driverUbiquity.accountSection'}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{#if model.apiHostSet}}
|
{{#if model.apiHostSet}}
|
||||||
<section class="well">
|
<section class="well r-mb0">
|
||||||
{{#if showPicker}}
|
{{#if showPicker}}
|
||||||
<div class="nav nav-boxes checked-active">
|
<div class="nav nav-boxes checked-active">
|
||||||
|
|
||||||
|
|
@ -33,17 +33,15 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{#if driver}}
|
{{#if driver}}
|
||||||
<section>
|
{{component (if (or (not driverObj) driverObj.hasUi) (concat "machine/driver-" driver) 'machine/driver-other')
|
||||||
{{component (if (or (not driverObj) driverObj.hasUi) (concat "machine/driver-" driver) 'machine/driver-other')
|
cancel=(route-action 'cancel')
|
||||||
cancel=(route-action 'cancel')
|
goBack=(route-action 'goBack')
|
||||||
goBack=(route-action 'goBack')
|
clonedModel=model.clonedModel
|
||||||
clonedModel=model.clonedModel
|
driver=(concat driver 'Config')
|
||||||
driver=(concat driver 'Config')
|
schemas=model.schemas
|
||||||
schemas=model.schemas
|
typeDocumentations=model.typeDocumentations
|
||||||
typeDocumentations=model.typeDocumentations
|
availableDrivers=model.availableDrivers
|
||||||
availableDrivers=model.availableDrivers
|
}}
|
||||||
}}
|
|
||||||
</section>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<section>
|
<section>
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,6 @@ export default Ember.Route.extend({
|
||||||
break;
|
break;
|
||||||
case 'deployment':
|
case 'deployment':
|
||||||
fn = k8s.getDeployment;
|
fn = k8s.getDeployment;
|
||||||
label = 'Deployment';
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return Ember.RSVP.reject('Unknown Kind');
|
return Ember.RSVP.reject('Unknown Kind');
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,18 @@
|
||||||
<div class="row form-group">
|
{{#form-name-description
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="form-label">
|
|
||||||
<label>{{t 'hostPartial.host.addCommon.quanity'}}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row form-group">
|
|
||||||
<div class="col-xs-2 col-md-1">
|
|
||||||
{{count}}
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-10 col-md-11">
|
|
||||||
{{input-slider value=count valueMin=1 valueMax=11}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{form-name-description
|
|
||||||
name=prefix
|
name=prefix
|
||||||
namePlaceholder="hostPartial.host.addCommon.new.form.name.placeholder"
|
namePlaceholder="hostPartial.host.addCommon.new.form.name.placeholder"
|
||||||
nameHelpText=nameCountLabel
|
nameHelpText=nameCountLabel
|
||||||
description=primaryResource.description
|
descriptionShown=false
|
||||||
}}
|
}}
|
||||||
|
<div class="form-label">
|
||||||
|
<label class="form-control-static">{{t 'hostPartial.host.addCommon.quanity'}}</label>
|
||||||
|
</div>
|
||||||
|
<div class="row form-control-static">
|
||||||
|
<div class="col-xs-2 col-md-1">
|
||||||
|
{{count}}
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-10 col-md-11">
|
||||||
|
{{input-slider value=count valueMin=1 valueMax=11}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/form-name-description}}
|
||||||
|
|
|
||||||
|
|
@ -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');
|
|
||||||
});
|
|
||||||
|
|
@ -2155,7 +2155,7 @@ machine:
|
||||||
provided: Provided
|
provided: Provided
|
||||||
region:
|
region:
|
||||||
label: 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"
|
loginAction: "Next: Authenticate & select a network"
|
||||||
loadingAvailability: Loading Availablility Zone and VPC info from EC2...
|
loadingAvailability: Loading Availablility Zone and VPC info from EC2...
|
||||||
vpcSection: Availability Zone & VPC
|
vpcSection: Availability Zone & VPC
|
||||||
|
|
@ -2252,11 +2252,11 @@ machine:
|
||||||
close: Close
|
close: Close
|
||||||
|
|
||||||
driverDigitalocean:
|
driverDigitalocean:
|
||||||
imageChoices:
|
sizeLabel: |
|
||||||
gb: gb
|
{slug} RAM, {disk}gb Disk, {vcpus, plural,
|
||||||
ram: RAM
|
=1 {# vCPU}
|
||||||
vCpu: vCPU
|
other {# vCPUs}
|
||||||
disk: Disk
|
}
|
||||||
accountSection: Account Access
|
accountSection: Account Access
|
||||||
authAccountButton: 'Next: Configure Droplet'
|
authAccountButton: 'Next: Configure Droplet'
|
||||||
accessToken:
|
accessToken:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue