|
|
|
@ -1,4 +1,5 @@ |
|
|
|
var client = require("../client"); |
|
|
|
var json = require("../json"); |
|
|
|
var util = require("util"); |
|
|
|
|
|
|
|
/*section: timeboard |
|
|
|
@ -249,10 +250,10 @@ module.exports = { |
|
|
|
} else if(subcommand === "create"){ |
|
|
|
var title = args._[4]; |
|
|
|
var description = args._[5]; |
|
|
|
var graphs = JSON.parse(args._[6]); |
|
|
|
var graphs = json.parse(args._[6]); |
|
|
|
var templateVariables = []; |
|
|
|
if(args["tmpvars"]){ |
|
|
|
templateVariables = JSON.parse(args["tmpvars"]); |
|
|
|
templateVariables = json.parse(args["tmpvars"]); |
|
|
|
} |
|
|
|
|
|
|
|
create(title, description, graphs, templateVariables, callback); |
|
|
|
@ -260,10 +261,10 @@ module.exports = { |
|
|
|
var dashId = parseInt(args._[4]); |
|
|
|
var title = args._[5]; |
|
|
|
var description = args._[6]; |
|
|
|
var graphs = JSON.parse(args._[7]); |
|
|
|
var graphs = json.parse(args._[7]); |
|
|
|
var templateVariables = []; |
|
|
|
if(args["tmpvars"]){ |
|
|
|
templateVariables = JSON.parse(args["tmpvars"]); |
|
|
|
templateVariables = json.parse(args["tmpvars"]); |
|
|
|
} |
|
|
|
|
|
|
|
update(dashId, title, description, graphs, templateVariables, callback); |
|
|
|
|