Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
fix topology bugs and update style
Browse files Browse the repository at this point in the history
  • Loading branch information
shekenahglory committed Dec 20, 2016
1 parent cf910bf commit b73e450
Show file tree
Hide file tree
Showing 7 changed files with 411 additions and 326 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
"API": true,
"TradeFeed": true,
"PriceChart": true,
"OrderBook": true
"OrderBook": true,
"_": true
}
}
}
24 changes: 21 additions & 3 deletions src/app/topology/topology.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ angular.module('ripplecharts.topology', [
$scope.weight = store.get('weight-mode') || 'connections'

var t = new Topology($http)
var m = new TopologyMap($http, t)
var m = new TopologyMap($http)

function versionToColor(stable, version) {
var v = version.split('-')[1]
Expand All @@ -41,10 +41,10 @@ angular.module('ripplecharts.topology', [
return '#c11'

} else if (comp === 1) {
return '#66b'
return '#36c'

} else {
return '#38b'
return '#3a3'
}
}

Expand Down Expand Up @@ -120,6 +120,24 @@ angular.module('ripplecharts.topology', [
}

if (p1[1] && p2[1]) {
na = /b/.test(p1[1])
nb = /b/.test(p2[1])

if (na && !nb) {
return -1
} else if (nb && !na) {
return 1
}

na = /rc/.test(p1[1])
nb = /rc/.test(p2[1])

if (na && !nb) {
return -1
} else if (nb && !na) {
return 1
}

na = Number(p1[1].replace(/[^0-9-]+/, ''), 10)
nb = Number(p2[1].replace(/[^0-9-]+/, ''), 10)

Expand Down
2 changes: 1 addition & 1 deletion src/app/topology/topology.less
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@

.stable span {
margin: 10px 0;
color: #38b;
color: #3a3;
font-weight: bold;
}
}
Expand Down
Loading

0 comments on commit b73e450

Please sign in to comment.