Updates from swagger change

Signed-off-by: Chris Green <34572557+cgreen12@users.noreply.github.com>
This commit is contained in:
Chris Green
2019-06-05 14:30:53 -04:00
parent d834433d30
commit 5e0ecdd8d1
2 changed files with 2 additions and 2 deletions

View File

@@ -115,7 +115,7 @@ func HeatmapHandler(w http.ResponseWriter, r *http.Request) {
// draw all the boxes
for sourceIP, results := range checkResults.Responses {
if *results.OK {
for destinationIP, response := range results.Response {
for destinationIP, response := range results.Response.PodResults {
x, y := getPingBoxCoordinates(order[sourceIP], order[destinationIP], boxSize, paddingSize)
color := getPingBoxColor(response.ResponseTimeMs, tresholdLatencies)
drawPingBox(canvas, boxSize+x, boxSize+y, boxSize, color)

View File

@@ -31,7 +31,7 @@ func StartUpdater() {
for {
results := PingAllPods(GoldpingerConfig.PodSelecter.SelectPods())
var troublemakers []string
for podIP, value := range results {
for podIP, value := range results.PodResults {
if *value.OK != true {
troublemakers = append(troublemakers, fmt.Sprintf("%s (%s)", podIP, value.HostIP.String()))
}