@@ -57,31 +57,36 @@ var RequestInterface = React.createClass({
57
57
var parsedUrl = document . createElement ( "a" ) ;
58
58
parsedUrl . href = fullUrl ;
59
59
60
+ var children = [ ] ;
61
+
62
+ if ( ! this . isPartial ( ) ) {
63
+ children . push (
64
+ < div className = "pull-right" >
65
+ { ! this . props . isShare &&
66
+ < RequestActions organization = { this . context . organization }
67
+ project = { this . context . project }
68
+ group = { group }
69
+ event = { evt } />
70
+ }
71
+ </ div > ,
72
+ < div className = "btn-group" >
73
+ < a className = { ( view === "rich" ? "active" : "" ) + " btn btn-default btn-sm" }
74
+ onClick = { this . toggleView . bind ( this , "rich" ) } > Rich</ a >
75
+ < a className = { ( view === "curl" ? "active" : "" ) + " btn btn-default btn-sm" }
76
+ onClick = { this . toggleView . bind ( this , "curl" ) } > < code > curl</ code > </ a >
77
+ </ div >
78
+ ) ;
79
+ }
80
+
81
+ children . push (
82
+ < h3 >
83
+ < strong > { data . method || 'GET' } < a href = { fullUrl } > { parsedUrl . pathname } </ a > </ strong >
84
+ < small style = { { marginLeft : 20 } } > { parsedUrl . hostname } </ small >
85
+ </ h3 >
86
+ ) ;
87
+
60
88
var title = (
61
- < div >
62
- { ! this . isPartial ( ) &&
63
- < div >
64
- < div className = "pull-right" >
65
- { ! this . props . isShare &&
66
- < RequestActions organization = { this . context . organization }
67
- project = { this . context . project }
68
- group = { group }
69
- event = { evt } />
70
- }
71
- </ div >
72
- < div className = "btn-group" >
73
- < a className = { ( view === "rich" ? "active" : "" ) + " btn btn-default btn-sm" }
74
- onClick = { this . toggleView . bind ( this , "rich" ) } > Rich</ a >
75
- < a className = { ( view === "curl" ? "active" : "" ) + " btn btn-default btn-sm" }
76
- onClick = { this . toggleView . bind ( this , "curl" ) } > < code > curl</ code > </ a >
77
- </ div >
78
- </ div >
79
- }
80
- < h3 >
81
- < strong > { data . method || 'GET' } < a href = { fullUrl } > { parsedUrl . pathname } </ a > </ strong >
82
- < small style = { { marginLeft : 20 } } > { parsedUrl . hostname } </ small >
83
- </ h3 >
84
- </ div >
89
+ < div > { children } </ div >
85
90
) ;
86
91
87
92
return (
0 commit comments