forked from alibaba/anyproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmapPanel.js
More file actions
33 lines (26 loc) · 759 Bytes
/
mapPanel.js
File metadata and controls
33 lines (26 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require("../lib/jstree");
function init(React){
var MapForm = require("./mapForm").init(React),
MapList = require("./mapList").init(React);
var MapPanel = React.createClass({
appendRecord : function(data){
var self = this,
listComponent = self.refs.list;
listComponent.appendRecord(data);
},
render:function(){
var self = this;
return (
<div className="mapWrapper">
<h4 className="subTitle">Current Config</h4>
<MapList ref="list" onChange={self.props.onChange}/>
<h4 className="subTitle">Add Map Rule</h4>
<MapForm onSubmit={self.appendRecord}/>
</div>
);
}
});
return MapPanel;
}
module.exports.init = init;
module.exports.fetchConfig = require("./mapList").fetchConfig;