|
|
$(
|
|
|
initRabbitSelect(),
|
|
|
updateOverView(),
|
|
|
updateClusterView(),
|
|
|
updateQueuesView()
|
|
|
initRabbitSelect()
|
|
|
);
|
|
|
|
|
|
function updateOverView(moId) {
|
|
|
|
|
|
$.ajax({
|
|
|
url: contextPath + "rabbitmq/overview",
|
|
|
type: "post",
|
...
|
...
|
@@ -18,17 +14,17 @@ function updateOverView(moId) { |
|
|
updateOverview(response);
|
|
|
},
|
|
|
error: function (e) {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function updateOverview(response) {
|
|
|
|
|
|
|
|
|
var div = document.getElementById("overviewDiv");
|
|
|
|
|
|
div.innerHTML="";
|
|
|
|
|
|
div.innerHTML = "";
|
|
|
|
|
|
var connections = $("<div>").addClass("micro-highlight").html("Connections:").appendTo(div);
|
|
|
|
|
|
var conValue = $("<strong>").html(response.data.connections).appendTo(connections);
|
...
|
...
|
@@ -63,13 +59,14 @@ function updateOverview(response) { |
|
|
}
|
|
|
|
|
|
function updateClusterView(moId) {
|
|
|
|
|
|
$("#clusterViewTable").table(
|
|
|
{
|
|
|
url: contextPath + "rabbitmq/clusterView",
|
|
|
queryParams : {
|
|
|
queryParams: {
|
|
|
moId: moId
|
|
|
}, //调用url传递的参数
|
|
|
method : "POST",
|
|
|
method: "POST",
|
|
|
striped: true,
|
|
|
panelClass: "panel-success",
|
|
|
pagination: true,
|
...
|
...
|
@@ -159,10 +156,10 @@ function updateQueuesView(moId) { |
|
|
$("#queueViewTable").table(
|
|
|
{
|
|
|
url: contextPath + "rabbitmq/queueView",
|
|
|
queryParams : {
|
|
|
method: "POST",
|
|
|
queryParams: {
|
|
|
moId: moId
|
|
|
}, //调用url传递的参数
|
|
|
method : "POST",
|
|
|
striped: true,
|
|
|
panelClass: "panel-success",
|
|
|
pagination: true,
|
...
|
...
|
@@ -240,14 +237,14 @@ function updateQueuesView(moId) { |
|
|
|
|
|
function fixAlertHigh(rowData, rowIndex) {
|
|
|
|
|
|
/* alert(rowIndex);
|
|
|
alert(rowData.name);
|
|
|
alert($("#msg_alert_high_" + rowIndex + "").val());*/
|
|
|
/* alert(rowIndex);
|
|
|
alert(rowData.name);
|
|
|
alert($("#msg_alert_high_" + rowIndex + "").val());*/
|
|
|
$.ajax({
|
|
|
url: contextPath + "rabbitmq/fixAlertHigh",
|
|
|
type: "post",
|
|
|
dataType: "json",
|
|
|
data:{
|
|
|
data: {
|
|
|
moId: $('#rabbitMqSelected option:selected').val(),
|
|
|
queueName: rowData.name,
|
|
|
alertHigh: $("#msg_alert_high_" + rowIndex + "").val()
|
...
|
...
|
@@ -264,6 +261,10 @@ function initRabbitSelect() { |
|
|
success: function (response) {
|
|
|
//将查询到的数据,update到选择框中
|
|
|
genarateRabbitSelectOption(response.data);
|
|
|
updateOverView((response.data)[0].moId);
|
|
|
updateClusterView((response.data)[0].moId);
|
|
|
updateQueuesView((response.data)[0].moId);
|
|
|
|
|
|
},
|
|
|
error: function (e) {
|
|
|
}
|
...
|
...
|
@@ -285,17 +286,15 @@ function genarateRabbitSelectOption(optionList) { |
|
|
*/
|
|
|
function rabbitUpdateSelectOnChange() {
|
|
|
var rabbitId = $('#rabbitMqSelected option:selected').val().replace(/\'/g, '\"');
|
|
|
updateOverView(rabbitId);
|
|
|
updateClusterView(rabbitId);
|
|
|
updateQueuesView(rabbitId);
|
|
|
}
|
|
|
|
|
|
|
|
|
/*function updateTable() {
|
|
|
$("#queueViewTable").table("load", {moId: 135});
|
|
|
|
|
|
$("#clusterViewTable").table("load", {moId: 135});
|
|
|
}*/
|
|
|
updateOverView(rabbitId);
|
|
|
|
|
|
$("#clusterViewTable").table("load", {
|
|
|
'moId': rabbitId
|
|
|
});
|
|
|
$("#queueViewTable").table("load", {
|
|
|
'moId': rabbitId
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|