2018-10-18 02:18:29 +03:00
|
|
|
import Controller from '@ember/controller';
|
|
|
|
import {alias} from '@ember/object/computed';
|
2021-04-28 10:29:25 +03:00
|
|
|
import {computed} from '@ember/object';
|
2018-10-18 02:18:29 +03:00
|
|
|
|
|
|
|
export default Controller.extend({
|
2021-04-28 10:29:25 +03:00
|
|
|
integration: alias('model.integration'),
|
|
|
|
hostLimitError: alias('model.hostLimitError'),
|
|
|
|
|
|
|
|
showUpgradeModal: computed('hostLimitError', function () {
|
|
|
|
if (this.hostLimitError) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}),
|
2018-10-18 02:18:29 +03:00
|
|
|
|
|
|
|
actions: {
|
|
|
|
save() {
|
|
|
|
return this.integration.save();
|
|
|
|
},
|
|
|
|
|
|
|
|
cancel() {
|
|
|
|
// 'new' route's dectivate hook takes care of rollback
|
2021-01-28 18:25:21 +03:00
|
|
|
this.transitionToRoute('integrations');
|
2018-10-18 02:18:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|