diff options
| author | Kristian Lyngstol <kristian@bohemians.org> | 2016-05-20 18:25:26 +0200 | 
|---|---|---|
| committer | Kristian Lyngstol <kristian@bohemians.org> | 2016-05-20 18:25:26 +0200 | 
| commit | 86bf244293bdb72b4bf27d3204d6984ab0c60a12 (patch) | |
| tree | 549ad5b06c4c80349265d8e7f218df14340fc59a /web/js/nms-admin-pane.js | |
| parent | 746e73a9ea27dc90047ac26950c21f963bf99af5 (diff) | |
Add rudimentary way of providing linknets.
Needs a lot of work, including the API side, possibly also the schema.
Diffstat (limited to 'web/js/nms-admin-pane.js')
| -rw-r--r-- | web/js/nms-admin-pane.js | 19 | 
1 files changed, 19 insertions, 0 deletions
diff --git a/web/js/nms-admin-pane.js b/web/js/nms-admin-pane.js index 9edf9f9..235da8d 100644 --- a/web/js/nms-admin-pane.js +++ b/web/js/nms-admin-pane.js @@ -78,3 +78,22 @@ nmsAdmin.updateConfigPane = function() {  		}  	}  } + +nmsAdmin.addLinknet = function() { +	var myData = {  +		"switch1": document.getElementById("admin-input-linknet1").value, +		"switch2": document.getElementById("admin-input-linknet2").value +		}; +	myData = JSON.stringify(myData); +	$.ajax({ +		type: "POST", +		url: "/api/write/linknet-add", +		dataType: "text", +		data:myData, +		success: function (data, textStatus, jqXHR) { +			nmsData.invalidate("switches"); +			document.getElementById("admin-input-linknet1").value = ""; +			document.getElementById("admin-input-linknet2").value = ""; +		} +	}); +}  | 
