mirror of https://github.com/rancher/ui.git
28 lines
836 B
JavaScript
28 lines
836 B
JavaScript
import Resource from '@rancher/ember-api-store/models/resource';
|
|
import { reference } from '@rancher/ember-api-store/utils/denormalize';
|
|
import { inject as service } from '@ember/service';
|
|
import { computed } from '@ember/object';
|
|
|
|
export default Resource.extend({
|
|
clusterStore: service(),
|
|
router: service(),
|
|
|
|
canHaveLabels: true,
|
|
namespace: reference('namespaceId', 'namespace', 'clusterStore'),
|
|
|
|
displayHostsString: computed('hosts.[]', function() {
|
|
return (this.hosts || []).join(', ');
|
|
}),
|
|
|
|
actions: {
|
|
edit() {
|
|
this.router.transitionTo('authenticated.project.istio.virtual-service.detail.edit', this.id);
|
|
},
|
|
|
|
clone() {
|
|
this.router.transitionTo('authenticated.project.istio.virtual-service.new', this.projectId, { queryParams: { id: this.id } });
|
|
},
|
|
},
|
|
|
|
});
|