Archived
0

MCSM: запрос информации о сервере

This commit is contained in:
2017-05-02 15:39:04 +03:00
parent 3378c49444
commit 41e7fad9e1
7 changed files with 136 additions and 15 deletions

View File

@@ -71,9 +71,21 @@ var ServerInfo = React.createClass({
});
var ServerListItem = React.createClass({
requestServerInfo: function() {
fetch('/mcsmanager/servers.json?clientid='+this.props.title)
.then(function(response){
response.json().then(function(data){
console.debug(data);
});
})
.catch(function(err){
console.error(err);
});
},
render: function(){
return(
ce('a', {className: 'list-group-item clearfix' + (this.props.active ? ' active' : ''), href: '#'},
ce('a', {className: 'list-group-item clearfix' + (this.props.active ? ' active' : ''), href: '#',
onClick: this.requestServerInfo},
ce('span', {style: {'padding-top': '15px'}},
ce('span', {className: 'glyphicon glyphicon-tasks'}),
nbsp,