mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 21:35:52 +00:00
bb95738321
Adds a 'status' for the filtering/searching in the UI, without this its not super clear that you are filtering a recordset due to the menu selections being hidden once closed. You can also use the pills in this status view to delete individual filters.
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
export default function(visitable, clickable, attribute, collection, text, intentions, tabs) {
|
|
const page = {
|
|
visit: visitable('/:dc/services/:service'),
|
|
externalSource: attribute('data-test-external-source', '[data-test-external-source]', {
|
|
scope: '.title',
|
|
}),
|
|
dashboardAnchor: {
|
|
href: attribute('href', '[data-test-dashboard-anchor]'),
|
|
},
|
|
metricsAnchor: {
|
|
href: attribute('href', '[data-test-metrics-anchor]'),
|
|
},
|
|
tabs: tabs('tab', [
|
|
'topology',
|
|
'instances',
|
|
'linked-services',
|
|
'upstreams',
|
|
'intentions',
|
|
'routing',
|
|
'tags',
|
|
]),
|
|
// TODO: These need to somehow move to subpages
|
|
instances: collection('.consul-service-instance-list > ul > li:not(:first-child)', {
|
|
address: text('[data-test-address]'),
|
|
instance: clickable('a'),
|
|
}),
|
|
intentionList: intentions(),
|
|
};
|
|
page.tabs.upstreamsTab = {
|
|
services: collection('.consul-upstream-list > ul > li:not(:first-child)', {
|
|
name: text('[data-test-service-name]'),
|
|
}),
|
|
};
|
|
page.tabs.linkedServicesTab = {
|
|
services: collection('.consul-service-list > ul > li:not(:first-child)', {
|
|
name: text('[data-test-service-name]'),
|
|
}),
|
|
};
|
|
return page;
|
|
}
|