mirror of
https://github.com/status-im/consul.git
synced 2025-01-31 16:07:58 +00:00
db5283ee24
* Refactor Stats and Series components * Refactor metrics error message for ingress-gateway * Fix upLines icon positioning * Remove unused variable from being passed down to Stats
26 lines
640 B
JavaScript
26 lines
640 B
JavaScript
import Route from '@ember/routing/route';
|
|
import { inject as service } from '@ember/service';
|
|
|
|
export default class TopologyRoute extends Route {
|
|
@service('ui-config') config;
|
|
@service('env') env;
|
|
|
|
model() {
|
|
const parent = this.routeName
|
|
.split('.')
|
|
.slice(0, -1)
|
|
.join('.');
|
|
|
|
return {
|
|
...this.modelFor(parent),
|
|
hasMetricsProvider: !!this.config.get().metrics_provider,
|
|
isRemoteDC: this.env.var('CONSUL_DATACENTER_LOCAL') !== this.modelFor('dc').dc.Name,
|
|
};
|
|
}
|
|
|
|
setupController(controller, model) {
|
|
super.setupController(...arguments);
|
|
controller.setProperties(model);
|
|
}
|
|
}
|