Browse Source

fix bug in dashboard validation

pull/2/merge
Brett Langdon 13 years ago
parent
commit
779920b4f3
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      lib/api/dash.js

+ 2
- 2
lib/api/dash.js View File

@ -19,10 +19,10 @@ var validate_dashboard = function(dashboard){
}
for(var i in dashboard['graphs']){
if(!dashboard['graphs']['title']){
if(!dashboard['graphs'][i]['title']){
throw new Error(util.format('`dashboard["graphs"][%s]["title"]` is missing', i));
}
if(!dashboard['graphs']['definition']){
if(!dashboard['graphs'][i]['definition']){
throw new Error(util.format('`dashboard["graphs"][%s]["definition"]` is missing', i));
}
}


Loading…
Cancel
Save