...
|
...
|
@@ -143,66 +143,55 @@ $("#btn4type").click(function () { |
|
|
*/
|
|
|
function searchType(ip){
|
|
|
$("#detailTable").hide();
|
|
|
$.ajax({
|
|
|
url: contextPath + "/zkTree/getRoot",
|
|
|
type: "post",
|
|
|
dataType: "json",
|
|
|
data: {
|
|
|
ip: ip
|
|
|
},
|
|
|
success: function (data) {
|
|
|
$(function () {
|
|
|
$("#rootTable").table({
|
|
|
url: contextPath + "/zkTree/getRoot",
|
|
|
striped: true,
|
|
|
panelClass: "panel-success",
|
|
|
pagination: false,
|
|
|
loadFilter: function (data) {
|
|
|
return defaultLoadFilter(data);
|
|
|
},
|
|
|
columns: [{
|
|
|
title: "名称",
|
|
|
field: "name",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
var div = $("<div>");
|
|
|
var input = $("<input type=\"button\">").addClass("form-control").attr({
|
|
|
id :"name",
|
|
|
name : "name",
|
|
|
style : "border: none;",
|
|
|
value : value
|
|
|
}).appendTo(div);
|
|
|
input.click(function () {
|
|
|
toDetail(rowData,ip);
|
|
|
});
|
|
|
return div;
|
|
|
}
|
|
|
}, {
|
|
|
title: "路径",
|
|
|
field: "root"
|
|
|
}, {
|
|
|
title: "操作",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
var div = $("<div>");
|
|
|
$("#rootTable").table("load",{ip:ip});
|
|
|
$(function () {
|
|
|
$("#rootTable").table({
|
|
|
url: contextPath + "/zkTree/getRoot",
|
|
|
striped: true,
|
|
|
panelClass: "panel-success",
|
|
|
pagination: false,
|
|
|
loadFilter: function (data) {
|
|
|
return defaultLoadFilter(data);
|
|
|
},
|
|
|
columns: [{
|
|
|
title: "名称",
|
|
|
field: "name",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
var div = $("<div>");
|
|
|
var input = $("<input type=\"button\">").addClass("form-control").attr({
|
|
|
id :"name",
|
|
|
name : "name",
|
|
|
style : "border: none;",
|
|
|
value : value
|
|
|
}).appendTo(div);
|
|
|
input.click(function () {
|
|
|
toDetail(rowData,ip);
|
|
|
});
|
|
|
return div;
|
|
|
}
|
|
|
}, {
|
|
|
title: "路径",
|
|
|
field: "root"
|
|
|
}, {
|
|
|
title: "操作",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
var div = $("<div>");
|
|
|
|
|
|
//修改
|
|
|
var editBtn = $("<button data-target='#updateModal' data-toggle='modal'>").addClass("btn btn-xs btn-success").html("修改").appendTo(div);
|
|
|
editBtn.click(function () {
|
|
|
updateRoot(rowData,ip);
|
|
|
});
|
|
|
return div;
|
|
|
}
|
|
|
}],
|
|
|
});
|
|
|
//修改
|
|
|
var editBtn = $("<button data-target='#updateModal' data-toggle='modal'>").addClass("btn btn-xs btn-success").html("修改").appendTo(div);
|
|
|
editBtn.click(function () {
|
|
|
updateRoot(rowData,ip);
|
|
|
});
|
|
|
return div;
|
|
|
}
|
|
|
}],
|
|
|
});
|
|
|
|
|
|
});
|
|
|
},
|
|
|
error: function (e) {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function updateRoot(rowData,ip){
|
|
|
paramObj.name = rowData.name;
|
|
|
paramObj.root = rowData.root;
|
...
|
...
|
|