2023-03-14 13:18:55 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
*/
|
|
|
|
|
2022-09-15 08:43:17 +00:00
|
|
|
export default function (
|
2020-12-07 09:14:30 +00:00
|
|
|
visitable,
|
|
|
|
alias,
|
|
|
|
attribute,
|
2021-05-13 10:36:51 +00:00
|
|
|
present,
|
2020-12-07 09:14:30 +00:00
|
|
|
collection,
|
|
|
|
text,
|
|
|
|
tabs,
|
|
|
|
upstreams,
|
|
|
|
healthChecks
|
|
|
|
) {
|
2021-05-13 10:36:51 +00:00
|
|
|
const page = {
|
2020-04-08 09:56:36 +00:00
|
|
|
visit: visitable('/:dc/services/:service/instances/:node/:id'),
|
2020-04-22 14:40:59 +00:00
|
|
|
externalSource: attribute('data-test-external-source', '[data-test-external-source]', {
|
2020-05-07 13:57:15 +00:00
|
|
|
scope: '.title',
|
2020-04-22 14:40:59 +00:00
|
|
|
}),
|
2020-11-10 16:31:47 +00: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 13:57:15 +00: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 08:07:25 +00:00
|
|
|
address: text('[data-test-address]'),
|
|
|
|
}),
|
2020-05-26 15:52:32 +00:00
|
|
|
metadata: collection('.metadata [data-test-tabular-row]', {}),
|
2019-03-07 10:51:39 +00:00
|
|
|
};
|
2021-05-13 10:36:51 +00:00
|
|
|
page.tabs.healthChecksTab = {
|
|
|
|
criticalSerfNotice: present('[data-test-critical-serf-notice]'),
|
|
|
|
healthChecks: healthChecks(),
|
|
|
|
};
|
|
|
|
return page;
|
2019-03-07 10:51:39 +00:00
|
|
|
}
|