2020-12-07 09:14:30 +00:00
|
|
|
export default function(
|
|
|
|
visitable,
|
|
|
|
alias,
|
|
|
|
attribute,
|
2021-05-13 11:36:51 +01:00
|
|
|
present,
|
2020-12-07 09:14:30 +00:00
|
|
|
collection,
|
|
|
|
text,
|
|
|
|
tabs,
|
|
|
|
upstreams,
|
|
|
|
healthChecks
|
|
|
|
) {
|
2021-05-13 11:36:51 +01:00
|
|
|
const page = {
|
2020-04-08 10:56:36 +01:00
|
|
|
visit: visitable('/:dc/services/:service/instances/:node/:id'),
|
2020-04-22 10:40:59 -04:00
|
|
|
externalSource: attribute('data-test-external-source', '[data-test-external-source]', {
|
2020-05-07 09:57:15 -04:00
|
|
|
scope: '.title',
|
2020-04-22 10:40:59 -04:00
|
|
|
}),
|
2020-11-10 11:31:47 -05:00
|
|
|
tabs: tabs('tab', ['health-checks', 'upstreams', 'exposed-paths', 'addresses', 'tags-&-meta']),
|
2020-12-07 09:14:30 +00:00
|
|
|
checks: alias('healthChecks.item'),
|
|
|
|
healthChecks: healthChecks(),
|
2020-11-12 18:45:11 +00:00
|
|
|
upstreams: alias('upstreamInstances.item'),
|
|
|
|
upstreamInstances: upstreams(),
|
2020-05-07 09:57:15 -04:00
|
|
|
exposedPaths: collection('[data-test-proxy-exposed-paths] > tbody tr', {
|
2019-11-25 18:45:10 +00:00
|
|
|
combinedAddress: text('[data-test-combined-address]'),
|
|
|
|
}),
|
2021-01-05 10:05:59 +00:00
|
|
|
addresses: collection('.consul-tagged-addresses [data-test-tabular-row]', {
|
2019-07-05 09:07:25 +01:00
|
|
|
address: text('[data-test-address]'),
|
|
|
|
}),
|
2020-05-26 11:52:32 -04:00
|
|
|
metadata: collection('.metadata [data-test-tabular-row]', {}),
|
2019-03-07 11:51:39 +01:00
|
|
|
};
|
2021-05-13 11:36:51 +01:00
|
|
|
page.tabs.healthChecksTab = {
|
|
|
|
criticalSerfNotice: present('[data-test-critical-serf-notice]'),
|
|
|
|
healthChecks: healthChecks(),
|
|
|
|
};
|
|
|
|
return page;
|
2019-03-07 11:51:39 +01:00
|
|
|
}
|