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,
|
||||
disableAuth : true,
|
||||
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'),
|
||||
|
||||
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'),
|
||||
actions: {
|
||||
disable: function() {
|
||||
|
|
|
|||
|
|
@ -43,9 +43,7 @@ export default Ember.Controller.extend(Sortable, {
|
|||
|
||||
let newDriver = this.createNewDriver(driver);
|
||||
|
||||
this.get('userStore').createRecord(newDriver).save().then((result) => {
|
||||
this.get('model.drivers').pushObject(result);
|
||||
}).catch((err) => {
|
||||
this.get('userStore').createRecord(newDriver).save().catch((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
|
||||
let cDrivers = this.get('model.catalogDrivers.catalog');
|
||||
let drivers = this.get('model.drivers.content');
|
||||
|
|
@ -102,5 +100,4 @@ export default Ember.Controller.extend(Sortable, {
|
|||
newContent = newContent.concat(drivers);
|
||||
return newContent;
|
||||
}),
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ export default Ember.Route.extend({
|
|||
|
||||
model() {
|
||||
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}),
|
||||
}).then((hash) => {
|
||||
return hash;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
</div>
|
||||
<div class="catalog-icon r-mb10 {{if (or driver.builtin driver.hasBuiltinUi) driver.iconMapFromConstants 'generic'}}"/>
|
||||
{{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)}}
|
||||
{{else if driver.builtin}}
|
||||
<span class="text-muted">{{t 'machinePage.builtin'}}</span>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,9 @@ export default Ember.Component.extend({
|
|||
return out;
|
||||
}.property('field','resourceType','schemas.[]'),
|
||||
|
||||
valueChanged: function() {
|
||||
this.get('resource').set(this.get('field'), this.get('value'));
|
||||
}.observes('value'),
|
||||
valueChanged: Ember.observer('value', function() {
|
||||
Ember.run.schedule('afterRender', () => {
|
||||
this.get('resource').set(this.get('field'), this.get('value'));
|
||||
});
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -61,8 +61,6 @@
|
|||
<span class="form-static-control">{{selectedChoice.name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{t 'formScheduling.noRules'}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
|
|
@ -115,6 +113,8 @@
|
|||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
{{t 'formScheduling.noRules'}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -72,12 +72,21 @@ export default Ember.Component.extend(Driver, {
|
|||
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() {
|
||||
let publicIpChoice = this.get('publicIpChoice');
|
||||
if (publicIpChoice && this.get('publicIpChoices').findBy('value', publicIpChoice).name === 'None') {
|
||||
return this.set('azureConfig.usePrivateIp', true);
|
||||
}
|
||||
return this.set('azureConfig.usePrivateIp', false);
|
||||
return false;
|
||||
}),
|
||||
|
||||
publicIpObserver: Ember.observer('publicIpChoice', function() {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
</div>
|
||||
|
||||
<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 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({
|
||||
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.saveStacks();
|
||||
});
|
||||
return this.get('project').doAction('setmembers',{members: members});
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{{form-networking
|
||||
editing=false
|
||||
instance=model.container
|
||||
initialLabels=model.labels
|
||||
initialLabels=model.container.labels
|
||||
allHosts=model.hosts
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@
|
|||
{{info-multi-stats model=host linkName="hostStats" single=true}}
|
||||
</div>
|
||||
<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.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}}
|
||||
|
|
|
|||
|
|
@ -67,12 +67,21 @@ var Container = Instance.extend({
|
|||
return this.doAction('start');
|
||||
},
|
||||
|
||||
promptStop: function() {
|
||||
this.get('modalService').toggleModal('modal-container-stop', {
|
||||
model: this
|
||||
});
|
||||
},
|
||||
|
||||
stop: function() {
|
||||
return this.doAction('stop');
|
||||
this.doAction('stop');
|
||||
},
|
||||
|
||||
shell: function() {
|
||||
this.get('modalService').toggleModal('modal-shell', this);
|
||||
this.get('modalService').toggleModal('modal-shell', {
|
||||
model: this,
|
||||
escToClose: false,
|
||||
});
|
||||
},
|
||||
|
||||
popoutShell: function() {
|
||||
|
|
@ -124,7 +133,7 @@ var Container = Instance.extend({
|
|||
var choices = [
|
||||
{ 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.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.purge', icon: '', action: 'purge', enabled: !!a.purge },
|
||||
{ divider: true },
|
||||
|
|
|
|||
|
|
@ -8,11 +8,18 @@
|
|||
alias=link.name
|
||||
}}
|
||||
{{else}}
|
||||
{{t (if (eq link.service.stackId model.stackId) 'serviceLink.withAlias.sameStack' 'serviceLink.withAlias.differentStack')
|
||||
stack=link.service.displayStack
|
||||
service=link.service.displayName
|
||||
alias=link.name
|
||||
}}
|
||||
{{#if link.name}}
|
||||
{{t (if (eq link.service.stackId model.stackId) 'serviceLink.withAlias.sameStack' 'serviceLink.withAlias.differentStack')
|
||||
stack=link.service.displayStack
|
||||
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>
|
||||
{{else}}
|
||||
<li class="text-muted">{{t 'servicePage.linksTab.noData'}}</li>
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ $singleCountWidth : 120px;
|
|||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 3;
|
||||
z-index: 1;
|
||||
overflow: hidden;
|
||||
|
||||
.node {
|
||||
|
|
|
|||
|
|
@ -2171,6 +2171,9 @@ inputCertificate:
|
|||
certChain:
|
||||
label: Chain Certs
|
||||
placeholder: "Optional; Paste in the additional chained certificates, starting with -----BEGIN CERTIFICATE-----"
|
||||
metaXML:
|
||||
label: Metadata XML
|
||||
placeholder: "Paste in the IDP Metadata XML"
|
||||
|
||||
inputIdentity:
|
||||
placeholder:
|
||||
|
|
@ -2694,6 +2697,14 @@ modalAuditlogInfo:
|
|||
request: "Request 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:
|
||||
header: Are you sure you want to
|
||||
protip: "ProTip: Hold the {alternateLabel} key while clicking {isServiceButton} to bypass this confirmation."
|
||||
|
|
|
|||
Loading…
Reference in New Issue