Tweak silence JSON preview to work better with multiple instances

This commit is contained in:
Łukasz Mierzwa
2017-06-30 23:30:53 -07:00
parent 514eacb81d
commit 175078320e
2 changed files with 11 additions and 5 deletions

View File

@@ -79,10 +79,16 @@ var Silence = (function() {
};
var silenceFormJSONRender = function() {
var d = "curl $AlertmanagerURI" +
"\n -X POST --data " +
JSON.stringify(silenceFormData(), undefined, 2);
$("#silenceJSONBlob").html(d);
var d = [];
$.each(silenceFormAlertmanagerURL(), function(i, uri) {
if (i > 0) {
d.push("\n");
}
d.push("curl " + uri);
});
d.push("\n -X POST --data ");
d.push(JSON.stringify(silenceFormData(), undefined, 2));
$("#silenceJSONBlob").html(d.join(""));
};
var silenceFormUpdateDuration = function(event) {

File diff suppressed because one or more lines are too long