applicationServers_parameter = {};
function applicationServers_list() {
$('#content').html('');
$('#result').html('');
$.ajax({
type : 'get',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/applicationservers',
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).done(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
if (json.type == 'success') {
if (json.data) {
var str = '
';
str += '| order | name | host | port | username | operate |
';
$.each(json.data, function(index, o) {
str += '';
str += '| ' + o.order + ' | ';
str += '' + o.name + ' | ';
str += '' + o.host + ' | ';
str += '' + o.port + ' | ';
str += '' + o.username + ' | ';
str += 'edit ';
str += 'delete';
str += ' | ';
str += '
'
str += '| ' + o.status + ' | ';
str += '';
if (o.message) {
str += o.message;
} else {
str += ' ';
}
str += ' | ';
str += '
'
str += '| planList | ';
str += '| name | weight | ';
if (o.planList) {
$.each(o.planList, function(idx, p) {
str += '| ' + p.name + ' | ' + p.weight + ' | ';
})
}
str += '
| ';
str += '';
str += 'deploy ';
str += 'redeploy';
str += ' | ';
str += '
';
});
str += '
';
$('#content').html(str);
}
} else {
failure(json);
}
});
}