@@ -77,151 +77,151 @@ <h5 class="modal-title">Resource</h5>
77
77
} ) ;
78
78
79
79
function isOperatorAvailable ( eventInterval ) {
80
- return eventInterval . tempStructuredLocator . type === "ClusterOperator" &&
81
- eventInterval . tempStructuredMessage . annotations [ "condition" ] === "Available" &&
82
- eventInterval . tempStructuredMessage . annotations [ "status" ] === "False" ;
80
+ return eventInterval . locator . type === "ClusterOperator" &&
81
+ eventInterval . message . annotations [ "condition" ] === "Available" &&
82
+ eventInterval . message . annotations [ "status" ] === "False" ;
83
83
}
84
84
85
85
function isOperatorDegraded ( eventInterval ) {
86
- return eventInterval . tempStructuredLocator . type === "ClusterOperator" &&
87
- eventInterval . tempStructuredMessage . annotations [ "condition" ] === "Degraded" &&
88
- eventInterval . tempStructuredMessage . annotations [ "status" ] === "True" ;
86
+ return eventInterval . locator . type === "ClusterOperator" &&
87
+ eventInterval . message . annotations [ "condition" ] === "Degraded" &&
88
+ eventInterval . message . annotations [ "status" ] === "True" ;
89
89
}
90
90
91
91
function isOperatorProgressing ( eventInterval ) {
92
- return eventInterval . tempStructuredLocator . type === "ClusterOperator" &&
93
- eventInterval . tempStructuredMessage . annotations [ "condition" ] === "Progressing" &&
94
- eventInterval . tempStructuredMessage . annotations [ "status" ] === "True" ;
92
+ return eventInterval . locator . type === "ClusterOperator" &&
93
+ eventInterval . message . annotations [ "condition" ] === "Progressing" &&
94
+ eventInterval . message . annotations [ "status" ] === "True" ;
95
95
}
96
96
97
97
// When an interval in the openshift-etcd namespace had a reason of LeaderFound, LeaderLost,
98
- // LeaderElected, or LeaderMissing, tempSource was set to 'EtcdLeadership'.
98
+ // LeaderElected, or LeaderMissing, source was set to 'EtcdLeadership'.
99
99
function isEtcdLeadership ( eventInterval ) {
100
- return eventInterval . tempSource === 'EtcdLeadership' ;
100
+ return eventInterval . source === 'EtcdLeadership' ;
101
101
102
102
}
103
103
104
104
function isPodLog ( eventInterval ) {
105
- if ( eventInterval . tempSource === 'PodLog' ) {
105
+ if ( eventInterval . source === 'PodLog' ) {
106
106
return true
107
107
}
108
- return eventInterval . tempSource === 'EtcdLog' ;
108
+ return eventInterval . source === 'EtcdLog' ;
109
109
110
110
}
111
111
112
112
function isInterestingOrPathological ( eventInterval ) {
113
- return eventInterval . tempSource === 'KubeEvent' && eventInterval . tempStructuredMessage . annotations [ "pathological" ] === "true" ;
113
+ return eventInterval . source === 'KubeEvent' && eventInterval . message . annotations [ "pathological" ] === "true" ;
114
114
}
115
115
116
116
function isE2EFailed ( eventInterval ) {
117
- if ( eventInterval . tempSource === "E2ETest" && eventInterval . tempStructuredMessage . annotations [ "status" ] === "Failed" ) {
117
+ if ( eventInterval . source === "E2ETest" && eventInterval . message . annotations [ "status" ] === "Failed" ) {
118
118
return true
119
119
}
120
120
return false
121
121
}
122
122
123
123
function isE2EFlaked ( eventInterval ) {
124
- if ( eventInterval . tempSource === "E2ETest" && eventInterval . tempStructuredMessage . annotations [ "status" ] === "Flaked" ) {
124
+ if ( eventInterval . source === "E2ETest" && eventInterval . message . annotations [ "status" ] === "Flaked" ) {
125
125
return true
126
126
}
127
127
return false
128
128
}
129
129
130
130
function isE2EPassed ( eventInterval ) {
131
- if ( eventInterval . tempSource === "E2ETest" && eventInterval . tempStructuredMessage . annotations [ "status" ] === "Passed" ) {
131
+ if ( eventInterval . source === "E2ETest" && eventInterval . message . annotations [ "status" ] === "Passed" ) {
132
132
return true
133
133
}
134
134
return false
135
135
}
136
136
137
137
function isGracefulShutdownActivity ( eventInterval ) {
138
- return ( eventInterval . tempSource === "APIServerGracefulShutdown" )
138
+ return ( eventInterval . source === "APIServerGracefulShutdown" )
139
139
}
140
140
141
141
function isEndpointConnectivity ( eventInterval ) {
142
- if ( eventInterval . tempStructuredMessage . reason !== "DisruptionBegan" && eventInterval . tempStructuredMessage . reason !== "DisruptionSamplerOutageBegan" ) {
142
+ if ( eventInterval . message . reason !== "DisruptionBegan" && eventInterval . message . reason !== "DisruptionSamplerOutageBegan" ) {
143
143
return false
144
144
}
145
- if ( eventInterval . tempSource === "Disruption" ) {
145
+ if ( eventInterval . source === "Disruption" ) {
146
146
return true
147
147
}
148
- if ( eventInterval . tempStructuredLocator . keys [ "namespace" ] === "e2e-k8s-service-lb-available" ) {
148
+ if ( eventInterval . locator . keys [ "namespace" ] === "e2e-k8s-service-lb-available" ) {
149
149
return true
150
150
}
151
- if ( eventInterval . tempStructuredLocator . keys . has ( "route" ) ) {
151
+ if ( eventInterval . locator . keys . has ( "route" ) ) {
152
152
return true
153
153
}
154
154
155
155
return false
156
156
}
157
157
158
158
function isNodeState ( eventInterval ) {
159
- return eventInterval . tempSource === "NodeState"
159
+ return eventInterval . source === "NodeState"
160
160
}
161
161
162
162
function isCloudMetrics ( eventInterval ) {
163
- return eventInterval . tempSource === "CloudMetrics" ;
163
+ return eventInterval . source === "CloudMetrics" ;
164
164
}
165
165
166
166
function isAlert ( eventInterval ) {
167
- return eventInterval . tempSource === "Alert"
167
+ return eventInterval . source === "Alert"
168
168
}
169
169
170
170
function pathologicalEvents ( item ) {
171
- if ( item . tempStructuredMessage . annotations [ "pathological" ] === "true" ) {
172
- if ( item . tempStructuredMessage . annotations [ "interesting" ] === "true" ) {
173
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , ` (pathological known)` , "PathologicalKnown" ] ;
171
+ if ( item . message . annotations [ "pathological" ] === "true" ) {
172
+ if ( item . message . annotations [ "interesting" ] === "true" ) {
173
+ return [ buildLocatorDisplayString ( item . locator ) , ` (pathological known)` , "PathologicalKnown" ] ;
174
174
} else {
175
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , ` (pathological new)` , "PathologicalNew" ] ;
175
+ return [ buildLocatorDisplayString ( item . locator ) , ` (pathological new)` , "PathologicalNew" ] ;
176
176
}
177
177
}
178
178
// TODO: hack that can likely be removed when we get to structured intervals for these
179
179
// Always show pod sandbox events even if they didn't make it to pathological
180
- if ( item . tempStructuredMessage . annotations [ "interesting" ] === "true" && item . tempStructuredMessage . humanMessage . includes ( "pod sandbox" ) ) {
181
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , ` (pod sandbox)` , "PodSandbox" ] ;
180
+ if ( item . message . annotations [ "interesting" ] === "true" && item . message . humanMessage . includes ( "pod sandbox" ) ) {
181
+ return [ buildLocatorDisplayString ( item . locator ) , ` (pod sandbox)` , "PodSandbox" ] ;
182
182
}
183
183
}
184
184
185
185
function podLogs ( item ) {
186
186
if ( item . level == "Warning" ) {
187
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , ` (pod log)` , "PodLogWarning" ] ;
187
+ return [ buildLocatorDisplayString ( item . locator ) , ` (pod log)` , "PodLogWarning" ] ;
188
188
}
189
189
if ( item . level == "Error" ) {
190
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , ` (pod log)` , "PodLogError" ] ;
190
+ return [ buildLocatorDisplayString ( item . locator ) , ` (pod log)` , "PodLogError" ] ;
191
191
}
192
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , ` (pod log)` , "PodLogInfo" ] ;
192
+ return [ buildLocatorDisplayString ( item . locator ) , ` (pod log)` , "PodLogInfo" ] ;
193
193
}
194
194
195
195
196
196
const rePhase = new RegExp ( "(^| )phase/([^ ]+)" )
197
197
function nodeStateValue ( item ) {
198
198
let roles = ""
199
- if ( item . tempStructuredMessage . annotations . hasOwnProperty ( 'roles' ) ) {
200
- roles = item . tempStructuredMessage . annotations . roles
199
+ if ( item . message . annotations . hasOwnProperty ( 'roles' ) ) {
200
+ roles = item . message . annotations . roles
201
201
}
202
202
203
- if ( item . tempStructuredMessage . reason === 'NotReady' ) {
204
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , ` (${ roles } )` , "NodeNotReady" ]
203
+ if ( item . message . reason === 'NotReady' ) {
204
+ return [ buildLocatorDisplayString ( item . locator ) , ` (${ roles } )` , "NodeNotReady" ]
205
205
}
206
- let m = item . tempStructuredMessage . annotations . phase ;
207
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , ` (${ roles } )` , m ] ;
206
+ let m = item . message . annotations . phase ;
207
+ return [ buildLocatorDisplayString ( item . locator ) , ` (${ roles } )` , m ] ;
208
208
}
209
209
210
210
function etcdLeadershipLogsValue ( item ) {
211
211
212
212
// If source is isEtcdLeadership, the term is always there.
213
- const term = item . tempStructuredMessage . annotations [ 'term' ]
213
+ const term = item . message . annotations [ 'term' ]
214
214
215
215
// We are only charting the intervals with a node.
216
- const nodeVal = item . tempStructuredLocator . keys [ 'node' ]
216
+ const nodeVal = item . locator . keys [ 'node' ]
217
217
218
218
// Get etcd-member value (this will be present for a leader change).
219
- let etcdMemberVal = item . tempStructuredLocator . keys [ 'etcd-member' ] || ''
219
+ let etcdMemberVal = item . locator . keys [ 'etcd-member' ] || ''
220
220
if ( etcdMemberVal . length > 0 ) {
221
221
etcdMemberVal = `etcd-member/${ etcdMemberVal } `
222
222
}
223
223
224
- let reason = item . tempStructuredMessage . reason
224
+ let reason = item . message . reason
225
225
let color = 'EtcdOther'
226
226
if ( reason . length > 0 ) {
227
227
color = reason
@@ -231,52 +231,52 @@ <h5 class="modal-title">Resource</h5>
231
231
}
232
232
233
233
function cloudMetricsValue ( item ) {
234
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , "" , "CloudMetric" ] ;
234
+ return [ buildLocatorDisplayString ( item . locator ) , "" , "CloudMetric" ] ;
235
235
}
236
236
237
237
function alertSeverity ( item ) {
238
238
// the other types can be pending, so check pending first
239
- if ( item . tempStructuredMessage . annotations [ "alertstate" ] === "pending" ) {
240
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , "" , "AlertPending" ]
239
+ if ( item . message . annotations [ "alertstate" ] === "pending" ) {
240
+ return [ buildLocatorDisplayString ( item . locator ) , "" , "AlertPending" ]
241
241
}
242
242
243
- if ( item . tempStructuredMessage . annotations [ "severity" ] === "info" ) {
244
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , "" , "AlertInfo" ]
243
+ if ( item . message . annotations [ "severity" ] === "info" ) {
244
+ return [ buildLocatorDisplayString ( item . locator ) , "" , "AlertInfo" ]
245
245
}
246
- if ( item . tempStructuredMessage . annotations [ "severity" ] === "warning" ) {
247
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , "" , "AlertWarning" ]
246
+ if ( item . message . annotations [ "severity" ] === "warning" ) {
247
+ return [ buildLocatorDisplayString ( item . locator ) , "" , "AlertWarning" ]
248
248
}
249
- if ( item . tempStructuredMessage . annotations [ "severity" ] === "critical" ) {
250
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , "" , "AlertCritical" ]
249
+ if ( item . message . annotations [ "severity" ] === "critical" ) {
250
+ return [ buildLocatorDisplayString ( item . locator ) , "" , "AlertCritical" ]
251
251
}
252
252
253
253
// color as critical if nothing matches so that we notice that something has gone wrong
254
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , "" , "AlertCritical" ]
254
+ return [ buildLocatorDisplayString ( item . locator ) , "" , "AlertCritical" ]
255
255
}
256
256
257
257
function apiserverDisruptionValue ( item ) {
258
258
// TODO: isolate DNS error into CIClusterDisruption
259
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , "" , "Disruption" ]
259
+ return [ buildLocatorDisplayString ( item . locator ) , "" , "Disruption" ]
260
260
}
261
261
262
262
function apiserverShutdownValue ( item ) {
263
263
// TODO: isolate DNS error into CIClusterDisruption
264
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , "" , "GracefulShutdownInterval" ]
264
+ return [ buildLocatorDisplayString ( item . locator ) , "" , "GracefulShutdownInterval" ]
265
265
}
266
266
267
267
function disruptionValue ( item ) {
268
268
// We classify these disruption samples with this message if it thinks
269
269
// it looks like a problem in the CI cluster running the tests, not the cluster under test.
270
270
// (typically DNS lookup problems)
271
- if ( item . tempStructuredMessage . reason === "DisruptionSamplerOutageBegan" ) {
272
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , "" , "CIClusterDisruption" ]
271
+ if ( item . message . reason === "DisruptionSamplerOutageBegan" ) {
272
+ return [ buildLocatorDisplayString ( item . locator ) , "" , "CIClusterDisruption" ]
273
273
}
274
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , "" , "Disruption" ]
274
+ return [ buildLocatorDisplayString ( item . locator ) , "" , "Disruption" ]
275
275
}
276
276
277
277
function apiserverShutdownEventsValue ( item ) {
278
278
// TODO: isolate DNS error into CIClusterDisruption
279
- return [ buildLocatorDisplayString ( item . tempStructuredLocator ) , "" , "GracefulShutdownWindow" ]
279
+ return [ buildLocatorDisplayString ( item . locator ) , "" , "GracefulShutdownWindow" ]
280
280
}
281
281
282
282
function getDurationString ( durationSeconds ) {
@@ -291,11 +291,11 @@ <h5 class="modal-title">Resource</h5>
291
291
}
292
292
293
293
function defaultToolTip ( item ) {
294
- if ( ! item . tempStructuredMessage || ! item . tempStructuredMessage . annotations ) {
294
+ if ( ! item . message || ! item . message . annotations ) {
295
295
return '' ;
296
296
}
297
297
298
- const structuredMessage = item . tempStructuredMessage ;
298
+ const structuredMessage = item . message ;
299
299
const annotations = structuredMessage . annotations ;
300
300
301
301
const keyValuePairs = Object . entries ( annotations ) . map ( ( [ key , value ] ) => {
@@ -308,8 +308,8 @@ <h5 class="modal-title">Resource</h5>
308
308
if ( 'display' in item ) {
309
309
tt = "display/" + item . display + " " + tt
310
310
}
311
- if ( 'tempSource ' in item ) {
312
- tt = "source/" + item . tempSource + " " + tt
311
+ if ( 'source ' in item ) {
312
+ tt = "source/" + item . source + " " + tt
313
313
}
314
314
tt = tt + " " + getDurationString ( ( ( new Date ( item . to ) ) . getTime ( ) - ( new Date ( item . from ) . getTime ( ) ) ) / 1000 ) ;
315
315
return tt
@@ -401,7 +401,7 @@ <h5 class="modal-title">Resource</h5>
401
401
if ( ! item . to ) {
402
402
endDate = latest
403
403
}
404
- let label = buildLocatorDisplayString ( item . tempStructuredLocator )
404
+ let label = buildLocatorDisplayString ( item . locator )
405
405
let sub = ""
406
406
let val = timelineVal
407
407
if ( typeof val === "function" ) {
@@ -442,7 +442,7 @@ <h5 class="modal-title">Resource</h5>
442
442
if ( isEtcdLeadership ( item ) ) {
443
443
444
444
// Don't chart the ones where the node is empty.
445
- const node = item . tempStructuredLocator . keys [ 'node' ] || ''
445
+ const node = item . locator . keys [ 'node' ] || ''
446
446
if ( node . length > 0 ) {
447
447
return true
448
448
}
0 commit comments