2021-01-12 14:53:21 +00:00
|
|
|
export default function(
|
|
|
|
visitable,
|
|
|
|
clickable,
|
|
|
|
attribute,
|
|
|
|
collection,
|
|
|
|
text,
|
|
|
|
intentions,
|
|
|
|
filter,
|
|
|
|
tabs
|
|
|
|
) {
|
2020-05-19 16:18:04 +00:00
|
|
|
const page = {
|
2018-07-04 14:06:20 +00:00
|
|
|
visit: visitable('/:dc/services/:service'),
|
2020-04-21 14:21:52 +00:00
|
|
|
externalSource: attribute('data-test-external-source', '[data-test-external-source]', {
|
2020-05-07 13:57:15 +00:00
|
|
|
scope: '.title',
|
2020-04-21 14:21:52 +00:00
|
|
|
}),
|
2019-05-02 13:35:42 +00:00
|
|
|
dashboardAnchor: {
|
|
|
|
href: attribute('href', '[data-test-dashboard-anchor]'),
|
|
|
|
},
|
2020-10-27 14:25:23 +00:00
|
|
|
metricsAnchor: {
|
|
|
|
href: attribute('href', '[data-test-metrics-anchor]'),
|
|
|
|
},
|
2020-05-13 15:28:11 +00:00
|
|
|
tabs: tabs('tab', [
|
2020-10-23 13:45:10 +00:00
|
|
|
'topology',
|
2020-05-13 15:28:11 +00:00
|
|
|
'instances',
|
|
|
|
'linked-services',
|
|
|
|
'upstreams',
|
|
|
|
'intentions',
|
|
|
|
'routing',
|
|
|
|
'tags',
|
|
|
|
]),
|
2020-06-12 15:50:09 +00:00
|
|
|
filter: filter(),
|
2020-04-16 14:15:45 +00:00
|
|
|
// TODO: These need to somehow move to subpages
|
2020-04-21 14:21:52 +00:00
|
|
|
instances: collection('.consul-service-instance-list > ul > li:not(:first-child)', {
|
2020-04-16 14:15:45 +00:00
|
|
|
address: text('[data-test-address]'),
|
2021-01-12 14:53:21 +00:00
|
|
|
instance: clickable('a'),
|
2020-04-16 14:15:45 +00:00
|
|
|
}),
|
2020-10-26 09:30:07 +00:00
|
|
|
intentionList: intentions(),
|
2020-05-19 16:18:04 +00:00
|
|
|
};
|
|
|
|
page.tabs.upstreamsTab = {
|
2020-09-22 17:20:44 +00:00
|
|
|
services: collection('.consul-upstream-list > ul > li:not(:first-child)', {
|
2020-05-19 16:18:04 +00:00
|
|
|
name: text('[data-test-service-name]'),
|
|
|
|
}),
|
|
|
|
};
|
|
|
|
page.tabs.linkedServicesTab = {
|
|
|
|
services: collection('.consul-service-list > ul > li:not(:first-child)', {
|
2020-05-12 21:34:47 +00:00
|
|
|
name: text('[data-test-service-name]'),
|
|
|
|
}),
|
2018-07-04 14:06:20 +00:00
|
|
|
};
|
2020-05-19 16:18:04 +00:00
|
|
|
return page;
|
2018-07-04 14:06:20 +00:00
|
|
|
}
|