mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
reconstruct map local
This commit is contained in:
32
web/build/mapPanel.js
Normal file
32
web/build/mapPanel.js
Normal file
@@ -0,0 +1,32 @@
|
||||
require("../lib/jstree");
|
||||
|
||||
function init(React){
|
||||
var MapForm = require("./mapForm").init(React),
|
||||
MapList = require("./mapList").init(React);
|
||||
|
||||
var MapPanel = React.createClass({displayName: "MapPanel",
|
||||
appendRecord : function(data){
|
||||
var self = this,
|
||||
listComponent = self.refs.list;
|
||||
|
||||
listComponent.appendRecord(data);
|
||||
},
|
||||
|
||||
render:function(){
|
||||
var self = this;
|
||||
return (
|
||||
React.createElement("div", {className: "mapWrapper"},
|
||||
React.createElement("h4", {className: "subTitle"}, "Current Config"),
|
||||
React.createElement(MapList, {ref: "list"}),
|
||||
|
||||
React.createElement("h4", {className: "subTitle"}, "Map Local"),
|
||||
React.createElement(MapForm, {onSubmit: self.appendRecord})
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
return MapPanel;
|
||||
}
|
||||
|
||||
module.exports.init = init;
|
||||
Reference in New Issue
Block a user