Improve peered service empty downstreams message (#13854)

This commit is contained in:
Michael Klein 2022-07-22 19:28:13 +02:00 committed by GitHub
parent a8df87f574
commit bcbc36ecec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,7 @@ import { inject as service } from '@ember/service';
export default class TopologyMetrics extends Component {
@service('env') env;
@service() abilities;
// =attributes
@tracked centerDimensions;
@ -87,8 +88,12 @@ export default class TopologyMetrics extends Component {
Namespace: '',
});
} else if (downstreams.length === 0) {
const canUsePeers = this.abilities.can('use peers');
items.push({
Name: 'No downstreams, or the downstreams are imported services.',
Name: canUsePeers
? 'No downstreams, or the downstreams are imported services.'
: 'No downstreams.',
Datacenter: '',
Namespace: '',
});