Skip to content

Commit

Permalink
#154: updating dashboard graphs to support recent changes to JSON output
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfsilva committed Apr 19, 2020
1 parent 80e152e commit 189c1c8
Show file tree
Hide file tree
Showing 5 changed files with 212 additions and 135 deletions.
15 changes: 7 additions & 8 deletions tools/wrench/dashboard/scripts/button-clicks.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function showHideArrow(id, arrowId) {
function getHostNames(data) {
var hostNames = new Set();

data.forEach(function(task) {
var hostName = task['execution host'].hostname
data.forEach(function (task) {
var hostName = task['execution_host'].hostname
hostNames.add(hostName)
})

Expand All @@ -34,18 +34,18 @@ function switchToHostView(data, selectedHost) {
var hostNames = getHostNames(data)

if (!hostColoursJSONPopulated()) {
hostNames.forEach(function(hostName) {
hostNames.forEach(function (hostName) {
var colour = getRandomColour()
while (colour === '#FF0000' || colour === '#FFA500') {
colour = getRandomColour()
}
hostColours[hostName] = colour
})
}


data.forEach(function(task) {
var hostName = task['execution host'].hostname

data.forEach(function (task) {
var hostName = task['execution_host'].hostname
var sanitizedId = sanitizeId(task.task_id)
var taskRead = d3.select(`#${sanitizedId} .read`)
var taskCompute = d3.select(`#${sanitizedId} .compute`)
Expand Down Expand Up @@ -114,7 +114,6 @@ function legendHover(hostName, id, alreadySelected) {
}



function legendClick(hostName, id) {
var legendElement = d3.select(`#${id}`)
if (hostName === currentlySelectedHost.hostName) {
Expand All @@ -124,7 +123,7 @@ function legendClick(hostName, id) {
legendElement.style("font-weight", "normal")
switchToHostView(data.contents, "")
return
}
}
if (currentlySelectedHost.hostName !== "" && hostName !== currentlySelectedHost.hostName) {
// deselect different host
var currentlySelectedLegendElement = d3.select(`#${currentlySelectedHost.id}`)
Expand Down
Loading

0 comments on commit 189c1c8

Please sign in to comment.