mirror of https://github.com/hashicorp/consul
Kenia
3 years ago
committed by
GitHub
8 changed files with 83 additions and 11 deletions
@ -0,0 +1,3 @@
|
||||
```release-note:feature |
||||
ui: Adding support in Topology view for Routing Configurations |
||||
``` |
@ -0,0 +1,11 @@
|
||||
import Component from '@glimmer/component'; |
||||
import { get } from '@ember/object'; |
||||
|
||||
export default class TopologyMetrics extends Component { |
||||
// =methods
|
||||
get hrefPath() { |
||||
const source = get(this.args.item, 'Source'); |
||||
|
||||
return source === 'routing-config' ? 'dc.routing-config' : 'dc.services.show.index'; |
||||
} |
||||
} |
@ -1,6 +1,7 @@
|
||||
<span |
||||
data-test-topology-metrics-source-type |
||||
class="topology-metrics-source-type" |
||||
{{tooltip (t "components.consul.topology-metrics.source-type.tooltip")}} |
||||
{{tooltip (t (concat "components.consul.topology-metrics.source-type." @source ".tooltip"))}} |
||||
> |
||||
{{t "components.consul.topology-metrics.source-type.text"}} |
||||
{{t (concat "components.consul.topology-metrics.source-type." @source ".text")}} |
||||
</span> |
@ -0,0 +1,34 @@
|
||||
@setupApplicationTest |
||||
Feature: dc / services / show / topology / routing-config |
||||
Background: |
||||
Given 1 datacenter model with the value "dc1" |
||||
And 1 node models |
||||
And 1 service model from yaml |
||||
--- |
||||
- Service: |
||||
Name: service-0 |
||||
ID: service-0-with-id |
||||
--- |
||||
And 1 topology model from yaml |
||||
--- |
||||
Upstreams: [] |
||||
Downstreams: |
||||
- Name: db |
||||
Namespace: @namespace |
||||
Datacenter: dc1 |
||||
Intention: {} |
||||
Source: routing-config |
||||
--- |
||||
When I visit the service page for yaml |
||||
--- |
||||
dc: dc1 |
||||
service: service-0 |
||||
--- |
||||
And I see topology on the tabs |
||||
Scenario: Given the Source is routing config, show Source Type |
||||
Then I see the text "Routing configuration" in "[data-test-topology-metrics-source-type]" |
||||
Scenario: Given the Source is routing config, redirect to Routing Config page |
||||
When I click "[data-test-topology-metrics-card]" |
||||
Then the url should be /dc1/routing-config/db |
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
import steps from '../../../../steps'; |
||||
|
||||
// step definitions that are shared between features should be moved to the
|
||||
// tests/acceptance/steps/steps.js file
|
||||
|
||||
export default function(assert) { |
||||
return steps(assert).then('I should find a file', function() { |
||||
assert.ok(true, this.step); |
||||
}); |
||||
} |
Loading…
Reference in new issue