mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
optimze map icon
This commit is contained in:
@@ -20,24 +20,34 @@ function init(React){
|
||||
},
|
||||
render : function(){
|
||||
var trClassesArr = [],
|
||||
trClasses;
|
||||
if(this.props.data.statusCode){
|
||||
trClasses,
|
||||
data = this.props.data || {};
|
||||
if(data.statusCode){
|
||||
trClassesArr.push("record_status_done");
|
||||
}
|
||||
|
||||
trClassesArr.push( ((Math.floor(this.props.data._id /2) - this.props.data._id /2) == 0)? "row_even" : "row_odd" );
|
||||
trClassesArr.push( ((Math.floor(data._id /2) - data._id /2) == 0)? "row_even" : "row_odd" );
|
||||
trClasses = trClassesArr.join(" ");
|
||||
|
||||
var dateStr = dateFormat(new Date(this.props.data.startTime),"hh:mm:ss");
|
||||
var dateStr = dateFormat(new Date(data.startTime),"hh:mm:ss");
|
||||
|
||||
var rowIcon = [];
|
||||
if(data.protocol == "https"){
|
||||
rowIcon.push(React.createElement("span", {className: "icon_record", title: "https"}, React.createElement("i", {className: "uk-icon-lock"})));
|
||||
}
|
||||
|
||||
if(data.ext && data.ext.map){
|
||||
rowIcon.push(React.createElement("span", {className: "icon_record", title: "mapped to local file"}, React.createElement("i", {className: "uk-icon-shield"})));
|
||||
}
|
||||
|
||||
return(
|
||||
React.createElement("tr", {className: trClasses, onClick: this.props.onSelect},
|
||||
React.createElement("td", {className: "data_id"}, this.props.data._id),
|
||||
React.createElement("td", null, this.props.data.method, " ", React.createElement("span", {className: "protocol protocol_" + this.props.data.protocol, title: "https"}, React.createElement("i", {className: "uk-icon-lock"})), " "),
|
||||
React.createElement("td", {className: "http_status http_status_" + this.props.data.statusCode}, this.props.data.statusCode),
|
||||
React.createElement("td", {title: this.props.data.host}, this.props.data.host),
|
||||
React.createElement("td", {title: this.props.data.path}, this.props.data.path),
|
||||
React.createElement("td", null, this.props.data.mime),
|
||||
React.createElement("td", {className: "data_id"}, data._id),
|
||||
React.createElement("td", null, data.method, " ", rowIcon, " "),
|
||||
React.createElement("td", {className: "http_status http_status_" + data.statusCode}, data.statusCode),
|
||||
React.createElement("td", {title: data.host}, data.host),
|
||||
React.createElement("td", {title: data.path}, data.path),
|
||||
React.createElement("td", null, data.mime),
|
||||
React.createElement("td", null, dateStr)
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user