File tree Expand file tree Collapse file tree 1 file changed +24
-8
lines changed
src/sentry/static/sentry/app/components/events/interfaces Expand file tree Collapse file tree 1 file changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,13 @@ var RequestInterface = React.createClass({
26
26
} ;
27
27
} ,
28
28
29
+ isPartial ( ) {
30
+ // We assume we only have a partial interface is we're missing
31
+ // an HTTP method. This means we don't have enough information
32
+ // to reliably construct a full HTTP request.
33
+ return ! this . props . data . method ;
34
+ } ,
35
+
29
36
toggleView ( value ) {
30
37
this . setState ( {
31
38
view : value
@@ -50,27 +57,36 @@ var RequestInterface = React.createClass({
50
57
var parsedUrl = document . createElement ( "a" ) ;
51
58
parsedUrl . href = fullUrl ;
52
59
53
- var title = (
54
- < div >
60
+ var children = [ ] ;
61
+
62
+ if ( ! this . isPartial ( ) ) {
63
+ children . push (
55
64
< div className = "pull-right" >
56
65
{ ! this . props . isShare &&
57
66
< RequestActions organization = { this . context . organization }
58
67
project = { this . context . project }
59
68
group = { group }
60
69
event = { evt } />
61
70
}
62
- </ div >
71
+ </ div > ,
63
72
< div className = "btn-group" >
64
73
< a className = { ( view === "rich" ? "active" : "" ) + " btn btn-default btn-sm" }
65
74
onClick = { this . toggleView . bind ( this , "rich" ) } > Rich</ a >
66
75
< a className = { ( view === "curl" ? "active" : "" ) + " btn btn-default btn-sm" }
67
76
onClick = { this . toggleView . bind ( this , "curl" ) } > < code > curl</ code > </ a >
68
77
</ div >
69
- < h3 >
70
- < strong > { data . method || 'GET' } < a href = { fullUrl } > { parsedUrl . pathname } </ a > </ strong >
71
- < small style = { { marginLeft : 20 } } > { parsedUrl . hostname } </ small >
72
- </ h3 >
73
- </ 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
+
88
+ var title = (
89
+ < div > { children } </ div >
74
90
) ;
75
91
76
92
return (
You can’t perform that action at this time.
0 commit comments