From 3224688328dadf0d36237c3831c9b9ac98f63861 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Mon, 14 Nov 2016 19:08:29 +0100 Subject: More GUI for the templating frontend Fixes #151 While there are certainly more things that can be done - such as reading the list of templates dynamically, it wouldn't be horrible to go into production with the GUI the way it is right now. --- web/js/nms-template.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/js/nms-template.js') diff --git a/web/js/nms-template.js b/web/js/nms-template.js index a3cbe92..68e0286 100644 --- a/web/js/nms-template.js +++ b/web/js/nms-template.js @@ -7,9 +7,10 @@ var nmsTemplate = nmsTemplate || { nmsTemplate.test = function() { var input = document.getElementById("template-input"); var output = document.getElementById("template-output"); + var qp = document.getElementById("template-query-params"); $.ajax({ type: "POST", - url: "/api/templates/test", + url: "/api/templates/test" + qp.value, async: false, data: input.value, dataType: "text", @@ -31,7 +32,6 @@ nmsTemplate.fromFile = function(template) { type: "GET", url: "/templates/" + template, async: false, - data: input.value, dataType: "text", success: function (indata, textStatus, jqXHR) { var output = document.getElementById("template-input"); -- cgit v1.2.3