2020-12-07 09:14:30 +00:00
|
|
|
export default function(
|
|
|
|
visitable,
|
|
|
|
deletable,
|
|
|
|
clickable,
|
2021-05-13 10:36:51 +00:00
|
|
|
alias,
|
2020-12-07 09:14:30 +00:00
|
|
|
attribute,
|
2021-05-13 10:36:51 +00:00
|
|
|
present,
|
2020-12-07 09:14:30 +00:00
|
|
|
collection,
|
|
|
|
tabs,
|
|
|
|
text,
|
|
|
|
healthChecks
|
|
|
|
) {
|
2021-05-13 10:36:51 +00:00
|
|
|
const page = {
|
2018-07-04 14:06:20 +00:00
|
|
|
visit: visitable('/:dc/nodes/:node'),
|
2020-04-08 09:56:36 +00:00
|
|
|
tabs: tabs('tab', [
|
2019-08-02 11:53:52 +00:00
|
|
|
'health-checks',
|
2020-07-01 14:27:29 +00:00
|
|
|
'service-instances',
|
2019-08-02 11:53:52 +00:00
|
|
|
'round-trip-time',
|
|
|
|
'lock-sessions',
|
2020-05-04 18:06:25 +00:00
|
|
|
'metadata',
|
2019-08-02 11:53:52 +00:00
|
|
|
]),
|
2021-05-13 10:36:51 +00:00
|
|
|
healthChecks: alias('tabs.healthChecksTab.healthChecks'),
|
2020-07-01 14:27:29 +00:00
|
|
|
services: collection('.consul-service-instance-list > ul > li:not(:first-child)', {
|
|
|
|
name: text('[data-test-service-name]'),
|
|
|
|
port: attribute('data-test-service-port', '[data-test-service-port]'),
|
|
|
|
externalSource: attribute('data-test-external-source', '[data-test-external-source]'),
|
2018-07-04 14:06:20 +00:00
|
|
|
}),
|
2020-08-20 14:29:16 +00:00
|
|
|
sessions: collection('.consul-lock-session-list [data-test-list-row]', {
|
|
|
|
TTL: attribute('data-test-session-ttl', '[data-test-session-ttl]'),
|
|
|
|
delay: text('[data-test-session-delay]'),
|
|
|
|
actions: clickable('label'),
|
|
|
|
...deletable(),
|
|
|
|
}),
|
2021-01-05 10:05:59 +00:00
|
|
|
metadata: collection('.consul-metadata-list [data-test-tabular-row]', {}),
|
2018-07-04 14:06:20 +00:00
|
|
|
};
|
2021-05-13 10:36:51 +00:00
|
|
|
page.tabs.healthChecksTab = {
|
|
|
|
criticalSerfNotice: present('[data-test-critical-serf-notice]'),
|
|
|
|
healthChecks: healthChecks(),
|
|
|
|
};
|
|
|
|
return page;
|
2018-07-04 14:06:20 +00:00
|
|
|
}
|