diff --git a/app/authenticated/cluster/nodes/index/template.hbs b/app/authenticated/cluster/nodes/index/template.hbs index 1d7fae308..e2a15c185 100644 --- a/app/authenticated/cluster/nodes/index/template.hbs +++ b/app/authenticated/cluster/nodes/index/template.hbs @@ -19,7 +19,6 @@ sortBy=sortBy bulkActions=true subRows=true - fullRows=true pagingLabel="pagination.node" extraSearchFields=extraSearchFields headers=headers as |sortable kind node dt|}} diff --git a/app/authenticated/cluster/ns/index/template.hbs b/app/authenticated/cluster/ns/index/template.hbs index f6fabebfa..177b37413 100644 --- a/app/authenticated/cluster/ns/index/template.hbs +++ b/app/authenticated/cluster/ns/index/template.hbs @@ -20,7 +20,6 @@ bulkActions=true body=rows sortBy=sortBy - fullRows=true as |sortable kind obj dt| }} {{#if (eq kind "row")}} diff --git a/app/authenticated/project/apikeys/account/template.hbs b/app/authenticated/project/apikeys/account/template.hbs index a720a65db..1c2558dca 100644 --- a/app/authenticated/project/apikeys/account/template.hbs +++ b/app/authenticated/project/apikeys/account/template.hbs @@ -36,7 +36,6 @@ sortBy=sortBy headers=headers body=filtered - fullRows=true as |sortable kind key| }} {{#if (eq kind "row")}} diff --git a/app/authenticated/project/apikeys/project/template.hbs b/app/authenticated/project/apikeys/project/template.hbs index 1763ce179..533ea0d22 100644 --- a/app/authenticated/project/apikeys/project/template.hbs +++ b/app/authenticated/project/apikeys/project/template.hbs @@ -35,7 +35,6 @@ sortBy=sortBy headers=headers body=arranged - fullRows=true as |sortable kind key| }} {{#if (eq kind "row")}} diff --git a/app/authenticated/project/hooks/index/template.hbs b/app/authenticated/project/hooks/index/template.hbs index 6d569ae4f..8226cf7a9 100644 --- a/app/authenticated/project/hooks/index/template.hbs +++ b/app/authenticated/project/hooks/index/template.hbs @@ -19,7 +19,6 @@ sortBy=sortBy headers=headers body=model.receivers - fullRows=true as |sortable kind row| }} {{#if (eq kind "row")}} diff --git a/app/balancers/index/template.hbs b/app/balancers/index/template.hbs index 53fce7a1b..f5003c3b4 100644 --- a/app/balancers/index/template.hbs +++ b/app/balancers/index/template.hbs @@ -15,7 +15,6 @@ sortBy=sortBy bulkActions=true subRows=true - fullRows=true groupByKey=groupTableBy groupByRef="stack" pagingLabel="pagination.loadBalancer" diff --git a/app/certificates/index/template.hbs b/app/certificates/index/template.hbs index 24db6e3f0..dd0ad26c2 100644 --- a/app/certificates/index/template.hbs +++ b/app/certificates/index/template.hbs @@ -18,7 +18,6 @@ sortBy=sortBy headers=headers body=model - fullRows=true as |sortable kind cert| }} {{#if (eq kind "row")}} diff --git a/app/containers/index/template.hbs b/app/containers/index/template.hbs index a8c7c67e5..8c57e5bd5 100644 --- a/app/containers/index/template.hbs +++ b/app/containers/index/template.hbs @@ -16,7 +16,6 @@ sortBy=sortBy bulkActions=true subRows=true - fullRows=true groupByKey=groupTableBy groupByRef="namespace" extraGroups=emptyNamespaces diff --git a/app/dns/index/template.hbs b/app/dns/index/template.hbs index 0fe315d35..b86eff0c5 100644 --- a/app/dns/index/template.hbs +++ b/app/dns/index/template.hbs @@ -15,7 +15,6 @@ sortBy=sortBy bulkActions=true subRows=true - fullRows=true groupByKey=groupTableBy groupByRef="namespace" pagingLabel="pagination.dnsRecord" diff --git a/app/host/template.hbs b/app/host/template.hbs index 560eeac2f..c2e0bd85f 100644 --- a/app/host/template.hbs +++ b/app/host/template.hbs @@ -253,7 +253,6 @@ descending=descending headers=storageHeaders body=nonRootVolumes - fullRows=true as |sortable kind volume| }} {{#if (eq kind "row")}} diff --git a/app/hosts/index/template.hbs b/app/hosts/index/template.hbs index 0c1b4021c..9f8897484 100644 --- a/app/hosts/index/template.hbs +++ b/app/hosts/index/template.hbs @@ -34,7 +34,6 @@ sortBy=sortBy bulkActions=true subRows=true - fullRows=true pagingLabel="pagination.host" subHeaders=containerHeaders subSearchField="arrangedInstances" diff --git a/app/initializers/extend-ember-input.js b/app/initializers/extend-ember-input.js index d2dc5a250..0b45ccf13 100644 --- a/app/initializers/extend-ember-input.js +++ b/app/initializers/extend-ember-input.js @@ -11,7 +11,7 @@ export function initialize(/*application */) { // Disable iOS auto-capitalization TextField.reopen({ - attributeBindings: ['autocapitalize'], + attributeBindings: ['autocapitalize','spellcheck','autocomplete'], autocapitalize: 'none', }); } diff --git a/app/models/machine.js b/app/models/machine.js index 92ff82073..e43899afd 100644 --- a/app/models/machine.js +++ b/app/models/machine.js @@ -6,6 +6,7 @@ import { formatSi, parseSi, exponentNeeded } from 'shared/utils/parse-unit'; import C from 'ui/utils/constants'; import StateCounts from 'ui/mixins/state-counts'; import { inject as service } from "@ember/service"; +import { reference } from 'ember-api-store/utils/denormalize'; var Machine = Resource.extend(StateCounts,{ @@ -16,6 +17,8 @@ var Machine = Resource.extend(StateCounts,{ router: service(), clusterStore: service(), + cluster: reference('clusterId','cluster'), + init() { this._super(...arguments); this.defineStateCounts('arrangedInstances', 'instanceStates', 'instanceCountSort'); @@ -92,7 +95,11 @@ var Machine = Resource.extend(StateCounts,{ name = this.get('nodeName'); if ( name ) { - return name.replace(/\..*$/,''); + if ( name.match(/[a-z]/i) ) { + name = name.replace(/\..*$/,''); + } + + return name; } name = this.get('requestedHostname'); diff --git a/app/models/secret.js b/app/models/secret.js index acf49e0ab..b1c0483a7 100644 --- a/app/models/secret.js +++ b/app/models/secret.js @@ -1,19 +1,32 @@ import { inject as service } from '@ember/service'; +import { alias } from '@ember/object/computed'; +import { computed, get } from '@ember/object'; import Resource from 'ember-api-store/models/resource'; export default Resource.extend({ modalService: service('modal'), + router: service(), + + state: 'active', actions: { - edit: function() { - this.get('modalService').toggleModal('modal-edit-secret', this); + edit: function(act) { + this.get('router').transitionTo('secrets.detail.edit', this.get('id')); }, }, + keys: computed('data', function() { + return Object.keys(get(this, 'data')).sort(); + }), + + firstKey: alias('keys.firstObject'), + availableActions: function() { var l = this.get('links'); var choices = [ + { label: 'action.edit', icon: 'icon icon-edit', action: 'edit', enabled: !!l.update }, + { divider: true }, { label: 'action.remove', icon: 'icon icon-trash', action: 'promptDelete', enabled: !!l.remove, altAction: 'delete', bulkable: true }, { divider: true }, { label: 'action.viewInApi', icon: 'icon icon-external-link', action: 'goToApi', enabled: true }, diff --git a/app/registries/index/template.hbs b/app/registries/index/template.hbs index 1970ed00e..30cf56a84 100644 --- a/app/registries/index/template.hbs +++ b/app/registries/index/template.hbs @@ -18,7 +18,6 @@ sortBy=sortBy headers=headers body=model - fullRows=true as |sortable kind registry| }} {{#if (eq kind "row")}} diff --git a/app/router.js b/app/router.js index fb79b2ecc..ebe4c93e4 100644 --- a/app/router.js +++ b/app/router.js @@ -144,7 +144,9 @@ Router.map(function() { this.route('secrets', {path: '/secrets', resetNamespace: true}, function() { this.route('new', {path: '/add'}); this.route('index', {path: '/'}); - this.route('detail', {path: '/:secret_id'}); + this.route('detail', {path: '/:secret_id'}, function() { + this.route('edit'); + }); }); }); diff --git a/app/secrets/detail/edit/controller.js b/app/secrets/detail/edit/controller.js new file mode 100644 index 000000000..316849c26 --- /dev/null +++ b/app/secrets/detail/edit/controller.js @@ -0,0 +1,13 @@ +import Controller from '@ember/controller'; + +export default Controller.extend({ + actions: { + done() { + this.send('goToPrevious'); + }, + + cancel() { + this.send('goToPrevious'); + } + }, +}); diff --git a/app/secrets/detail/edit/route.js b/app/secrets/detail/edit/route.js new file mode 100644 index 000000000..2912f1dc1 --- /dev/null +++ b/app/secrets/detail/edit/route.js @@ -0,0 +1,16 @@ +import Route from '@ember/routing/route'; +import { get, set } from '@ember/object'; + +export default Route.extend({ + model: function(params) { + const original = this.modelFor('secrets.detail'); + set(this, 'originalModel', original); + + return original.clone(); + }, + + setupController(controller, model) { + this._super(...arguments); + set(controller,'originalModel', this.modelFor('secrets.detail')); + } +}); diff --git a/app/secrets/detail/edit/template.hbs b/app/secrets/detail/edit/template.hbs new file mode 100644 index 000000000..f97b377ce --- /dev/null +++ b/app/secrets/detail/edit/template.hbs @@ -0,0 +1,7 @@ +{{new-edit-secret + originalModel=originalModel + model=model + mode="edit" + done=(action "done") + cancel=(action "cancel") +}} diff --git a/app/secrets/detail/index/template.hbs b/app/secrets/detail/index/template.hbs new file mode 100644 index 000000000..18817b151 --- /dev/null +++ b/app/secrets/detail/index/template.hbs @@ -0,0 +1,4 @@ +{{new-edit-secret + mode="view" + model=model +}} diff --git a/app/secrets/detail/route.js b/app/secrets/detail/route.js new file mode 100644 index 000000000..52543b4a5 --- /dev/null +++ b/app/secrets/detail/route.js @@ -0,0 +1,20 @@ +import Route from '@ember/routing/route'; +import { get } from '@ember/object'; + +export default Route.extend({ + model: function(params) { + const all = this.modelFor('secrets'); + + let secret = all.projectSecrets.findBy('id', params.secret_id); + if ( secret ) { + return secret; + } + + secret = all.namespacedSecrets.findBy('id', params.secret_id); + if ( secret ) { + return secret; + } + + return get(this, 'store').find('secret', params.secret_id); + }, +}); diff --git a/app/secrets/index/controller.js b/app/secrets/index/controller.js index 8cd5fdb26..df7153788 100644 --- a/app/secrets/index/controller.js +++ b/app/secrets/index/controller.js @@ -37,12 +37,25 @@ export default Controller.extend({ translationKey: 'generic.description', sort: ['description','name','id'], }, + { + name: 'namespace', + translationKey: 'generic.namespace', + searchField: 'namespace.displayName', + sort: ['namespace.displayName','name','id'], + }, + { + name: 'keys', + translationKey: 'secretsPage.table.keys', + searchField: 'keys', + sort: ['firstKey','name','id'], + }, { name: 'created', translationKey: 'generic.created', sort: ['created:desc','name','id'], searchField: false, type: 'string', + width: 150, }, ], diff --git a/app/secrets/index/template.hbs b/app/secrets/index/template.hbs index dd2decf2a..86afdb515 100644 --- a/app/secrets/index/template.hbs +++ b/app/secrets/index/template.hbs @@ -4,6 +4,16 @@
@@ -21,7 +31,7 @@ {{#if (eq kind "row")}} {{secret-row model=row}} {{else if (eq kind "group")}} - {{namespace-group model=inst.ref fullColspan=sortable.fullColspan showState=true}} + {{namespace-group model=row.ref noGroup="namespaceGroup.project" fullColspan=sortable.fullColspan}} {{else if (eq kind "nomatch")}}{{t 'clustersPage.indexPage.import.desc'}}
{{t 'clustersPage.addPage.rke.new.radio.embedded.detail' appName=settings.appName}}
+{{t 'clustersPage.addPage.rke.new.radio.embedded.detail' appName=settings.appName}} — Coming Soon
- - {{#if subMatches}} - {{#if (eq (get subMatches model.id) 0)}} - {{t 'pagination.containerNoSubset' count=model.arrangedInstances.length htmlSafe=true}} - {{else if (lt (get subMatches model.id) model.arrangedInstances.length)}} - {{t 'pagination.containerHighlightSubset' subset=(get subMatches model.id) count=model.arrangedInstances.length htmlSafe=true}} - {{else}} - {{t 'pagination.container' pages=1 count=model.arrangedInstances.length}} - {{/if}} - {{else}} - {{t 'pagination.container' pages=1 count=(concat model.arrangedInstances.length "")}} - {{/if}} - -
-