Remove Disconnected link state

Dynamically flipping from Established
to Disconnected is not the intended
usage of InstanceLink State.

- Link state starts in Adding and becomes
Established once any control node first sees the link
is in the status KnownConnectionCosts
This commit is contained in:
Seth Foster
2023-08-04 12:02:03 -04:00
committed by Seth Foster
parent ad96a72ebe
commit 3e8202590c
7 changed files with 8 additions and 36 deletions

View File

@@ -252,22 +252,6 @@ function Legend() {
</DescriptionListTerm>
<DescriptionListDescription>{t`Established`}</DescriptionListDescription>
</DescriptionListGroup>
<DescriptionListGroup>
<DescriptionListTerm>
<svg width="20" height="15" xmlns="http://www.w3.org/2000/svg">
<line
x1="0"
y1="9"
x2="20"
y2="9"
stroke="#ccc"
strokeWidth="4"
strokeDasharray="6"
/>
</svg>
</DescriptionListTerm>
<DescriptionListDescription>{t`Disconnected`}</DescriptionListDescription>
</DescriptionListGroup>
<DescriptionListGroup>
<DescriptionListTerm>
<svg width="20" height="15" xmlns="http://www.w3.org/2000/svg">

View File

@@ -181,7 +181,6 @@ function MeshGraph({
.data([
'end',
'end-active',
'end-disconnected',
'end-adding',
'end-removing',
])
@@ -197,7 +196,6 @@ function MeshGraph({
mesh.select('#end').attr('refX', 23).attr('fill', '#6A6E73');
mesh.select('#end-removing').attr('refX', 23).attr('fill', '#C9190B');
mesh.select('#end-adding').attr('refX', 23).attr('fill', '#3E8635');
mesh.select('#end-disconnected').attr('refX', 23).attr('fill', '#CCC');
mesh.select('#end-active').attr('refX', 18).attr('fill', '#0066CC');
// Add links
@@ -214,9 +212,6 @@ function MeshGraph({
.attr('x2', (d) => d.target.x)
.attr('y2', (d) => d.target.y)
.attr('marker-end', (d) => {
if (d.link_state === 'disconnected') {
return 'url(#end-disconnected)';
}
if (d.link_state === 'adding') {
return 'url(#end-adding)';
}
@@ -366,9 +361,6 @@ function MeshGraph({
.style('stroke', (d) => renderLinkStatusColor(d.link_state))
.style('stroke-width', '2px')
.attr('marker-end', (d) => {
if (d.link_state === 'disconnected') {
return 'url(#end-disconnected)';
}
if (d.link_state === 'adding') {
return 'url(#end-adding)';
}

View File

@@ -29,7 +29,6 @@ export const NODE_STATE_COLOR_KEY = {
export const LINK_STATE_COLOR_KEY = {
established: '#6A6E73',
disconnected: '#CCC',
adding: '#3E8635',
removing: '#C9190B',
};

View File

@@ -95,7 +95,6 @@ export function redirectToDetailsPage(selectedNode, history) {
export function renderLinkState(linkState) {
const linkPattern = {
established: null,
disconnected: 3,
adding: 3,
removing: 3,
};
@@ -111,7 +110,7 @@ export function getRandomInt(min, max) {
const generateRandomLinks = (n, r) => {
const links = [];
function getRandomLinkState() {
return ['established', 'adding', 'removing', 'disconnected'][
return ['established', 'adding', 'removing'][
getRandomInt(0, 3)
];
}