Skip to content

Commit

Permalink
Merge pull request skydive-project#23 from eranra/fix_submariner2
Browse files Browse the repository at this point in the history
adding colors to edges for submariner example
  • Loading branch information
safchain authored Feb 23, 2020
2 parents 26e320b + 48c124f commit 36e235a
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 3 deletions.
6 changes: 4 additions & 2 deletions tools/csvstoskyui/data/example_submariner/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,13 @@ var DefaultConfig = {
switch (link.data.RelationType) {
case "ipsec":
attrs.label = link.data.RelationType
attrs.classes.push('traffic')
attrs.classes.push("traffic")
attrs.classes.push('ipsec_traffic')
break
case "vxlan":
attrs.label = link.data.RelationType
attrs.classes.push('traffic')
attrs.classes.push("traffic")
attrs.classes.push('vxlan_traffic')
break
}

Expand Down
62 changes: 62 additions & 0 deletions tools/csvstoskyui/data/example_submariner/topology.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
.host .node-hexagon {
fill: #114B5F;
}

.netns .node-hexagon {
fill: #C6DABF;
}

.bridge .node-hexagon, .ovsbridge .node-hexagon, .port .node-hexagon, .ovsport .node-hexagon {
fill: #36b791;
}

.interface .node-hexagon, .device .node-hexagon, .tun .node-hexagon, .tap .node-hexagon, .veth .node-hexagon {
fill: #88D498;
}

.down .node-hexagon {
fill: rgb(163, 0, 0);
}

.host .node-icon {
fill: #eee;
}

.netns .node-icon {
fill: #444;
}

.bridge .node-icon, .ovsbridge .node-icon, .port .node-icon, .ovsport .node-icon {
fill: #eee;
}

.interface .node-icon, .device .node-icon, .tun .node-icon, .tap .node-icon, .veth .node-icon {
fill: #444;
}

.down .node-icon {
fill: #eee;
}

.traffic {
stroke-dasharray: 5;
animation: traffic 3s linear;
animation-iteration-count: infinite;
}

.ipsec_traffic {
stroke: #00FF11;
stroke-width: 5px;
markerWidth: 3px;
markerHeight: 3px;
}

.vxlan_traffic {
stroke: #00FFFF;
}

@keyframes traffic {
to {
stroke-dashoffset: -100;
}
}
5 changes: 4 additions & 1 deletion tools/csvstoskyui/do.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ for rules_filename in data/$data_dir/*.conf; do
mountconf_to_docker=$mountconf_to_docker" -v "$dir"/"$destjson_dir"/"$destjsonfile":/usr/src/skydive-ui/assets/"$destjsonfile
done

echo "$dir"/data/$data_dir/Config.ts
if [[ -f "$dir"/data/$data_dir/topology.css ]]; then
mountconf_to_docker=$mountconf_to_docker" -v "$dir"/data/"$data_dir"/topology.css:/usr/src/skydive-ui/assets/topology.css"
fi

if [[ -f "$dir"/data/$data_dir/config.js ]]; then
mountconf_to_docker=$mountconf_to_docker" -v "$dir"/data/"$data_dir"/config.js:/usr/src/skydive-ui/assets/config.js"
fi
Expand Down

0 comments on commit 36e235a

Please sign in to comment.