mirror of https://github.com/rancher/ui.git
Merge pull request #4213 from westlywright/upgrade.dependencies.2.5.1
Upgrade Ember & Dependencies for LTS support >3.12
This commit is contained in:
commit
2ff05e1d77
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
root = true
|
||||
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
|
|
|
|||
112
.eslintrc.js
112
.eslintrc.js
|
|
@ -1,3 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
const propertyOrder = [
|
||||
'service',
|
||||
'controller',
|
||||
|
|
@ -31,7 +33,8 @@ module.exports = {
|
|||
parserOptions: {
|
||||
ecmaVersion: 2018,
|
||||
sourceType: 'module',
|
||||
allowImportExportEverywhere: true
|
||||
allowImportExportEverywhere: true,
|
||||
ecmaFeatures: { legacyDecorators: true }
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
|
|
@ -57,57 +60,64 @@ module.exports = {
|
|||
},
|
||||
rules: {
|
||||
// Overrides
|
||||
'curly': 'error',
|
||||
'dot-notation': 'off',
|
||||
'ember/alias-model-in-controller': 'off',
|
||||
'ember/avoid-leaking-state-in-ember-objects': 'off',
|
||||
'ember/closure-actions': 'off',
|
||||
'ember/jquery-ember-run': 'off',
|
||||
'ember/named-functions-in-promises': 'off',
|
||||
'ember/no-capital-letters-in-routes': 'off',
|
||||
'ember/no-function-prototype-extensions': 'off',
|
||||
'ember/no-observers': 'off',
|
||||
'ember/no-on-calls-in-components': 'off',
|
||||
'ember/no-side-effects': 'off',
|
||||
'ember/no-old-shims': 'error',
|
||||
'ember/order-in-components': ['error', { order: propertyOrder }],
|
||||
'ember/order-in-controllers': ['error', { order: propertyOrder }],
|
||||
'ember/order-in-models': ['error', { order: propertyOrder }],
|
||||
'ember/order-in-routes': ['error', { order: propertyOrder }],
|
||||
'ember/use-brace-expansion': 'off',
|
||||
'ember/use-ember-get-and-set': 'off',
|
||||
'ember/new-module-imports': 'error',
|
||||
'eqeqeq': 'error',
|
||||
'generator-star-spacing': 'off',
|
||||
'guard-for-in': 'off',
|
||||
'linebreak-style': 'off',
|
||||
'new-cap': 'off',
|
||||
'no-caller': 'error',
|
||||
'no-cond-assign': ['error', 'except-parens'],
|
||||
'no-console': 'off',
|
||||
'no-debugger': 'warn',
|
||||
'no-empty': 'off',
|
||||
'no-eq-null': 'error',
|
||||
'no-eval': 'error',
|
||||
'no-extra-boolean-cast': 'off',
|
||||
'no-new': 'off',
|
||||
'no-plusplus': 'off',
|
||||
'no-undef': 'error',
|
||||
'no-unused-vars': 'warn',
|
||||
'no-useless-escape': 'off',
|
||||
'no-self-assign': 'off',
|
||||
'strict': 'off',
|
||||
'wrap-iife': 'off',
|
||||
'curly': 'error',
|
||||
'dot-notation': 'off',
|
||||
'ember/alias-model-in-controller': 'off',
|
||||
'ember/avoid-leaking-state-in-ember-objects': 'off',
|
||||
'ember/closure-actions': 'off',
|
||||
'ember/jquery-ember-run': 'off',
|
||||
'ember/named-functions-in-promises': 'off',
|
||||
'ember/no-capital-letters-in-routes': 'off',
|
||||
'ember/no-function-prototype-extensions': 'off',
|
||||
'ember/no-observers': 'off',
|
||||
'ember/no-on-calls-in-components': 'off',
|
||||
'ember/no-side-effects': 'off',
|
||||
'ember/no-old-shims': 'error',
|
||||
'ember/order-in-components': ['error', { order: propertyOrder }],
|
||||
'ember/order-in-controllers': ['error', { order: propertyOrder }],
|
||||
'ember/order-in-models': ['error', { order: propertyOrder }],
|
||||
'ember/order-in-routes': ['error', { order: propertyOrder }],
|
||||
'ember/use-brace-expansion': 'off',
|
||||
'ember/use-ember-get-and-set': 'off',
|
||||
'ember/new-module-imports': 'error',
|
||||
// >3.12
|
||||
'ember/no-new-mixins': 'off', // https://discuss.emberjs.com/t/best-way-to-replace-mixins/17395/2
|
||||
'ember/no-arrow-function-computed-properties': ['error', { onlyThisContexts: true }],
|
||||
'ember/no-get': 'off',
|
||||
'ember/no-jquery': 'off',
|
||||
'ember/no-mixins': 'off',
|
||||
'no-prototype-builtins': 'off',
|
||||
'eqeqeq': 'error',
|
||||
'generator-star-spacing': 'off',
|
||||
'guard-for-in': 'off',
|
||||
'linebreak-style': 'off',
|
||||
'new-cap': 'off',
|
||||
'no-caller': 'error',
|
||||
'no-cond-assign': ['error', 'except-parens'],
|
||||
'no-console': 'off',
|
||||
'no-debugger': 'warn',
|
||||
'no-empty': 'off',
|
||||
'no-eq-null': 'error',
|
||||
'no-eval': 'error',
|
||||
'no-extra-boolean-cast': 'off',
|
||||
'no-new': 'off',
|
||||
'no-plusplus': 'off',
|
||||
'no-undef': 'error',
|
||||
'no-unused-vars': 'warn',
|
||||
'no-useless-escape': 'off',
|
||||
'no-self-assign': 'off',
|
||||
'strict': 'off',
|
||||
'wrap-iife': 'off',
|
||||
// stylistic
|
||||
'array-bracket-spacing': 'error',
|
||||
'padded-blocks': ['error', 'never'],
|
||||
'block-spacing': ['error', 'always'],
|
||||
'brace-style': ['error', '1tbs'],
|
||||
'comma-spacing': 'error',
|
||||
'func-call-spacing': ['error', 'never'],
|
||||
'implicit-arrow-linebreak': 'error',
|
||||
'indent': ['error', 2],
|
||||
'key-spacing': ['error', {
|
||||
'array-bracket-spacing': 'error',
|
||||
'padded-blocks': ['error', 'never'],
|
||||
'block-spacing': ['error', 'always'],
|
||||
'brace-style': ['error', '1tbs'],
|
||||
'comma-spacing': 'error',
|
||||
'func-call-spacing': ['error', 'never'],
|
||||
'implicit-arrow-linebreak': 'error',
|
||||
'indent': ['error', 2],
|
||||
'key-spacing': ['error', {
|
||||
'align': {
|
||||
'beforeColon': false,
|
||||
'afterColon': true,
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
extends: 'recommended',
|
||||
extends: 'recommended', // octane???
|
||||
|
||||
rules: {
|
||||
'attribute-indentation': false,
|
||||
'block-indentation': false,
|
||||
'deprecated-render-helper': false,
|
||||
'img-alt-attributes': false,
|
||||
'require-valid-alt-text': false,
|
||||
'linebreak-style': false,
|
||||
'link-rel-noopener': false,
|
||||
'link-href-attributes': false,
|
||||
'no-attrs-in-components': false,
|
||||
'no-bare-strings': false,
|
||||
'no-debugger': false,
|
||||
|
|
@ -19,6 +20,8 @@ module.exports = {
|
|||
'no-input-block': false,
|
||||
'no-input-tagname': false,
|
||||
'no-invalid-interactive': false,
|
||||
'no-invalid-role': false,
|
||||
'no-positive-tabindex': false,
|
||||
'no-log': false,
|
||||
'no-nested-interactive': false,
|
||||
'no-outlet-outside-routes': false,
|
||||
|
|
|
|||
21
app/app.js
21
app/app.js
|
|
@ -1,13 +1,16 @@
|
|||
import Application from '@ember/application';
|
||||
import Resolver from './resolver';
|
||||
import Resolver from 'ember-resolver';
|
||||
import loadInitializers from 'ember-load-initializers';
|
||||
import config from './config/environment';
|
||||
|
||||
const App = Application.extend({
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix,
|
||||
Resolver,
|
||||
engines: {
|
||||
export default class App extends Application {
|
||||
modulePrefix = config.modulePrefix;
|
||||
|
||||
podModulePrefix = config.podModulePrefix;
|
||||
|
||||
Resolver = Resolver;
|
||||
|
||||
engines = {
|
||||
login: {
|
||||
dependencies: {
|
||||
services: [
|
||||
|
|
@ -232,9 +235,7 @@ const App = Application.extend({
|
|||
externalRoutes: { 'authenticated.cluster.istio.cluster-setting': 'authenticated.cluster.istio.cluster-setting', }
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
loadInitializers(App, config.modulePrefix);
|
||||
|
||||
export default App;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default Controller.extend({
|
|||
router: service(),
|
||||
|
||||
// GitHub auth params
|
||||
queryParams: ['isPopup', 'fromAuthProvider'],
|
||||
queryParams: ['isPopup', 'fromAuthProvider'],
|
||||
|
||||
error: null,
|
||||
error_description: null,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export default Controller.extend({
|
|||
|
||||
tags: alias('projectController.tags'),
|
||||
templatesObsvr: observer('model.apps.[]', function() {
|
||||
once(() => this.get('catalog').fetchAppTemplates(get(this, 'model.apps')));
|
||||
once(this, 'fetchCatalogResources');
|
||||
}),
|
||||
|
||||
filteredApps: computed('model.apps.@each.{type,isFromCatalog,tags,state}', 'tags', 'searchText', function() {
|
||||
|
|
@ -47,4 +47,9 @@ export default Controller.extend({
|
|||
|
||||
return group;
|
||||
}),
|
||||
|
||||
fetchCatalogResources() {
|
||||
this.catalog.fetchAppTemplates(get(this, 'model.apps'));
|
||||
},
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<section class="header clearfix">
|
||||
<div class="right-buttons">
|
||||
<button class="btn btn-sm bg-primary" {{action "newApikey" "account"}}>{{t 'apiPage.actionButton'}}</button>
|
||||
<button class="btn btn-sm bg-primary" type="button" {{action "newApikey" "account"}}>{{t 'apiPage.actionButton'}}</button>
|
||||
</div>
|
||||
|
||||
<h1>{{t 'apiPage.header'}}</h1>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
{{error-sub-row fullColspan=sortable.fullColspan model=backup}}
|
||||
{{/if}}
|
||||
{{else if (eq kind "right-actions")}}
|
||||
<button style="margin-left: -5px;" class="btn btn-sm bg-primary pl-40 pr-40" {{action "snapshotNow"}}>
|
||||
<button style="margin-left: -5px;" class="btn btn-sm bg-primary pl-40 pr-40" type="button" {{action "snapshotNow"}}>
|
||||
{{t 'action.backupEtcd'}}
|
||||
</button>
|
||||
{{else if (eq kind "norows")}}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ export default Controller.extend({
|
|||
}
|
||||
};
|
||||
}),
|
||||
clusterScans: computed('model.clusterScans.@each', function() {
|
||||
clusterScans: computed('model.clusterScans.[]', 'scope.currentCluster.id', function() {
|
||||
return get(this, 'model.clusterScans').filterBy('clusterId', get(this, 'scope.currentCluster.id'));
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export default Controller.extend({
|
|||
}
|
||||
},
|
||||
|
||||
tests: computed('model.scan.report', 'securityScanConfig.skipList', function() {
|
||||
tests: computed('model.nodes', 'model.scan.report.results', 'securityScanConfig.skipList', function() {
|
||||
const results = get(this, 'model.scan.report.results');
|
||||
|
||||
if (!results) {
|
||||
|
|
@ -100,7 +100,7 @@ export default Controller.extend({
|
|||
|
||||
|
||||
|
||||
clusterScans: computed('model.clusterScans.@each', function() {
|
||||
clusterScans: computed('model.clusterScans.[]', 'scope.currentCluster.id', function() {
|
||||
return get(this, 'model.clusterScans').filterBy('clusterId', get(this, 'scope.currentCluster.id'));
|
||||
}),
|
||||
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@
|
|||
/>
|
||||
{{#if searchText}}
|
||||
<span class="input-group-btn">
|
||||
<button class="btn bg-transparent text-info pl-10 pr-10" {{action "clearSearchText"}}><i class="icon icon-close"></i></button>
|
||||
<button class="btn bg-transparent text-info pl-10 pr-10" type="button" {{action "clearSearchText"}}><i class="icon icon-close"></i></button>
|
||||
</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-sm bg-primary pl-40 pr-40 ml-20" {{action "runScan"}} disabled={{scope.currentCluster.isClusterScanDisabled}}>
|
||||
<button class="btn btn-sm bg-primary pl-40 pr-40 ml-20" disabled={{scope.currentCluster.isClusterScanDisabled}} type="button" {{action "runScan"}}>
|
||||
{{t 'cis.scan.actions.runScan'}}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@
|
|||
<td colspan="{{sortable.fullColspan}}" class="text-center text-muted pt-20 pb-20">{{t 'cis.scan.table.empty'}}</td>
|
||||
</tr>
|
||||
{{else if (eq kind "right-actions")}}
|
||||
<button style="margin-left: -5px;" class="btn btn-sm bg-secondary pl-40 pr-40 mr-5" {{action "setSchedule"}} disabled={{scope.currentCluster.isAddClusterScanScheduleDisabled}}>
|
||||
<button style="margin-left: -5px;" class="btn btn-sm bg-secondary pl-40 pr-40 mr-5" disabled={{scope.currentCluster.isAddClusterScanScheduleDisabled}} type="button" {{action "setSchedule"}}>
|
||||
{{t 'cis.scan.actions.addSchedule'}}
|
||||
</button>
|
||||
<button style="margin-left: -5px;" class="btn btn-sm bg-secondary pl-40 pr-40 mr-5" {{action "setAlert"}} disabled={{scope.currentCluster.isClusterScanDown}}>
|
||||
<button style="margin-left: -5px;" class="btn btn-sm bg-secondary pl-40 pr-40 mr-5" disabled={{scope.currentCluster.isClusterScanDown}} type="button" {{action "setAlert"}}>
|
||||
{{t 'cis.scan.actions.addAlert'}}
|
||||
</button>
|
||||
<button style="margin-left: -5px;" class="btn btn-sm bg-primary pl-40 pr-40" {{action "runScan"}} disabled={{scope.currentCluster.isClusterScanDisabled}}>
|
||||
<button style="margin-left: -5px;" class="btn btn-sm bg-primary pl-40 pr-40" disabled={{scope.currentCluster.isClusterScanDisabled}} type="button" {{action "runScan"}}>
|
||||
{{t 'cis.scan.actions.runScan'}}
|
||||
</button>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export default Controller.extend({
|
|||
},
|
||||
},
|
||||
|
||||
clusterCatalogs: computed('model.clusterCatalogs.@each.{clusterId,state,id}', function() {
|
||||
clusterCatalogs: computed('model.clusterCatalogs.@each.{clusterId,id,state}', 'scope.currentCluster.id', function() {
|
||||
return get(this, 'model.clusterCatalogs').filterBy('clusterId', get(this, 'scope.currentCluster.id'));
|
||||
}),
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<section class="header clearfix">
|
||||
<div class="right-buttons">
|
||||
<button class="btn bg-primary btn-sm" {{action "add"}}>
|
||||
<button class="btn bg-primary btn-sm" type="button" {{action "add"}}>
|
||||
{{t 'catalogSettings.more.addActionLabel'}}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -148,9 +148,7 @@ export default Route.extend({
|
|||
activate() {
|
||||
this._super(...arguments);
|
||||
|
||||
scheduleOnce('afterRender', this, function() {
|
||||
set(this, 'controller.model.activated', true);
|
||||
});
|
||||
scheduleOnce('afterRender', this, 'activateModel');
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
|
@ -163,4 +161,8 @@ export default Route.extend({
|
|||
provider: { refreshModel: true },
|
||||
clusterTemplateRevision: { refreshModel: true }
|
||||
},
|
||||
|
||||
activateModel() {
|
||||
set(this, 'controller.model.activated', true);
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export default Controller.extend({
|
|||
return null;
|
||||
}),
|
||||
|
||||
rows: computed('model.nodes.@each.clusterId', function() {
|
||||
rows: computed('model.cluster.id', 'model.nodes.@each.clusterId', function() {
|
||||
return get(this, 'model.nodes').filterBy('clusterId', get(this, 'model.cluster.id'));
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<section class="header clearfix">
|
||||
<h1 class="pull-left">{{t "nodesPage.header"}}</h1>
|
||||
<div class="right-buttons">
|
||||
<button class="btn bg-primary btn-sm ml-10" {{action "editCluster"}}>
|
||||
<button class="btn bg-primary btn-sm ml-10" type="button" {{action "editCluster"}}>
|
||||
<span>{{t "nodesPage.editCluster"}}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -47,13 +47,11 @@
|
|||
{{#if capabilities.nodePoolsCanScale}}
|
||||
<p class="m-0">
|
||||
<button
|
||||
class="btn btn-xs bg-primary"
|
||||
{{action "scaleDownPool" node.ref.id}}
|
||||
disabled={{lte node.ref.quantity 1}}
|
||||
class="btn btn-xs bg-primary" disabled={{lte node.ref.quantity 1}} type="button" {{action "scaleDownPool" node.ref.id}}
|
||||
>
|
||||
<i class="icon icon-minus icon-fw"/>
|
||||
</button>
|
||||
<button style="margin-left: -5px;" class="btn btn-xs bg-primary" {{action "scaleUpPool" node.ref.id}}>
|
||||
<button style="margin-left: -5px;" class="btn btn-xs bg-primary" type="button" {{action "scaleUpPool" node.ref.id}}>
|
||||
<i class="icon icon-plus icon-fw"/>
|
||||
</button>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<section class="header clearfix">
|
||||
<div class="pull-left pt-10"><h1>{{t 'notifierPage.notifiers'}}</h1></div>
|
||||
<div class="right-buttons">
|
||||
<button class="btn btn-sm bg-primary" {{action "showNewEditModal"}}>{{t 'notifierPage.index.addActionLabel'}}</button>
|
||||
<button class="btn btn-sm bg-primary" type="button" {{action "showNewEditModal"}}>{{t 'notifierPage.index.addActionLabel'}}</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export default Route.extend({
|
|||
clusterStore: service(),
|
||||
scope: service(),
|
||||
|
||||
shortcuts: { 'g': 'toggleGrouping', },
|
||||
shortcuts: { 'g': 'toggleGrouping', },
|
||||
model() {
|
||||
let cluster = this.modelFor('authenticated.cluster');
|
||||
|
||||
|
|
|
|||
|
|
@ -71,28 +71,28 @@ export default Controller.extend(NewOrEdit, {
|
|||
return get(this, 'model.allProjects').filterBy('clusterId', get(this, 'scope.currentCluster.id'))
|
||||
}),
|
||||
|
||||
projectLimit: computed('primaryResource.resourceQuota.{limit}', 'primaryResource.projectId', function() {
|
||||
projectLimit: computed('allProjects', 'primaryResource.projectId', 'primaryResource.resourceQuota.limit', function() {
|
||||
const projectId = get(this, 'primaryResource.projectId');
|
||||
const project = get(this, 'allProjects').findBy('id', projectId);
|
||||
|
||||
return get(project, 'resourceQuota.limit');
|
||||
}),
|
||||
|
||||
projectUsedLimit: computed('primaryResource.resourceQuota.{limit}', 'primaryResource.projectId', function() {
|
||||
projectUsedLimit: computed('allProjects', 'primaryResource.projectId', 'primaryResource.resourceQuota.limit', function() {
|
||||
const projectId = get(this, 'primaryResource.projectId');
|
||||
const project = get(this, 'allProjects').findBy('id', projectId);
|
||||
|
||||
return get(project, 'resourceQuota.usedLimit');
|
||||
}),
|
||||
|
||||
nsDefaultQuota: computed('primaryResource.resourceQuota.{limit}', 'primaryResource.projectId', function() {
|
||||
nsDefaultQuota: computed('allProjects', 'primaryResource.projectId', 'primaryResource.resourceQuota.limit', function() {
|
||||
const projectId = get(this, 'primaryResource.projectId');
|
||||
const project = get(this, 'allProjects').findBy('id', projectId);
|
||||
|
||||
return get(project, 'namespaceDefaultResourceQuota.limit');
|
||||
}),
|
||||
|
||||
nameExists: computed('primaryResource.name', 'model.namespaces.@each.name', function() {
|
||||
nameExists: computed('model.namespaces.@each.name', 'primaryResource.{id,name}', function() {
|
||||
const name = get(this, 'primaryResource.name');
|
||||
|
||||
if ( name ) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
<section class="header clearfix">
|
||||
<div class="right-buttons">
|
||||
<button
|
||||
{{action "importYaml"}}
|
||||
class="btn btn-sm bg-default mr-10"
|
||||
disabled={{rbac-prevents resource="storageclass" scope="cluster" permission="create"}}
|
||||
disabled={{rbac-prevents resource="storageclass" scope="cluster" permission="create"}} type="button" {{action "importYaml"}}
|
||||
>
|
||||
{{t "nav.containers.importCompose"}}
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
<section class="header clearfix">
|
||||
<div class="right-buttons">
|
||||
<button
|
||||
{{action "importYaml"}}
|
||||
class="btn btn-sm bg-default mr-10"
|
||||
disabled={{rbac-prevents resource="persistentvolume" scope="cluster" permission="create"}}
|
||||
disabled={{rbac-prevents resource="persistentvolume" scope="cluster" permission="create"}} type="button" {{action "importYaml"}}
|
||||
>
|
||||
{{t "nav.containers.importCompose"}}
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ export default Controller.extend({
|
|||
isPopup: alias('application.isPopup'),
|
||||
pageScope: alias('scope.currentPageScope'),
|
||||
|
||||
hasHosts: computed.gt('model.hosts.length', 0),
|
||||
|
||||
bootstrap: on('init', function() {
|
||||
schedule('afterRender', this, () => {
|
||||
this.get('application').setProperties({
|
||||
|
|
@ -32,8 +34,4 @@ export default Controller.extend({
|
|||
});
|
||||
}),
|
||||
|
||||
hasHosts: computed('model.hosts.length', function() {
|
||||
return (this.get('model.hosts.length') > 0);
|
||||
}),
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { get } from '@ember/object';
|
|||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default Controller.extend({
|
||||
modal: service(),
|
||||
modal: service(),
|
||||
|
||||
newPassword: null,
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
</div>
|
||||
<div class="row mt-20">
|
||||
<div class="col span-12 text-center">
|
||||
<button class="btn bg-primary" {{action "editPassword"}}>
|
||||
<button class="btn bg-primary" type="button" {{action "editPassword"}}>
|
||||
{{t "userPreferencesPage.generalInfo.password.text"}}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export default Controller.extend({
|
|||
group: alias('projectController.group'),
|
||||
groupTableBy: alias('projectController.groupTableBy'),
|
||||
|
||||
rows: computed('model.configMaps.[].type', function() {
|
||||
rows: computed('model.configMaps.@each.type', function() {
|
||||
return get(this, 'model.configMaps').filterBy('type', 'configMap');
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
{{/tooltip-element}}
|
||||
</div>
|
||||
|
||||
<button {{action 'importYaml'}} class="btn btn-sm bg-default mr-10" disabled={{rbac-prevents resource="configmap" scope="project" permission="create"}}>{{t 'nav.containers.importCompose'}}</button>
|
||||
<button class="btn btn-sm bg-default mr-10" disabled={{rbac-prevents resource="configmap" scope="project" permission="create"}} type="button" {{action 'importYaml'}}>{{t 'nav.containers.importCompose'}}</button>
|
||||
|
||||
{{#link-to "authenticated.project.config-maps.new" classNames="btn btn-sm bg-primary" disabled=(rbac-prevents resource=resource scope="project" permission="create")}}{{t 'configMapsPage.index.linkTo'}}{{/link-to}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export default Route.extend({
|
|||
set(controller, 'containerName', model.containerName);
|
||||
|
||||
if (controller.get('kubernetes')) {
|
||||
defineProperty(controller, 'command', computed('model.pod.labels', function() {
|
||||
defineProperty(controller, 'command', computed('cookies', 'model.pod.labels', function() {
|
||||
var labels = get(this, 'model.pod.labels') || {};
|
||||
|
||||
if ( `${ labels[C.LABEL.K8S_TOKEN] }` === 'true' ) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export default Controller.extend({
|
|||
nodes: null,
|
||||
expandedInstances: null,
|
||||
|
||||
namespaces: alias('scope.currentProject.namespaces'),
|
||||
namespaces: alias('scope.currentProject.namespaces'),
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.set('nodes', this.get('store').all('node'));
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { inject as service } from '@ember/service';
|
|||
import Controller, { inject as controller } from '@ember/controller';
|
||||
|
||||
export default Controller.extend({
|
||||
scope: service(),
|
||||
scope: service(),
|
||||
|
||||
projectController: controller('authenticated.project'),
|
||||
queryParams: ['sortBy'],
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{#containers-header showGroup=false}}
|
||||
<button {{action 'importYaml'}} class="btn btn-sm bg-default mr-10" disabled={{rbac-prevents resource="service" scope="project" permission="create"}}>{{t 'nav.containers.importCompose'}}</button>
|
||||
<button class="btn btn-sm bg-default mr-10" disabled={{rbac-prevents resource="service" scope="project" permission="create"}} type="button" {{action 'importYaml'}}>{{t 'nav.containers.importCompose'}}</button>
|
||||
{{#link-to "authenticated.project.dns.new" scope.currentProject.id class="btn btn-sm bg-primary" disabled=(rbac-prevents resource="service" scope="project" permission="create")}}{{t 'nav.containers.addDns'}}{{/link-to}}
|
||||
{{/containers-header}}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,17 +24,25 @@ export default Controller.extend({
|
|||
}
|
||||
}),
|
||||
|
||||
latestAnnouncement: computed('model.announcements', function() {
|
||||
latestAnnouncement: computed('forumsLink', 'model.announcements.topics', function() {
|
||||
let out = {
|
||||
title: '',
|
||||
link: '',
|
||||
created: '',
|
||||
};
|
||||
|
||||
if (this.get('model.announcements.topics')) {
|
||||
let sorted = this.get('model.announcements.topics').sortBy('id');
|
||||
var announcement = sorted[sorted.length - 1];
|
||||
|
||||
return {
|
||||
out = {
|
||||
title: announcement.title,
|
||||
link: `${ this.get('forumsLink') }/t/${ announcement.slug }`,
|
||||
created: announcement.created_at
|
||||
};
|
||||
}
|
||||
|
||||
return out;
|
||||
}),
|
||||
|
||||
forumsLink: C.EXT_REFERENCES.FORUM,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<h3>{{t 'helpPage.host.header'}}</h3>
|
||||
<hr/>
|
||||
<p>{{t 'helpPage.host.content' appName=settings.appName minVersion=settings.minDockerVersion}} <a href="{{docsLink}}/hosts/" target="_blank">{{t 'helpPage.host.contentLink'}}</a></p>
|
||||
{{#link-to "authenticated.host-templates" class="btn bg-primary"}}{{t 'helpPage.host.addHostLink'}}{{/link-to}}
|
||||
{{!-- {{#link-to "authenticated.host-templates" class="btn bg-primary"}}{{t 'helpPage.host.addHostLink'}}{{/link-to}} --}}
|
||||
</div>
|
||||
|
||||
<div class="col span-4">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { hash } from 'rsvp';
|
|||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default Route.extend({
|
||||
clusterStore: service(),
|
||||
clusterStore: service(),
|
||||
|
||||
model() {
|
||||
const store = get(this, 'store');
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import { inject as service } from '@ember/service';
|
|||
import Controller from '@ember/controller';
|
||||
|
||||
export default Controller.extend({
|
||||
scope: service(),
|
||||
scope: service(),
|
||||
|
||||
sortBy: 'name',
|
||||
sortBy: 'name',
|
||||
|
||||
headers: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
<section class="header clearfix">
|
||||
<div class="right-buttons">
|
||||
<button
|
||||
{{action "importYaml"}}
|
||||
class="btn btn-sm bg-default mr-10"
|
||||
disabled={{rbac-prevents resource="horizontalpodautoscaler" scope="project" permission="create"}}
|
||||
disabled={{rbac-prevents resource="horizontalpodautoscaler" scope="project" permission="create"}} type="button" {{action "importYaml"}}
|
||||
>
|
||||
{{t "nav.containers.importCompose"}}
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import Route from '@ember/routing/route';
|
|||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default Route.extend({
|
||||
clusterStore: service(),
|
||||
clusterStore: service(),
|
||||
|
||||
model(params) {
|
||||
const store = get(this, 'store');
|
||||
|
|
|
|||
|
|
@ -51,14 +51,14 @@ export default Controller.extend({
|
|||
},
|
||||
},
|
||||
|
||||
allNamespace: computed('model.namespaces.[]', function() {
|
||||
allNamespace: computed('model.namespaces.[]', 'scope.currentProject.id', function() {
|
||||
let ns = get(this, 'model.namespaces');
|
||||
let pId = get(this, 'scope.currentProject.id');
|
||||
|
||||
return ns.filter( (n) => get(n, 'projectId') === pId || isEmpty(get(n, 'projectId')));
|
||||
}),
|
||||
|
||||
projectNamespaces: computed('model.namespaces', function() {
|
||||
projectNamespaces: computed('model.namespaces', 'scope.currentProject.id', function() {
|
||||
return get(this, 'model.namespaces').filter( (ns) => get(ns, 'projectId') === get(this, 'scope.currentProject.id'));
|
||||
}),
|
||||
|
||||
|
|
|
|||
|
|
@ -36,11 +36,11 @@ export default Controller.extend({
|
|||
}
|
||||
},
|
||||
|
||||
clusterCatalogs: computed('model.clusterCatalogs.@each.{clusterId,state,id}', function() {
|
||||
clusterCatalogs: computed('model.clusterCatalogs.@each.{clusterId,id,state}', 'scope.currentCluster.id', function() {
|
||||
return get(this, 'model.clusterCatalogs').filterBy('clusterId', get(this, 'scope.currentCluster.id'));
|
||||
}),
|
||||
|
||||
projectCatalogs: computed('model.projectCatalogs.@each.{clusterId,state,id}', function() {
|
||||
projectCatalogs: computed('model.projectCatalogs.@each.{clusterId,id,state}', 'scope.currentProject.id', function() {
|
||||
return get(this, 'model.projectCatalogs').filterBy('projectId', get(this, 'scope.currentProject.id'));
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<section class="header clearfix">
|
||||
<div class="right-buttons">
|
||||
<button class="btn bg-primary btn-sm" {{action "add"}}>
|
||||
<button class="btn bg-primary btn-sm" type="button" {{action "add"}}>
|
||||
{{t 'catalogSettings.more.addActionLabel'}}
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -27,5 +27,5 @@
|
|||
|
||||
|
||||
<div class="footer-actions mt-20">
|
||||
<button {{action "goBack"}} class="btn bg-transparent">{{t 'generic.back'}}</button>
|
||||
<button class="btn bg-transparent" type="button" {{action "goBack"}}>{{t 'generic.back'}}</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export default Controller.extend({
|
|||
group: alias('projectController.group'),
|
||||
groupTableBy: alias('projectController.groupTableBy'),
|
||||
|
||||
rows: computed('model.projectSecrets.[].type', 'model.namespacedSecrets.[].type', function() {
|
||||
rows: computed('model.projectSecrets.@each.type', 'model.namespacedSecrets.@each.type', function() {
|
||||
const proj = get(this, 'model.projectSecrets').filterBy('type', 'secret');
|
||||
const ns = get(this, 'model.namespacedSecrets').filterBy('type', 'namespacedSecret');
|
||||
const out = proj.concat(ns);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export default Route.extend(Preload, {
|
|||
growl: service(),
|
||||
userTheme: service('user-theme'),
|
||||
|
||||
testTimer: null,
|
||||
testTimer: null,
|
||||
|
||||
shortcuts: {
|
||||
// Global
|
||||
|
|
@ -157,21 +157,16 @@ export default Route.extend(Preload, {
|
|||
const version = get(this, 'settings.rancherVersion');
|
||||
const isDev = isDevBuild(version);
|
||||
|
||||
|
||||
if ( get(this, 'access.admin') && (!telemetry || telemetry === 'prompt') ) {
|
||||
// Show the telemetry opt-in if not set
|
||||
scheduleOnce('afterRender', this, function() {
|
||||
get(this, 'modalService').toggleModal('modal-telemetry');
|
||||
});
|
||||
scheduleOnce('afterRender', this.modalService, 'toggleModal', 'modal-telemetry');
|
||||
} else if ( form && !get(this, `prefs.${ C.PREFS.FEEDBACK }`) ) {
|
||||
// Try.rancher feedback
|
||||
scheduleOnce('afterRender', this, function() {
|
||||
get(this, 'modalService').toggleModal('modal-feedback');
|
||||
});
|
||||
scheduleOnce('afterRender', this.modalService, 'toggleModal', 'modal-feedback');
|
||||
} else if ( !isDev && (!seenWhatsNew || compare(seenWhatsNew, C.WHATS_NEW_VERSION) < 0) ) {
|
||||
// What's new
|
||||
scheduleOnce('afterRender', this, function() {
|
||||
get(this, 'modalService').toggleModal('modal-whats-new');
|
||||
});
|
||||
scheduleOnce('afterRender', this.modalService, 'toggleModal', 'modal-whats-new');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export default Route.extend({
|
|||
growl: service(),
|
||||
intl: service(),
|
||||
|
||||
parentRoute: 'catalog-tab',
|
||||
parentRoute: 'catalog-tab',
|
||||
|
||||
model(params, transition) {
|
||||
const { store, clusterStore } = this;
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
import ContentElement from 'ember-basic-dropdown/components/basic-dropdown/content-element';
|
||||
import { get } from '@ember/object';
|
||||
import { next } from '@ember/runloop';
|
||||
|
||||
const CE = ContentElement.extend({
|
||||
click() {
|
||||
this.closeDD();
|
||||
|
||||
return true;
|
||||
},
|
||||
closeDD() {
|
||||
let dd = get(this, 'parentView.dropdown');
|
||||
|
||||
if (get(dd, 'actions')) {
|
||||
next(() => {
|
||||
dd.actions.close();
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
export default CE;
|
||||
|
|
@ -7,7 +7,7 @@ export default Component.extend({
|
|||
scope: service(),
|
||||
|
||||
layout,
|
||||
tagName: '',
|
||||
tagName: '',
|
||||
|
||||
badgeState: computed('model.state', function() {
|
||||
const state = get(this, 'model.state');
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export default Component.extend({
|
|||
get(this, 'model.toggleSkip')()
|
||||
},
|
||||
},
|
||||
isInSkipList: computed('model.skipList.@each', function() {
|
||||
isInSkipList: computed('model.id', 'model.skipList.[]', function() {
|
||||
return get(this, 'model.skipList').indexOf(get(this, 'model.id')) !== -1;
|
||||
}),
|
||||
showSkipButton: computed('model.state', 'isInSkipList', function() {
|
||||
|
|
|
|||
|
|
@ -4,11 +4,9 @@ import { computed } from '@ember/object'
|
|||
|
||||
export default Component.extend({
|
||||
layout,
|
||||
tagName: '',
|
||||
error: computed('model.status.conditions.@each', function() {
|
||||
tagName: '',
|
||||
errorMessage: computed.reads('error.message'),
|
||||
error: computed('model.status.conditions.[]', function() {
|
||||
return this.model.status.conditions.find((condition) => condition.type === 'Failed')
|
||||
}),
|
||||
errorMessage: computed('error.message', function() {
|
||||
return this.error.message;
|
||||
})
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import layout from './template';
|
|||
export default Component.extend({
|
||||
layout,
|
||||
|
||||
limit: null,
|
||||
limit: null,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@
|
|||
{{t 'containerLogs.previous'}}
|
||||
</label>
|
||||
</div>
|
||||
<button {{action "scrollToTop"}} class="btn bg-default">{{t 'containerLogs.scrollTop'}}</button>
|
||||
<button {{action "followLog"}} class="btn bg-default scroll-bottom">{{t 'containerLogs.scrollBottom'}}</button>
|
||||
<button {{action "download"}} class="btn bg-default">{{t 'containerLogs.download'}}</button>
|
||||
<button {{action "clear"}} class="btn bg-default">{{t 'containerLogs.clear'}}</button>
|
||||
<button {{action "cancel"}} class="btn bg-primary">{{t 'generic.closeModal'}}</button>
|
||||
<button class="btn bg-default" type="button" {{action "scrollToTop"}}>{{t 'containerLogs.scrollTop'}}</button>
|
||||
<button class="btn bg-default scroll-bottom" type="button" {{action "followLog"}}>{{t 'containerLogs.scrollBottom'}}</button>
|
||||
<button class="btn bg-default" type="button" {{action "download"}}>{{t 'containerLogs.download'}}</button>
|
||||
<button class="btn bg-default" type="button" {{action "clear"}}>{{t 'containerLogs.clear'}}</button>
|
||||
<button class="btn bg-primary" type="button" {{action "cancel"}}>{{t 'generic.closeModal'}}</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export default Component.extend(Metrics, {
|
|||
|
||||
filters: { resourceType: 'container' },
|
||||
|
||||
projectScope: true,
|
||||
projectScope: true,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ export default Component.extend({
|
|||
|
||||
extraSearchFields: ['displayIp', 'primaryHost.displayName'],
|
||||
|
||||
headers: computed(function() {
|
||||
headers: computed('showNode', 'showStats', function() {
|
||||
if ( this.get('showStats') ) {
|
||||
return headersWithStats;
|
||||
} else if ( this.get('showNode') ) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ const OPTIONS = [
|
|||
];
|
||||
|
||||
export default Component.extend({
|
||||
scope: service(),
|
||||
scope: service(),
|
||||
|
||||
layout,
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
<td>
|
||||
{{#if editing}}
|
||||
<button class="btn bg-primary btn-sm" {{action "remove" metric}}>
|
||||
<button class="btn bg-primary btn-sm" type="button" {{action "remove" metric}}>
|
||||
<i class="icon icon-minus"/><span class="sr-only">{{t 'generic.remove'}}</span>
|
||||
</button>
|
||||
{{/if}}
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
<div>
|
||||
{{#if editing}}
|
||||
<button class="btn bg-link icon-btn p-0" {{action "add"}}>
|
||||
<button class="btn bg-link icon-btn p-0" type="button" {{action "add"}}>
|
||||
<span class="darken"><i class="icon icon-plus text-small"/></span>
|
||||
<span>{{t 'formCustomMetrics.addActionLabel'}}</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -35,10 +35,7 @@ export default Component.extend({
|
|||
initial = lastContainer;
|
||||
}
|
||||
|
||||
scheduleOnce('afterRender', () => {
|
||||
this.send('setInput', initial);
|
||||
this.userInputDidChange();
|
||||
});
|
||||
scheduleOnce('afterRender', this, 'setupComponent', initial);
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
|
@ -92,4 +89,9 @@ export default Component.extend({
|
|||
set(this, 'errors', errors);
|
||||
},
|
||||
|
||||
setupComponent(initial) {
|
||||
this.send('setInput', initial);
|
||||
this.userInputDidChange();
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export default Component.extend({
|
|||
});
|
||||
}
|
||||
},
|
||||
jobConfig: computed('scaleMode', function() {
|
||||
jobConfig: computed('scaleMode', 'workload.cronJobConfig.jobConfig', 'workload.jobConfig', function() {
|
||||
const scaleMode = get(this, 'scaleMode');
|
||||
let config;
|
||||
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@
|
|||
|
||||
<div>
|
||||
{{#if editing}}
|
||||
<button class="btn bg-link icon-btn p-0" {{action "addPort"}}>
|
||||
<button class="btn bg-link icon-btn p-0" type="button" {{action "addPort"}}>
|
||||
<span class="darken">
|
||||
<i class="icon icon-plus text-small"/>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ export default Component.extend({
|
|||
scaleMode: null,
|
||||
editing: true,
|
||||
|
||||
userInput: null,
|
||||
userInput: null,
|
||||
|
||||
canChangeScaleMode: not('isUpgrade'),
|
||||
|
||||
|
|
|
|||
|
|
@ -76,11 +76,11 @@ export default Component.extend({
|
|||
}
|
||||
}),
|
||||
|
||||
selectedChoice: computed('_allNodes.@each.{id,clusterId,name,state}', function() {
|
||||
selectedChoice: computed('_allNodes.@each.{clusterId,id,name,state}', 'hostChoices', 'initialHostId', function() {
|
||||
return get(this, 'hostChoices').findBy('id', get(this, 'initialHostId'));
|
||||
}),
|
||||
|
||||
hostChoices: computed('_allNodes.@each.{id,clusterId,name,state}', function() {
|
||||
hostChoices: computed('_allNodes.@each.{clusterId,id,name,state}', 'scope.currentCluster.id', function() {
|
||||
const list = get(this, '_allNodes').filter((node) => !get(node, 'isUnschedulable'))
|
||||
.filterBy('clusterId', get(this, 'scope.currentCluster.id'))
|
||||
.map((host) => {
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ export default Component.extend({
|
|||
});
|
||||
} else if ( _strategy === 'custom' ) {
|
||||
setProperties(config, {
|
||||
strategy: 'RollingUpdate',
|
||||
strategy: 'RollingUpdate',
|
||||
maxSurge,
|
||||
maxUnavailable
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
</div>
|
||||
{{#if editing}}
|
||||
<div class="col span-2 text-right mt-0">
|
||||
<button class="btn bg-link icon-btn" {{action "remove"}}>
|
||||
<button class="btn bg-link icon-btn" type="button" {{action "remove"}}>
|
||||
<span class="darken"><i class="icon icon-minus text-small"/></span>
|
||||
<span>{{t "formVolumeRow.remove"}}</span>
|
||||
</button>
|
||||
|
|
@ -55,17 +55,17 @@
|
|||
{{t (concat "formVolumeRow.mode." model.mode)}}
|
||||
{{#if editing}}
|
||||
{{#if (eq model.mode "newPvc")}}
|
||||
<button class="btn bg-transparent" {{action "defineNewPvc"}}>
|
||||
<button class="btn bg-transparent" type="button" {{action "defineNewPvc"}}>
|
||||
<i class="icon icon-edit"/>
|
||||
{{t "generic.edit"}}
|
||||
</button>
|
||||
{{else if (eq model.mode "newVolumeClaimTemplate")}}
|
||||
<button class="btn bg-transparent" {{action "defineNewVct"}}>
|
||||
<button class="btn bg-transparent" type="button" {{action "defineNewVct"}}>
|
||||
<i class="icon icon-edit"/>
|
||||
{{t "generic.edit"}}
|
||||
</button>
|
||||
{{else if (or (eq model.mode "existingVolume") (eq model.mode "newVolume"))}}
|
||||
<button class="btn bg-transparent" {{action "defineNewVolume"}}>
|
||||
<button class="btn bg-transparent" type="button" {{action "defineNewVolume"}}>
|
||||
<i class="icon icon-edit"/>
|
||||
{{t "generic.edit"}}
|
||||
</button>
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
</div>
|
||||
{{#if editing}}
|
||||
<div class="col span-2 text-right mt-0">
|
||||
<button class="btn bg-link icon-btn" {{action "remove"}}>
|
||||
<button class="btn bg-link icon-btn" type="button" {{action "remove"}}>
|
||||
<span class="darken"><i class="icon icon-minus text-small"/></span>
|
||||
<span>{{t "formVolumeRow.remove"}}</span>
|
||||
</button>
|
||||
|
|
@ -185,7 +185,7 @@
|
|||
</td>
|
||||
<td>
|
||||
{{#if editing}}
|
||||
<button class="btn bg-primary btn-sm" {{action "removeMount" mnt}}>
|
||||
<button class="btn bg-primary btn-sm" type="button" {{action "removeMount" mnt}}>
|
||||
<i class="icon icon-minus"/>
|
||||
<span class="sr-only">{{t "generic.remove"}}</span>
|
||||
</button>
|
||||
|
|
@ -200,7 +200,7 @@
|
|||
{{/if}}
|
||||
{{#if editing}}
|
||||
<div class="mt-20">
|
||||
<button class="btn bg-link icon-btn" {{action "addMount"}}>
|
||||
<button class="btn bg-link icon-btn" type="button" {{action "addMount"}}>
|
||||
<span class="darken"><i class="icon icon-plus text-small"/></span>
|
||||
<span>{{t "formVolumeRow.addMount"}}</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default Component.extend({
|
|||
editing: true,
|
||||
scaleMode: null,
|
||||
|
||||
volumesArray: null,
|
||||
volumesArray: null,
|
||||
|
||||
nextNum: 1,
|
||||
cluster: alias('scope.currentCluster'),
|
||||
|
|
|
|||
|
|
@ -26,39 +26,33 @@
|
|||
{{t "generic.na"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if editing}}
|
||||
{{#basic-dropdown
|
||||
horizontalPosition="left"
|
||||
as |dd|}}
|
||||
{{#dd.trigger
|
||||
class="btn bg-link p-0 icon-btn pl-10"
|
||||
}}
|
||||
<BasicDropdown @horizontalPosition="left" as |dd|>
|
||||
<dd.Trigger class="btn bg-link p-0 icon-btn pl-10">
|
||||
<span>
|
||||
{{t "formVolumes.add.label"}}
|
||||
</span>
|
||||
<span class="darken">
|
||||
<i class="icon icon-chevron-down"></i>
|
||||
</span>
|
||||
{{/dd.trigger}}
|
||||
|
||||
{{#dd.content}}
|
||||
<li>
|
||||
</dd.Trigger>
|
||||
<dd.Content>
|
||||
<li {{action dd.actions.close}}>
|
||||
<a {{action "addVolume"}}>
|
||||
{{t "formVolumes.add.newVolume"}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li {{action dd.actions.close}}>
|
||||
<a {{action "addNewPvc"}}>
|
||||
{{t "formVolumes.add.newPvc"}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li {{action dd.actions.close}}>
|
||||
<a {{action "addPvc"}}>
|
||||
{{t "formVolumes.add.existingPvc"}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li {{action dd.actions.close}}>
|
||||
<a {{action "addBindMount"}}>
|
||||
{{t "formVolumes.add.bindMount"}}
|
||||
</a>
|
||||
|
|
@ -68,37 +62,36 @@
|
|||
{{t "formVolumes.add.tmpfs"}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li {{action dd.actions.close}}>
|
||||
<a {{action "addSecret"}}>
|
||||
{{t "formVolumes.add.secret"}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li {{action dd.actions.close}}>
|
||||
<a {{action "addConfigMap"}}>
|
||||
{{t "formVolumes.add.configMap"}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li {{action dd.actions.close}}>
|
||||
<a {{action "addCertificate"}}>
|
||||
{{t "formVolumes.add.certificate"}}
|
||||
</a>
|
||||
</li>
|
||||
{{#if (and loggingEnabled (not isWindows))}}
|
||||
<li>
|
||||
<li {{action dd.actions.close}}>
|
||||
<a {{action "addCustomLogPath"}}>
|
||||
{{t "formVolumes.add.customLogPath"}}
|
||||
</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{#if isStatefulSet}}
|
||||
<li>
|
||||
<li {{action dd.actions.close}}>
|
||||
<a {{action "addVolumeClaimTemplate"}}>
|
||||
{{t "formVolumes.add.vct"}}
|
||||
</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/dd.content}}
|
||||
{{/basic-dropdown}}
|
||||
</dd.Content>
|
||||
</BasicDropdown>
|
||||
{{/if}}
|
||||
|
||||
{{/accordion-list-item}}
|
||||
{{/accordion-list-item}}
|
||||
|
|
@ -62,7 +62,7 @@ export default Component.extend(NewOrEdit, ChildHook, {
|
|||
header: '',
|
||||
showTargetOS: false,
|
||||
|
||||
isSidekick: equal('scaleMode', 'sidekick'),
|
||||
isSidekick: equal('scaleMode', 'sidekick'),
|
||||
init() {
|
||||
window.nec = this;
|
||||
this._super(...arguments);
|
||||
|
|
|
|||
|
|
@ -74,21 +74,18 @@
|
|||
<div class="row">
|
||||
<div class="btn-group no-inline-space mt-5">
|
||||
<button
|
||||
class="btn btn-link btn-sm bg-{{if (eq targetOs "all") "primary" "default" }}"
|
||||
{{action "setTargetOs" "all"}}
|
||||
class="btn btn-link btn-sm bg-{{if (eq targetOs "all") "primary" "default" }}" type="button" {{action "setTargetOs" "all"}}
|
||||
>
|
||||
{{t "newContainer.all"}}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-link btn-sm bg-{{if (eq targetOs "linux") "primary" "default" }}"
|
||||
{{action "setTargetOs" "linux"}}
|
||||
class="btn btn-link btn-sm bg-{{if (eq targetOs "linux") "primary" "default" }}" type="button" {{action "setTargetOs" "linux"}}
|
||||
>
|
||||
<i class="icon icon-fw icon-linux"></i>
|
||||
{{t "newContainer.linux"}}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-link btn-sm bg-{{if (eq targetOs "windows") "primary" "default" }}"
|
||||
{{action "setTargetOs" "windows"}}
|
||||
class="btn btn-link btn-sm bg-{{if (eq targetOs "windows") "primary" "default" }}" type="button" {{action "setTargetOs" "windows"}}
|
||||
>
|
||||
<i class="icon icon-fw icon-windows"></i>
|
||||
{{t "newContainer.windows"}}
|
||||
|
|
@ -198,11 +195,11 @@
|
|||
{{t "formHealthCheck.liveness"}}
|
||||
</label>
|
||||
<div class="pull-right text-small">
|
||||
<button class="btn bg-transparent p-0" {{action "toggleSeparateLivenessCheck"}}>{{t "formHealthCheck.combinedLivenessCheck"}}</button>
|
||||
<button class="btn bg-transparent p-0" type="button" {{action "toggleSeparateLivenessCheck"}}>{{t "formHealthCheck.combinedLivenessCheck"}}</button>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="pull-right text-small">
|
||||
<button class="btn bg-transparent p-0" {{action "toggleSeparateLivenessCheck"}}>{{t "formHealthCheck.separateLivenessCheck"}}</button>
|
||||
<button class="btn bg-transparent p-0" type="button" {{action "toggleSeparateLivenessCheck"}}>{{t "formHealthCheck.separateLivenessCheck"}}</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export default Component.extend(ViewNewEdit, ChildHook, {
|
|||
timeoutSeconds: null,
|
||||
kindChoices: null,
|
||||
|
||||
namespace: alias('model.namespace'),
|
||||
namespace: alias('model.namespace'),
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ export default Component.extend(ViewNewEdit, ChildHook, {
|
|||
}
|
||||
}),
|
||||
|
||||
showSessionAffinity: computed('isHeadless', 'showMoreOptions', function() {
|
||||
showSessionAffinity: computed('isHeadless', 'kind', 'showMoreOptions', function() {
|
||||
return get(this, 'showMoreOptions') && get(this, 'kind') !== HEADLESS;
|
||||
}),
|
||||
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@
|
|||
|
||||
{{#if editing}}
|
||||
<div class="row">
|
||||
<button class="btn bg-link icon-btn pull-right" {{action "addMetric"}}>
|
||||
<button class="btn bg-link icon-btn pull-right" type="button" {{action "addMetric"}}>
|
||||
<span class="darken">
|
||||
<i class="icon icon-plus text-small"></i>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@ export default Component.extend(ViewNewEdit, {
|
|||
if (entry) {
|
||||
return `volume-source/source-${ name }`;
|
||||
}
|
||||
|
||||
return null;
|
||||
}),
|
||||
|
||||
willSave() {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ export default Component.extend(ViewNewEdit, OptionallyNamespaced, {
|
|||
return this._super(...arguments);
|
||||
}),
|
||||
|
||||
hostname: window.location.host,
|
||||
hostname: window.location.host,
|
||||
|
||||
willSave() {
|
||||
const { primaryResource: pr } = this;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export default Component.extend(ViewNewEdit, {
|
|||
model: null,
|
||||
sourceName: null,
|
||||
|
||||
titleKey: 'cruVolume.title',
|
||||
titleKey: 'cruVolume.title',
|
||||
|
||||
didReceiveAttrs() {
|
||||
const selectedSource = (get(this, 'sourceChoices') || []).find((source) => !!get(this, `primaryResource.${ get(source, 'value') }`));
|
||||
|
|
@ -36,7 +36,7 @@ export default Component.extend(ViewNewEdit, {
|
|||
},
|
||||
},
|
||||
|
||||
headerToken: computed('scope', function() {
|
||||
headerToken: computed('mode', 'scope', function() {
|
||||
let k = 'cruPersistentVolumeClaim.define.';
|
||||
|
||||
k += get(this, 'mode');
|
||||
|
|
@ -88,6 +88,8 @@ export default Component.extend(ViewNewEdit, {
|
|||
field: entry.value,
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}),
|
||||
|
||||
willSave() {
|
||||
|
|
|
|||
|
|
@ -54,14 +54,14 @@ export default Component.extend({
|
|||
return value;
|
||||
}
|
||||
}),
|
||||
canAddMore: computed('filteredKeyContent', function() {
|
||||
canAddMore: computed('filteredKeyContent.length', 'keyValuePairs.length', function() {
|
||||
return get(this, 'filteredKeyContent.length') > 1
|
||||
|| get(this, 'filteredKeyContent.length') > 0 && get(this, 'keyValuePairs.length') === 0;
|
||||
}),
|
||||
lastIndex: computed('keyValuePairs.[]', function() {
|
||||
return get(this, 'keyValuePairs.length') - 1;
|
||||
}),
|
||||
filteredKeyContent: computed('asyncKeyContent.value', 'keyValuePairs.@each', 'keyValuePairs.[]', 'keyValuePairs', function() {
|
||||
filteredKeyContent: computed('asyncKeyContent.value', 'keyContentFilter', 'keyValuePairs.[]', function() {
|
||||
if (!get(this, 'keyContentFilter')) {
|
||||
return get(this, 'asyncKeyContent.value') || [];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@
|
|||
<td> </td>
|
||||
<td class="valign-top text-right">
|
||||
<button
|
||||
class="btn bg-primary btn-sm"
|
||||
{{action "onRemove" index}}>
|
||||
class="btn bg-primary btn-sm" type="button" {{action "onRemove" index}}>
|
||||
<i class="icon icon-minus"/>
|
||||
<span class="sr-only">
|
||||
{{t "generic.remove"}}
|
||||
|
|
@ -49,8 +48,7 @@
|
|||
<td> </td>
|
||||
<td class="valign-top text-right">
|
||||
<button
|
||||
class="btn bg-primary btn-sm"
|
||||
{{action "onRemove" lastIndex}}>
|
||||
class="btn bg-primary btn-sm" type="button" {{action "onRemove" lastIndex}}>
|
||||
<i class="icon icon-minus"/>
|
||||
<span class="sr-only">
|
||||
{{t "generic.remove"}}
|
||||
|
|
@ -63,9 +61,7 @@
|
|||
</table>
|
||||
{{/if}}
|
||||
<button
|
||||
class={{addButtonClass}}
|
||||
{{action "onAdd"}}
|
||||
disabled={{not canAddMore}}
|
||||
class={{addButtonClass}} disabled={{not canAddMore}} type="button" {{action "onAdd"}}
|
||||
>
|
||||
<span class="darken">
|
||||
<i class="icon icon-plus text-small"/>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export default Component.extend({
|
|||
successMustBeOne: false,
|
||||
isLiveness: false,
|
||||
|
||||
editing: true,
|
||||
editing: true,
|
||||
|
||||
checkType: null,
|
||||
command: null,
|
||||
|
|
@ -99,9 +99,7 @@ export default Component.extend({
|
|||
set(this, 'checkType', type);
|
||||
this.validate();
|
||||
|
||||
scheduleOnce('afterRender', () => {
|
||||
this.checkChanged()
|
||||
});
|
||||
scheduleOnce('afterRender', this, 'checkChanged');
|
||||
},
|
||||
|
||||
checkChanged: observer('path', 'host', 'headers', 'checkType', 'command', function() {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
<td> </td>
|
||||
<td class="valign-top text-right">
|
||||
{{#if editing}}
|
||||
<button class="btn bg-primary btn-sm" {{action "remove" row}}><i class="icon icon-minus"/><span class="sr-only">{{t "generic.remove"}}</span></button>
|
||||
<button class="btn bg-primary btn-sm" type="button" {{action "remove" row}}><i class="icon icon-minus"/><span class="sr-only">{{t "generic.remove"}}</span></button>
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
{{#if editing}}
|
||||
<div>
|
||||
<button class="btn bg-link icon-btn p-0" {{action "add"}}>
|
||||
<button class="btn bg-link icon-btn p-0" type="button" {{action "add"}}>
|
||||
<span class="darken"><i class="icon icon-plus text-small"/></span>
|
||||
<span>{{t "formKeyToPath.addAction"}}</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
{{#if editing}}
|
||||
<div class="row">
|
||||
<button class="btn bg-link icon-btn pull-left" {{action "addRule"}}>
|
||||
<button class="btn bg-link icon-btn pull-left" type="button" {{action "addRule"}}>
|
||||
<span class="darken"><i class="icon icon-plus text-small"></i></span>
|
||||
<span>{{t "formNodeAffinity.addRuleLabel"}}</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import C from 'shared/utils/constants';
|
|||
export default Component.extend({
|
||||
layout,
|
||||
|
||||
term: null,
|
||||
term: null,
|
||||
|
||||
ruleArray: null,
|
||||
editing: true,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="clearfix">
|
||||
<label class="acc-label">{{t 'formNodeRequirement.label'}}</label>
|
||||
{{#if editing}}
|
||||
<button class="btn bg-link icon-btn" {{action "addRule"}}>
|
||||
<button class="btn bg-link icon-btn" type="button" {{action "addRule"}}>
|
||||
<span class="darken"><i class="icon icon-plus text-small"></i></span>
|
||||
<span>{{t 'formNodeRequirement.addRuleLabel'}}</span>
|
||||
</button>
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
{{#if editing}}
|
||||
<td class="text-right">
|
||||
<button class="btn bg-primary btn-sm" {{action "removeRule" rule}}><i class="icon icon-minus"/><span class="sr-only">{{t 'generic.remove'}}</span></button>
|
||||
<button class="btn bg-primary btn-sm" type="button" {{action "removeRule" rule}}><i class="icon icon-minus"/><span class="sr-only">{{t 'generic.remove'}}</span></button>
|
||||
</td>
|
||||
{{/if}}
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="row">
|
||||
{{#if editing}}
|
||||
<div class="pull-right">
|
||||
<button class="btn bg-transparent text-small vertical-middle" {{action "removeRule" rule}}>
|
||||
<button class="btn bg-transparent text-small vertical-middle" type="button" {{action "removeRule" rule}}>
|
||||
{{t 'formNodeAffinity.removeRuleLabel'}}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ export default Component.extend(NewOrEdit, {
|
|||
|
||||
},
|
||||
|
||||
showAdmin: computed('model.roles.@each.id', 'mode', function() {
|
||||
showAdmin: computed('mode', 'model.roles.@each.id', 'type', function() {
|
||||
const id = `${ get(this, 'type') }-owner`;
|
||||
const role = get(this, 'model.roles').findBy('id', id);
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ export default Component.extend(NewOrEdit, {
|
|||
return false;
|
||||
}),
|
||||
|
||||
showStdUser: computed('model.roles.@each.id', 'mode', function() {
|
||||
showStdUser: computed('mode', 'model.roles.@each.id', 'type', function() {
|
||||
const id = `${ get(this, 'type') }-member`;
|
||||
const role = get(this, 'model.roles').findBy('id', id);
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ export default Component.extend(NewOrEdit, {
|
|||
}),
|
||||
|
||||
|
||||
baseRoles: computed(function() {
|
||||
baseRoles: computed('type', function() {
|
||||
return [
|
||||
`${ get(this, 'type') }-admin`,
|
||||
`${ get(this, 'type') }-owner`,
|
||||
|
|
@ -186,7 +186,7 @@ export default Component.extend(NewOrEdit, {
|
|||
];
|
||||
}),
|
||||
|
||||
userRoles: computed('model.roles.[]', function() {
|
||||
userRoles: computed('model.roles.[]', 'type', function() {
|
||||
let roles = get(this, 'model.roles');
|
||||
let userDef = roles.filter((role) => !get(role, 'builtin')
|
||||
&& !get(role, 'external')
|
||||
|
|
@ -201,7 +201,7 @@ export default Component.extend(NewOrEdit, {
|
|||
});
|
||||
}),
|
||||
|
||||
custom: computed('model.roles.[]', function() {
|
||||
custom: computed('baseRoles', 'model.roles.[]', 'type', function() {
|
||||
// built in
|
||||
let roles = get(this, 'model.roles').filterBy('hidden', false);
|
||||
let excludes = get(this, 'baseRoles');
|
||||
|
|
@ -217,7 +217,7 @@ export default Component.extend(NewOrEdit, {
|
|||
});
|
||||
}),
|
||||
|
||||
mode: computed('editing', {
|
||||
mode: computed('editing', 'model.roles', 'type', 'userRoles.{firstObject,length}', {
|
||||
get() {
|
||||
let mode = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
<td>
|
||||
{{#if editing}}
|
||||
<button class="btn bg-primary btn-sm" {{action "removePort" port}}>
|
||||
<button class="btn bg-primary btn-sm" type="button" {{action "removePort" port}}>
|
||||
<i class="icon icon-minus"/><span class="sr-only">{{t 'generic.remove'}}</span>
|
||||
</button>
|
||||
{{/if}}
|
||||
|
|
@ -95,7 +95,7 @@
|
|||
|
||||
<div>
|
||||
{{#if editing}}
|
||||
<button class="btn bg-link icon-btn p-0" {{action "addPort"}}>
|
||||
<button class="btn bg-link icon-btn p-0" type="button" {{action "addPort"}}>
|
||||
<span class="darken"><i class="icon icon-plus text-small"/></span>
|
||||
<span>{{t 'formServicePorts.addAction'}}</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export default Component.extend({
|
|||
selectedSecret: null,
|
||||
sources: SOURCES,
|
||||
|
||||
prefixOrTarget: computed('source.sourceKey', {
|
||||
prefixOrTarget: computed('source.{prefix,source,sourceKey,targetKey}', {
|
||||
get() {
|
||||
if ( get(this, 'source.source') !== 'field' && (get(this, 'source.sourceKey') === null || get(this, 'source.sourceKey') === undefined) ) {
|
||||
return get(this, 'source.prefix');
|
||||
|
|
@ -49,7 +49,7 @@ export default Component.extend({
|
|||
}
|
||||
}),
|
||||
|
||||
prefixOrKeys: computed('source.sourceName', 'selectedSecret', 'selectedConfigMap', function() {
|
||||
prefixOrKeys: computed('selectedConfigMap', 'selectedSecret', 'source.{source,sourceName}', 'specificKeyOnly', function() {
|
||||
let prefix = {
|
||||
id: null,
|
||||
label: 'All'
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
</td>
|
||||
<td>
|
||||
{{#if editing}}
|
||||
<button class="btn bg-primary btn-sm" {{action remove source}}>
|
||||
<button class="btn bg-primary btn-sm" type="button" {{action remove source}}>
|
||||
<i class="icon icon-minus"/><span class="sr-only">{{t "generic.remove"}}</span>
|
||||
</button>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -200,6 +200,8 @@ export default Component.extend({
|
|||
return [TARGET_TYPES.VALUE, TARGET_TYPES.AVERAGE_VALUE];
|
||||
case OBJECT:
|
||||
return [TARGET_TYPES.VALUE, TARGET_TYPES.AVERAGE_VALUE];
|
||||
default:
|
||||
return [];
|
||||
}
|
||||
}),
|
||||
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@
|
|||
<div class="row">
|
||||
<div class="pull-right">
|
||||
{{#if (lte metrics.length 1 )}}
|
||||
<button class="btn btn-disabled-transparent text-small vertical-middle" disabled="true">
|
||||
<button class="btn btn-disabled-transparent text-small vertical-middle" disabled="true" type="button">
|
||||
{{t "cruHpa.metrics.removeMetricLabel"}}
|
||||
</button>
|
||||
{{else}}
|
||||
<button class="btn bg-transparent text-small vertical-middle" {{action "removeMetric" metric}}>
|
||||
<button class="btn bg-transparent text-small vertical-middle" type="button" {{action "removeMetric" metric}}>
|
||||
{{t "cruHpa.metrics.removeMetricLabel"}}
|
||||
</button>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export default Component.extend({
|
|||
namePlaceholder: 'generic.emptyString',
|
||||
valuePlaceholder: 'generic.emptyString',
|
||||
|
||||
ary: null,
|
||||
ary: null,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<button class="btn bg-link icon-btn pull-right" style="margin-top: 8px;" {{action "upload"}}>
|
||||
<button class="btn bg-link icon-btn pull-right" style="margin-top: 8px;" type="button" {{action "upload"}}>
|
||||
<span class="darken"><i class="icon icon-upload text-small"/></span>
|
||||
<span>{{t uploadActionLabel}}</span>
|
||||
</button>
|
||||
<button class="btn bg-link icon-btn pull-right mr-10" style="margin-top: 8px;" {{action "add"}}>
|
||||
<button class="btn bg-link icon-btn pull-right mr-10" style="margin-top: 8px;" type="button" {{action "add"}}>
|
||||
<span class="darken"><i class="icon icon-plus text-small"/></span>
|
||||
<span>{{t addActionLabel}}</span>
|
||||
</button>
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
value=file.value
|
||||
placeholder=valuePlaceholder
|
||||
}}
|
||||
<button class="btn bg-primary" {{action "remove" file}}><i class="icon icon-minus"></i></button>
|
||||
<button class="btn bg-primary" type="button" {{action "remove" file}}><i class="icon icon-minus"></i></button>
|
||||
{{/input-text-file}}
|
||||
{{/each}}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
{{t "modalAboutComponent.linuxImageList"}}
|
||||
</td>
|
||||
<td data-title="download-linux-imgae-list">
|
||||
<button class="btn bg-transparent p-0" {{action "downloadLinuxImages"}}>
|
||||
<button class="btn bg-transparent p-0" type="button" {{action "downloadLinuxImages"}}>
|
||||
{{t "generic.download"}}
|
||||
</button>
|
||||
</td>
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
{{t "modalAboutComponent.windowsImageList"}}
|
||||
</td>
|
||||
<td data-title="download-windows-imgae-list">
|
||||
<button class="btn bg-transparent p-0" {{action "downloadWindowsImages"}}>
|
||||
<button class="btn bg-transparent p-0" type="button" {{action "downloadWindowsImages"}}>
|
||||
{{t "generic.download"}}
|
||||
</button>
|
||||
</td>
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
</table>
|
||||
|
||||
<div class="footer-actions">
|
||||
<button {{action "cancel"}} class="btn bg-primary">
|
||||
<button class="btn bg-primary" type="button" {{action "cancel"}}>
|
||||
{{t "generic.closeModal"}}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export default Component.extend(ModalBase, {
|
|||
growl: service(),
|
||||
|
||||
layout,
|
||||
classNames: ['medium-modal'],
|
||||
classNames: ['medium-modal'],
|
||||
|
||||
mappedGroupRoleBindingNamesIds: alias('modalService.modalOpts.model.mappedGroupRoleBindingNamesIds'),
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ export default Component.extend(ModalBase, NewOrEdit, {
|
|||
return ttlUnits.slice(0, indexOfUnit + 1);
|
||||
}),
|
||||
|
||||
allClusters: computed('scope.allClusters.@each.{id}', function() {
|
||||
allClusters: computed('scope.allClusters.@each.id', function() {
|
||||
const allClusters = get(this, 'scope.allClusters');
|
||||
|
||||
return allClusters.map((c) => {
|
||||
|
|
|
|||
|
|
@ -63,8 +63,7 @@
|
|||
|
||||
<div class="footer-actions">
|
||||
<button
|
||||
{{action "cancel"}}
|
||||
class="bg-primary"
|
||||
class="bg-primary" type="button" {{action "cancel"}}
|
||||
>
|
||||
{{t "generic.closeModal"}}
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import layout from './template';
|
|||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default Component.extend(ModalBase, NewOrEdit, {
|
||||
scope: service(),
|
||||
scope: service(),
|
||||
|
||||
layout,
|
||||
classNames: ['large-modal'],
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export default Component.extend(ModalBase, NewOrEdit, {
|
|||
beforeSaveModel: null,
|
||||
initAutoInjectionStatus: null,
|
||||
|
||||
originalModel: alias('modalService.modalOpts'),
|
||||
originalModel: alias('modalService.modalOpts'),
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
|
@ -103,25 +103,25 @@ export default Component.extend(ModalBase, NewOrEdit, {
|
|||
set(this, 'primaryResource.tags', get(this, 'tags').split(',') || []);
|
||||
}),
|
||||
|
||||
canMoveNamespace: computed('primaryResource.actionLinks.{move}', function() {
|
||||
canMoveNamespace: computed('primaryResource.actionLinks.move', function() {
|
||||
return !!get(this, 'primaryResource.actionLinks.move');
|
||||
}),
|
||||
|
||||
projectLimit: computed('primaryResource.resourceQuota.{limit}', 'primaryResource.projectId', function() {
|
||||
projectLimit: computed('allProjects', 'primaryResource.projectId', 'primaryResource.resourceQuota.limit', function() {
|
||||
const projectId = get(this, 'primaryResource.projectId');
|
||||
const project = get(this, 'allProjects').findBy('id', projectId);
|
||||
|
||||
return get(project, 'resourceQuota.limit');
|
||||
}),
|
||||
|
||||
projectUsedLimit: computed('primaryResource.resourceQuota.{limit}', 'primaryResource.projectId', function() {
|
||||
projectUsedLimit: computed('allProjects', 'primaryResource.projectId', 'primaryResource.resourceQuota.limit', function() {
|
||||
const projectId = get(this, 'primaryResource.projectId');
|
||||
const project = get(this, 'allProjects').findBy('id', projectId);
|
||||
|
||||
return get(project, 'resourceQuota.usedLimit');
|
||||
}),
|
||||
|
||||
nsDefaultQuota: computed('primaryResource.resourceQuota.{limit}', 'primaryResource.projectId', function() {
|
||||
nsDefaultQuota: computed('allProjects', 'primaryResource.projectId', 'primaryResource.resourceQuota.limit', function() {
|
||||
const projectId = get(this, 'primaryResource.projectId');
|
||||
const project = get(this, 'allProjects').findBy('id', projectId);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default Component.extend(ModalBase, {
|
|||
classNames: ['large-modal'],
|
||||
model: null,
|
||||
|
||||
originalModel: alias('modalService.modalOpts'),
|
||||
originalModel: alias('modalService.modalOpts'),
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export default Component.extend(ModalBase, {
|
|||
formattedValue: null,
|
||||
removing: false,
|
||||
|
||||
model: alias('modalService.modalOpts'),
|
||||
model: alias('modalService.modalOpts'),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
|
|
|||
|
|
@ -17,33 +17,8 @@ export default Component.extend(ModalBase, {
|
|||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
let self = this;
|
||||
|
||||
let opt = JSON.parse(this.get(`settings.${ C.SETTING.FEEDBACK_FORM }`) || '{}');
|
||||
|
||||
scheduleOnce('afterRender', this, () => {
|
||||
loadScript('//js.hsforms.net/forms/v2.js').then(() => {
|
||||
window['hbspt'].forms.create({
|
||||
css: '',
|
||||
portalId: opt.portalId, // '468859',
|
||||
formId: opt.formId, // 'bfca2d1d-ed50-4ed7-a582-3f0440f236ca',
|
||||
target: '#feedback-form',
|
||||
errorClass: 'form-control',
|
||||
onFormReady() {
|
||||
self.styleForm();
|
||||
$('INPUT[name=rancher_account_id]')[0].value = self.get('access.principal.id');// eslint-disable-line
|
||||
$('INPUT[name=github_username]')[0].value = self.get('access.identity.login');// eslint-disable-line
|
||||
self.set('loading', false);
|
||||
},
|
||||
onFormSubmit() {
|
||||
self.styleForm();
|
||||
later(() => {
|
||||
self.send('sent');
|
||||
}, 1000);
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
scheduleOnce('afterRender', this, 'setupForm', JSON.parse(this.get(`settings.${ C.SETTING.FEEDBACK_FORM }`) || '{}'));
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
|
@ -81,4 +56,30 @@ export default Component.extend(ModalBase, {
|
|||
});
|
||||
},
|
||||
|
||||
setupForm(opt) {
|
||||
const self = this;
|
||||
|
||||
loadScript('//js.hsforms.net/forms/v2.js').then(() => {
|
||||
window['hbspt'].forms.create({
|
||||
css: '',
|
||||
portalId: opt.portalId, // '468859',
|
||||
formId: opt.formId, // 'bfca2d1d-ed50-4ed7-a582-3f0440f236ca',
|
||||
target: '#feedback-form',
|
||||
errorClass: 'form-control',
|
||||
onFormReady() {
|
||||
self.styleForm();
|
||||
$('INPUT[name=rancher_account_id]')[0].value = self.get('access.principal.id');// eslint-disable-line
|
||||
$('INPUT[name=github_username]')[0].value = self.get('access.identity.login');// eslint-disable-line
|
||||
self.set('loading', false);
|
||||
},
|
||||
onFormSubmit() {
|
||||
self.styleForm();
|
||||
later(() => {
|
||||
self.send('sent');
|
||||
}, 1000);
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@
|
|||
</div>
|
||||
|
||||
<div class="footer-actions pt-20">
|
||||
<button {{action "submit"}} class="btn bg-primary" disabled={{loading}}>{{t 'modalFeedback.send'}}</button>
|
||||
<button class="btn bg-primary" disabled={{loading}} type="button" {{action "submit"}}>{{t 'modalFeedback.send'}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@
|
|||
{{/if}}
|
||||
</section>
|
||||
<div class="footer-actions">
|
||||
<button {{action "cancel"}} class="btn bg-primary close-kubeconfig">{{t 'generic.closeModal'}}</button>
|
||||
<button class="btn bg-primary close-kubeconfig" type="button" {{action "cancel"}}>{{t 'generic.closeModal'}}</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@
|
|||
}}
|
||||
|
||||
<div class="footer-actions">
|
||||
<button {{action "cancel"}} class="btn bg-primary">{{t 'generic.closeModal'}}</button>
|
||||
<button class="btn bg-primary" type="button" {{action "cancel"}}>{{t 'generic.closeModal'}}</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import layout from './template';
|
|||
|
||||
export default Component.extend(ModalBase, {
|
||||
layout,
|
||||
classNames: ['large-modal'],
|
||||
classNames: ['large-modal'],
|
||||
|
||||
editing: true,
|
||||
editing: true,
|
||||
|
||||
callback: alias('modalService.modalOpts.callback'),
|
||||
namespace: alias('modalService.modalOpts.namespace'),
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ export default Component.extend(ModalBase, {
|
|||
setProperties(this, {
|
||||
backupId,
|
||||
restoreRkeConfig,
|
||||
errors: [],
|
||||
errors: [],
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
</select>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if (not loadingBackups)}}
|
||||
{{#unless loadingBackups}}
|
||||
<div class="col span-5">
|
||||
<label
|
||||
class="acc-label"
|
||||
|
|
@ -48,15 +48,15 @@
|
|||
{{t "modalRestoreBackup.type.label"}}
|
||||
</label>
|
||||
<div class="radio {{if restorationTypeDisabled "text-muted"}}">
|
||||
{{radio-button selection=restoreRkeConfig value="etcd" disabled=restorationTypeDisabled}}
|
||||
{{radio-button selection=restoreRkeConfig value="etcd" disabled=restorationTypeDisabled}}
|
||||
{{t "modalRestoreBackup.type.etcd"}}
|
||||
</div>
|
||||
<div class="radio {{if k8sVersionRadioDisabled "text-muted"}}">
|
||||
{{radio-button selection=restoreRkeConfig value="kubernetesVersion" disabled=k8sVersionRadioDisabled}}
|
||||
{{radio-button selection=restoreRkeConfig value="kubernetesVersion" disabled=k8sVersionRadioDisabled}}
|
||||
{{t "modalRestoreBackup.type.k8sVersion"}}
|
||||
</div>
|
||||
<div class="radio {{if k8sVersionRadioDisabled "text-muted"}}">
|
||||
{{radio-button selection=restoreRkeConfig value="all" disabled=k8sVersionRadioDisabled}}
|
||||
{{radio-button selection=restoreRkeConfig value="all" disabled=k8sVersionRadioDisabled}}
|
||||
{{t "modalRestoreBackup.type.etcdAndK8sVersion"}}
|
||||
</div>
|
||||
{{#if k8sVersionDisabled}}
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue