2022-08-26 03:22:55 +00:00
|
|
|
import Component from '@glimmer/component';
|
|
|
|
import { action } from '@ember/object';
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
|
|
|
|
export default class JobServiceRowComponent extends Component {
|
|
|
|
@service router;
|
2022-09-12 14:00:30 +00:00
|
|
|
@service system;
|
2022-08-26 03:22:55 +00:00
|
|
|
|
|
|
|
@action
|
|
|
|
gotoService(service) {
|
|
|
|
if (service.provider === 'nomad') {
|
|
|
|
this.router.transitionTo('jobs.job.services.service', service.name, {
|
|
|
|
queryParams: { level: service.level },
|
|
|
|
instances: service.instances,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2022-09-12 14:00:30 +00:00
|
|
|
|
|
|
|
get consulRedirectLink() {
|
|
|
|
return this.system.agent.get('config')?.UI?.Consul?.BaseUIURL;
|
|
|
|
}
|
2022-08-26 03:22:55 +00:00
|
|
|
}
|