MCSM: запрос информации о сервере
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user