mirror of https://github.com/rancher/ui.git
Merge pull request #867 from westlywright/bugfixes-1.2.0
Driver upgrade option removed on state
This commit is contained in:
commit
3cb3b76c5c
|
|
@ -17,11 +17,11 @@ export default Ember.Controller.extend({
|
||||||
testing : false,
|
testing : false,
|
||||||
disableAuth : true,
|
disableAuth : true,
|
||||||
numUsers: function() {
|
numUsers: function() {
|
||||||
return this.get('model.allowedIdentities').filterBy('externalIdType',C.PROJECT.TYPE_SHIBBOLETH_USER).get('length');
|
return (this.get('model.allowedIdentities')|| []).filterBy('externalIdType',C.PROJECT.TYPE_SHIBBOLETH_USER).get('length');
|
||||||
}.property('model.allowedIdentities.@each.externalIdType','wasRestricted'),
|
}.property('model.allowedIdentities.@each.externalIdType','wasRestricted'),
|
||||||
|
|
||||||
numOrgs: function() {
|
numOrgs: function() {
|
||||||
return this.get('model.allowedIdentities').filterBy('externalIdType',C.PROJECT.TYPE_SHIBBOLETH_GROUP).get('length');
|
return (this.get('model.allowedIdentities')|| []).filterBy('externalIdType',C.PROJECT.TYPE_SHIBBOLETH_GROUP).get('length');
|
||||||
}.property('model.allowedIdentities.@each.externalIdType','wasRestricted'),
|
}.property('model.allowedIdentities.@each.externalIdType','wasRestricted'),
|
||||||
actions: {
|
actions: {
|
||||||
disable: function() {
|
disable: function() {
|
||||||
|
|
|
||||||
|
|
@ -43,9 +43,7 @@ export default Ember.Controller.extend(Sortable, {
|
||||||
|
|
||||||
let newDriver = this.createNewDriver(driver);
|
let newDriver = this.createNewDriver(driver);
|
||||||
|
|
||||||
this.get('userStore').createRecord(newDriver).save().then((result) => {
|
this.get('userStore').createRecord(newDriver).save().catch((err) => {
|
||||||
this.get('model.drivers').pushObject(result);
|
|
||||||
}).catch((err) => {
|
|
||||||
this.get('growl').fromError(err);
|
this.get('growl').fromError(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -75,7 +73,7 @@ export default Ember.Controller.extend(Sortable, {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
sortableContent: Ember.computed('model.drivers.@each.{state,id,version,externalId}', 'model.catalogDrivers.[]', function() {
|
sortableContent: Ember.computed('model.drivers.@each.{state,id,version,externalId}', 'model.catalogDrivers.@each.{id,catalogId,name}', function() {
|
||||||
// possibly add some search here
|
// possibly add some search here
|
||||||
let cDrivers = this.get('model.catalogDrivers.catalog');
|
let cDrivers = this.get('model.catalogDrivers.catalog');
|
||||||
let drivers = this.get('model.drivers.content');
|
let drivers = this.get('model.drivers.content');
|
||||||
|
|
@ -102,5 +100,4 @@ export default Ember.Controller.extend(Sortable, {
|
||||||
newContent = newContent.concat(drivers);
|
newContent = newContent.concat(drivers);
|
||||||
return newContent;
|
return newContent;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ export default Ember.Route.extend({
|
||||||
|
|
||||||
model() {
|
model() {
|
||||||
return Ember.RSVP.hash({
|
return Ember.RSVP.hash({
|
||||||
drivers: this.get('userStore').findAll('machinedriver', null, {forceReload: true}),
|
drivers: this.get('userStore').findAllUnremoved('machinedriver', null, {forceReload: true}),
|
||||||
catalogDrivers: this.get('catalog').fetchTemplates({templateBase: 'machine', category: 'all', allowFailure: true}),
|
catalogDrivers: this.get('catalog').fetchTemplates({templateBase: 'machine', category: 'all', allowFailure: true}),
|
||||||
}).then((hash) => {
|
}).then((hash) => {
|
||||||
return hash;
|
return hash;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="catalog-icon r-mb10 {{if (or driver.builtin driver.hasBuiltinUi) driver.iconMapFromConstants 'generic'}}"/>
|
<div class="catalog-icon r-mb10 {{if (or driver.builtin driver.hasBuiltinUi) driver.iconMapFromConstants 'generic'}}"/>
|
||||||
{{else if (eq section 'footer')}}
|
{{else if (eq section 'footer')}}
|
||||||
{{#if driver.externalId}}
|
{{#if (and driver.externalId (not-eq driver.state 'inactive'))}}
|
||||||
{{upgrade-dropdown model=driver btnClass="btn-sm" currentId=driver.externalId upgradeOnly=false changeVersion=(action "upgradeDriver" driver)}}
|
{{upgrade-dropdown model=driver btnClass="btn-sm" currentId=driver.externalId upgradeOnly=false changeVersion=(action "upgradeDriver" driver)}}
|
||||||
{{else if driver.builtin}}
|
{{else if driver.builtin}}
|
||||||
<span class="text-muted">{{t 'machinePage.builtin'}}</span>
|
<span class="text-muted">{{t 'machinePage.builtin'}}</span>
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,9 @@ export default Ember.Component.extend({
|
||||||
return out;
|
return out;
|
||||||
}.property('field','resourceType','schemas.[]'),
|
}.property('field','resourceType','schemas.[]'),
|
||||||
|
|
||||||
valueChanged: function() {
|
valueChanged: Ember.observer('value', function() {
|
||||||
this.get('resource').set(this.get('field'), this.get('value'));
|
Ember.run.schedule('afterRender', () => {
|
||||||
}.observes('value'),
|
this.get('resource').set(this.get('field'), this.get('value'));
|
||||||
|
});
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,6 @@
|
||||||
<span class="form-static-control">{{selectedChoice.name}}</span>
|
<span class="form-static-control">{{selectedChoice.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
|
||||||
{{t 'formScheduling.noRules'}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
@ -115,6 +113,8 @@
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
{{else}}
|
||||||
|
{{t 'formScheduling.noRules'}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -72,12 +72,21 @@ export default Ember.Component.extend(Driver, {
|
||||||
return false;
|
return false;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
ipChoiceObserver: Ember.observer('publicIpChoice', function() {
|
||||||
|
let publicIpChoice = this.get('publicIpChoice');
|
||||||
|
if (this.get('publicIpChoices').findBy('value', publicIpChoice).name === 'None') {
|
||||||
|
this.set('azureConfig.usePrivateIp', true);
|
||||||
|
} else {
|
||||||
|
this.set('azureConfig.usePrivateIp', false);
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
|
||||||
setUsePrivateIp: Ember.computed('publicIpChoice', function() {
|
setUsePrivateIp: Ember.computed('publicIpChoice', function() {
|
||||||
let publicIpChoice = this.get('publicIpChoice');
|
let publicIpChoice = this.get('publicIpChoice');
|
||||||
if (publicIpChoice && this.get('publicIpChoices').findBy('value', publicIpChoice).name === 'None') {
|
if (publicIpChoice && this.get('publicIpChoices').findBy('value', publicIpChoice).name === 'None') {
|
||||||
return this.set('azureConfig.usePrivateIp', true);
|
return this.set('azureConfig.usePrivateIp', true);
|
||||||
}
|
}
|
||||||
return this.set('azureConfig.usePrivateIp', false);
|
return false;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
publicIpObserver: Ember.observer('publicIpChoice', function() {
|
publicIpObserver: Ember.observer('publicIpChoice', function() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-muted" style="font-size: 12px;">
|
<div class="text-muted" style="font-size: 12px;">
|
||||||
{{t 'modalConfirmDeactiviate.protip' alternateLabel=alternateLabel isServiceButton=isService.button}}
|
{{t 'modalConfirmDeactiviate.protip' alternateLabel=alternateLabel isServiceButton=isService.button}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer-actions">
|
<div class="footer-actions">
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import Ember from 'ember';
|
||||||
|
import ModalBase from 'lacsso/components/modal-base';
|
||||||
|
import { alternateLabel } from 'ui/utils/platform';
|
||||||
|
|
||||||
|
const TIMEOUT = 10;
|
||||||
|
export default ModalBase.extend({
|
||||||
|
classNames: ['lacsso', 'modal-container', 'full-width-modal'],
|
||||||
|
originalModel: Ember.computed.alias('modalService.modalOpts.model'),
|
||||||
|
inputTimeout: null,
|
||||||
|
alternateLabel: alternateLabel,
|
||||||
|
defaultTimeout: TIMEOUT,
|
||||||
|
actions: {
|
||||||
|
stop: function() {
|
||||||
|
this.get('originalModel').doAction('stop', { timeout: (this.get('inputTimeout') || TIMEOUT) });
|
||||||
|
this.send('cancel');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<h4>{{t 'modalContainerStop.header'}}</h4>
|
||||||
|
|
||||||
|
<div style="margin: 30px 10px;">
|
||||||
|
<h3>{{originalModel.displayName}}</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row form-group">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
{{t 'modalContainerStop.helpText' defaultTimeout=defaultTimeout}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row form-group">
|
||||||
|
<div class="col-sm-12 col-md-2 form-label">
|
||||||
|
<label class="form-control-static">{{t 'modalContainerStop.label'}}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-8">
|
||||||
|
{{input type="text" value=inputTimeout classNames="form-control" placeholder=(t 'modalContainerStop.placeholder')}}
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-8 col-md-offset-2 text-muted" style="font-size: 12px;">
|
||||||
|
{{t 'modalContainerStop.protip' alternateLabel=alternateLabel}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="footer-actions">
|
||||||
|
<button {{action "stop"}} class="btn btn-danger">{{t 'modalContainerStop.button'}}</button>
|
||||||
|
<button {{action "cancel"}} class="btn btn-primary">{{t 'generic.closeModal'}}</button>
|
||||||
|
</div>
|
||||||
|
|
@ -3,5 +3,5 @@ import ModalBase from 'lacsso/components/modal-base';
|
||||||
|
|
||||||
export default ModalBase.extend({
|
export default ModalBase.extend({
|
||||||
classNames: ['lacsso', 'modal-container', 'full-width-modal', 'modal-shell'],
|
classNames: ['lacsso', 'modal-container', 'full-width-modal', 'modal-shell'],
|
||||||
originalModel: Ember.computed.alias('modalService.modalOpts'),
|
originalModel: Ember.computed.alias('modalService.modalOpts.model'),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -127,9 +127,7 @@ export default Ember.Component.extend(NewOrEdit, Sortable, {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
return this.get('project').doAction('setmembers',{members: members}).then(() => {
|
return this.get('project').doAction('setmembers',{members: members});
|
||||||
return this.saveStacks();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{{form-networking
|
{{form-networking
|
||||||
editing=false
|
editing=false
|
||||||
instance=model.container
|
instance=model.container
|
||||||
initialLabels=model.labels
|
initialLabels=model.container.labels
|
||||||
allHosts=model.hosts
|
allHosts=model.hosts
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@
|
||||||
{{info-multi-stats model=host linkName="hostStats" single=true}}
|
{{info-multi-stats model=host linkName="hostStats" single=true}}
|
||||||
</div>
|
</div>
|
||||||
<div class="row r-p15">
|
<div class="row r-p15">
|
||||||
<ul class="nav nav-tabs nav-tabs-well shadowed" role="tablist" style="display:inline-block;">
|
<ul class="nav nav-tabs nav-tabs-well shadowed" role="tablist">
|
||||||
{{#link-to "host.containers" tagName="li" href=false}}<a href="#"><i class="icon icon-box"></i> {{t 'hostsPage.hostPage.navTabs.containers'}}</a>{{/link-to}}
|
{{#link-to "host.containers" tagName="li" href=false}}<a href="#"><i class="icon icon-box"></i> {{t 'hostsPage.hostPage.navTabs.containers'}}</a>{{/link-to}}
|
||||||
{{#link-to "host.ports" tagName="li" href=false}}<a href="#"><i class="icon icon-share"></i> {{t 'hostsPage.hostPage.navTabs.ports'}}</a>{{/link-to}}
|
{{#link-to "host.ports" tagName="li" href=false}}<a href="#"><i class="icon icon-share"></i> {{t 'hostsPage.hostPage.navTabs.ports'}}</a>{{/link-to}}
|
||||||
{{#link-to "host.labels" tagName="li" href=false}}<a href="#"><i class="icon icon-tag"></i> {{t 'hostsPage.hostPage.navTabs.labels'}}</a>{{/link-to}}
|
{{#link-to "host.labels" tagName="li" href=false}}<a href="#"><i class="icon icon-tag"></i> {{t 'hostsPage.hostPage.navTabs.labels'}}</a>{{/link-to}}
|
||||||
|
|
|
||||||
|
|
@ -67,12 +67,21 @@ var Container = Instance.extend({
|
||||||
return this.doAction('start');
|
return this.doAction('start');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
promptStop: function() {
|
||||||
|
this.get('modalService').toggleModal('modal-container-stop', {
|
||||||
|
model: this
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
stop: function() {
|
stop: function() {
|
||||||
return this.doAction('stop');
|
this.doAction('stop');
|
||||||
},
|
},
|
||||||
|
|
||||||
shell: function() {
|
shell: function() {
|
||||||
this.get('modalService').toggleModal('modal-shell', this);
|
this.get('modalService').toggleModal('modal-shell', {
|
||||||
|
model: this,
|
||||||
|
escToClose: false,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
popoutShell: function() {
|
popoutShell: function() {
|
||||||
|
|
@ -124,7 +133,7 @@ var Container = Instance.extend({
|
||||||
var choices = [
|
var choices = [
|
||||||
{ label: 'action.restart', icon: 'icon icon-refresh', action: 'restart', enabled: !!a.restart },
|
{ label: 'action.restart', icon: 'icon icon-refresh', action: 'restart', enabled: !!a.restart },
|
||||||
{ label: 'action.start', icon: 'icon icon-play', action: 'start', enabled: !!a.start },
|
{ label: 'action.start', icon: 'icon icon-play', action: 'start', enabled: !!a.start },
|
||||||
{ label: 'action.stop', icon: 'icon icon-stop', action: 'stop', enabled: !!a.stop },
|
{ label: 'action.stop', icon: 'icon icon-stop', action: 'promptStop', enabled: !!a.stop, altAction: 'stop' },
|
||||||
{ label: 'action.remove', icon: 'icon icon-trash', action: 'promptDelete', enabled: this.get('canDelete'), altAction: 'delete' },
|
{ label: 'action.remove', icon: 'icon icon-trash', action: 'promptDelete', enabled: this.get('canDelete'), altAction: 'delete' },
|
||||||
{ label: 'action.purge', icon: '', action: 'purge', enabled: !!a.purge },
|
{ label: 'action.purge', icon: '', action: 'purge', enabled: !!a.purge },
|
||||||
{ divider: true },
|
{ divider: true },
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,18 @@
|
||||||
alias=link.name
|
alias=link.name
|
||||||
}}
|
}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{t (if (eq link.service.stackId model.stackId) 'serviceLink.withAlias.sameStack' 'serviceLink.withAlias.differentStack')
|
{{#if link.name}}
|
||||||
stack=link.service.displayStack
|
{{t (if (eq link.service.stackId model.stackId) 'serviceLink.withAlias.sameStack' 'serviceLink.withAlias.differentStack')
|
||||||
service=link.service.displayName
|
stack=link.service.displayStack
|
||||||
alias=link.name
|
service=link.service.displayName
|
||||||
}}
|
alias=link.name
|
||||||
|
}}
|
||||||
|
{{else}}
|
||||||
|
{{t (if (eq link.service.stackId model.stackId) 'serviceLink.noAlias.sameStack' 'serviceLink.noAlias.differentStack')
|
||||||
|
stack=link.service.displayStack
|
||||||
|
service=link.service.displayName
|
||||||
|
}}
|
||||||
|
{{/if}}
|
||||||
{{/if}}</li>
|
{{/if}}</li>
|
||||||
{{else}}
|
{{else}}
|
||||||
<li class="text-muted">{{t 'servicePage.linksTab.noData'}}</li>
|
<li class="text-muted">{{t 'servicePage.linksTab.noData'}}</li>
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@ $singleCountWidth : 120px;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 3;
|
z-index: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.node {
|
.node {
|
||||||
|
|
|
||||||
|
|
@ -2171,6 +2171,9 @@ inputCertificate:
|
||||||
certChain:
|
certChain:
|
||||||
label: Chain Certs
|
label: Chain Certs
|
||||||
placeholder: "Optional; Paste in the additional chained certificates, starting with -----BEGIN CERTIFICATE-----"
|
placeholder: "Optional; Paste in the additional chained certificates, starting with -----BEGIN CERTIFICATE-----"
|
||||||
|
metaXML:
|
||||||
|
label: Metadata XML
|
||||||
|
placeholder: "Paste in the IDP Metadata XML"
|
||||||
|
|
||||||
inputIdentity:
|
inputIdentity:
|
||||||
placeholder:
|
placeholder:
|
||||||
|
|
@ -2694,6 +2697,14 @@ modalAuditlogInfo:
|
||||||
request: "Request Object:"
|
request: "Request Object:"
|
||||||
response: "Response Object:"
|
response: "Response Object:"
|
||||||
|
|
||||||
|
modalContainerStop:
|
||||||
|
header: Are you sure you want to stop
|
||||||
|
helpText: You can provide a stop timer or use the default {defaultTimeout} seconds.
|
||||||
|
protip: "ProTip: Hold the {alternateLabel} key while clicking stop to bypass this confirmation."
|
||||||
|
label: Stop Timer
|
||||||
|
placeholder: '10'
|
||||||
|
button: Stop
|
||||||
|
|
||||||
modalConfirmDeactiviate:
|
modalConfirmDeactiviate:
|
||||||
header: Are you sure you want to
|
header: Are you sure you want to
|
||||||
protip: "ProTip: Hold the {alternateLabel} key while clicking {isServiceButton} to bypass this confirmation."
|
protip: "ProTip: Hold the {alternateLabel} key while clicking {isServiceButton} to bypass this confirmation."
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue