|
|
|
@ -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)); |
|
|
|
} |
|
|
|
} |
|
|
|
|