consul/ui-v2/tests/pages/dc/nodes/show.js

29 lines
1.0 KiB
JavaScript
Raw Normal View History

2018-07-04 14:06:20 +00:00
export default function(visitable, deletable, clickable, attribute, collection, radiogroup) {
return {
visit: visitable('/:dc/nodes/:node'),
tabs: radiogroup('tab', [
'health-checks',
'services',
'round-trip-time',
'lock-sessions',
'meta-data',
]),
2018-07-04 14:06:20 +00:00
healthchecks: collection('[data-test-node-healthcheck]', {
name: attribute('data-test-node-healthcheck'),
}),
services: collection('#services [data-test-tabular-row]', {
id: attribute('data-test-service-id', '[data-test-service-id]'),
name: attribute('data-test-service-name', '[data-test-service-name]'),
2018-07-04 14:06:20 +00:00
port: attribute('data-test-service-port', '.port'),
externalSource: attribute('data-test-external-source', 'a span'),
2018-07-04 14:06:20 +00:00
}),
sessions: collection(
'#lock-sessions [data-test-tabular-row]',
deletable({
TTL: attribute('data-test-session-ttl', '[data-test-session-ttl]'),
})
),
metaData: collection('#meta-data [data-test-tabular-row]', {}),
2018-07-04 14:06:20 +00:00
};
}