mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 08:18:43 -03:30
add data-cy attr
This commit is contained in:
@@ -161,11 +161,13 @@ function MeshGraph({ data }) {
|
|||||||
const link = svg
|
const link = svg
|
||||||
.append('g')
|
.append('g')
|
||||||
.attr('class', `links`)
|
.attr('class', `links`)
|
||||||
|
.attr('data-cy', 'links')
|
||||||
.selectAll('path')
|
.selectAll('path')
|
||||||
.data(graph.links)
|
.data(graph.links)
|
||||||
.enter()
|
.enter()
|
||||||
.append('path')
|
.append('path')
|
||||||
.attr('class', (d, i) => `link-${i}`)
|
.attr('class', (d, i) => `link-${i}`)
|
||||||
|
.attr('data-cy', (d) => `${d.source}-${d.target}`)
|
||||||
.style('fill', 'none')
|
.style('fill', 'none')
|
||||||
.style('stroke', '#ccc')
|
.style('stroke', '#ccc')
|
||||||
.style('stroke-width', '2px')
|
.style('stroke-width', '2px')
|
||||||
@@ -177,6 +179,7 @@ function MeshGraph({ data }) {
|
|||||||
const node = svg
|
const node = svg
|
||||||
.append('g')
|
.append('g')
|
||||||
.attr('class', 'nodes')
|
.attr('class', 'nodes')
|
||||||
|
.attr('data-cy', 'nodes')
|
||||||
.selectAll('g')
|
.selectAll('g')
|
||||||
.data(graph.nodes)
|
.data(graph.nodes)
|
||||||
.enter()
|
.enter()
|
||||||
@@ -225,6 +228,7 @@ function MeshGraph({ data }) {
|
|||||||
.append('g')
|
.append('g')
|
||||||
.selectAll('g')
|
.selectAll('g')
|
||||||
.attr('class', 'chart-legend')
|
.attr('class', 'chart-legend')
|
||||||
|
.attr('data-cy', 'chart-legend')
|
||||||
.data(graph.nodes)
|
.data(graph.nodes)
|
||||||
.enter()
|
.enter()
|
||||||
.append('circle')
|
.append('circle')
|
||||||
@@ -238,6 +242,7 @@ function MeshGraph({ data }) {
|
|||||||
svg
|
svg
|
||||||
.append('g')
|
.append('g')
|
||||||
.attr('class', 'chart-text')
|
.attr('class', 'chart-text')
|
||||||
|
.attr('data-cy', 'chart-text')
|
||||||
.selectAll('g')
|
.selectAll('g')
|
||||||
.data(graph.nodes)
|
.data(graph.nodes)
|
||||||
.enter()
|
.enter()
|
||||||
@@ -252,6 +257,7 @@ function MeshGraph({ data }) {
|
|||||||
.select('#chart')
|
.select('#chart')
|
||||||
.append('div')
|
.append('div')
|
||||||
.attr('class', 'd3-tooltip')
|
.attr('class', 'd3-tooltip')
|
||||||
|
.attr('data-cy', 'd3-tooltip')
|
||||||
.style('position', 'absolute')
|
.style('position', 'absolute')
|
||||||
.style('top', '200px')
|
.style('top', '200px')
|
||||||
.style('right', '40px')
|
.style('right', '40px')
|
||||||
|
|||||||
Reference in New Issue
Block a user