@@ -58,7 +58,7 @@ func (cfgCtlr *configController) dumpPriorityLevels(w http.ResponseWriter, r *ht
58
58
"ExecutingRequests" , // 6
59
59
}
60
60
tabPrint (tabWriter , rowForHeaders (columnHeaders ))
61
- endline (tabWriter )
61
+ endLine (tabWriter )
62
62
for _ , plState := range cfgCtlr .priorityLevelStates {
63
63
if plState .queues == nil {
64
64
tabPrint (tabWriter , row (
@@ -69,7 +69,7 @@ func (cfgCtlr *configController) dumpPriorityLevels(w http.ResponseWriter, r *ht
69
69
"<none>" , // 5
70
70
"<none>" , // 6
71
71
))
72
- endline (tabWriter )
72
+ endLine (tabWriter )
73
73
continue
74
74
}
75
75
queueSetDigest := plState .queues .Dump (false )
@@ -88,7 +88,7 @@ func (cfgCtlr *configController) dumpPriorityLevels(w http.ResponseWriter, r *ht
88
88
queueSetDigest .Waiting , // 5
89
89
queueSetDigest .Executing , // 6
90
90
))
91
- endline (tabWriter )
91
+ endLine (tabWriter )
92
92
}
93
93
runtime .HandleError (tabWriter .Flush ())
94
94
}
@@ -105,7 +105,7 @@ func (cfgCtlr *configController) dumpQueues(w http.ResponseWriter, r *http.Reque
105
105
"VirtualStart" , // 5
106
106
}
107
107
tabPrint (tabWriter , rowForHeaders (columnHeaders ))
108
- endline (tabWriter )
108
+ endLine (tabWriter )
109
109
for _ , plState := range cfgCtlr .priorityLevelStates {
110
110
if plState .queues == nil {
111
111
tabPrint (tabWriter , row (
@@ -115,7 +115,7 @@ func (cfgCtlr *configController) dumpQueues(w http.ResponseWriter, r *http.Reque
115
115
"<none>" , // 4
116
116
"<none>" , // 5
117
117
))
118
- endline (tabWriter )
118
+ endLine (tabWriter )
119
119
continue
120
120
}
121
121
queueSetDigest := plState .queues .Dump (false )
@@ -127,7 +127,7 @@ func (cfgCtlr *configController) dumpQueues(w http.ResponseWriter, r *http.Reque
127
127
q .ExecutingRequests , // 4
128
128
q .VirtualStart , // 5
129
129
))
130
- endline (tabWriter )
130
+ endLine (tabWriter )
131
131
}
132
132
}
133
133
runtime .HandleError (tabWriter .Flush ())
@@ -149,6 +149,7 @@ func (cfgCtlr *configController) dumpRequests(w http.ResponseWriter, r *http.Req
149
149
"ArriveTime" , // 6
150
150
}))
151
151
if includeRequestDetails {
152
+ continueLine (tabWriter )
152
153
tabPrint (tabWriter , rowForHeaders ([]string {
153
154
"UserName" , // 7
154
155
"Verb" , // 8
@@ -160,7 +161,7 @@ func (cfgCtlr *configController) dumpRequests(w http.ResponseWriter, r *http.Req
160
161
"SubResource" , // 14
161
162
}))
162
163
}
163
- endline (tabWriter )
164
+ endLine (tabWriter )
164
165
for _ , plState := range cfgCtlr .priorityLevelStates {
165
166
if plState .queues == nil {
166
167
tabPrint (tabWriter , row (
@@ -172,6 +173,7 @@ func (cfgCtlr *configController) dumpRequests(w http.ResponseWriter, r *http.Req
172
173
"<none>" , // 6
173
174
))
174
175
if includeRequestDetails {
176
+ continueLine (tabWriter )
175
177
tabPrint (tabWriter , row (
176
178
"<none>" , // 7
177
179
"<none>" , // 8
@@ -183,7 +185,7 @@ func (cfgCtlr *configController) dumpRequests(w http.ResponseWriter, r *http.Req
183
185
"<none>" , // 14
184
186
))
185
187
}
186
- endline (tabWriter )
188
+ endLine (tabWriter )
187
189
continue
188
190
}
189
191
queueSetDigest := plState .queues .Dump (includeRequestDetails )
@@ -198,6 +200,7 @@ func (cfgCtlr *configController) dumpRequests(w http.ResponseWriter, r *http.Req
198
200
r .ArriveTime , // 6
199
201
))
200
202
if includeRequestDetails {
203
+ continueLine (tabWriter )
201
204
tabPrint (tabWriter , rowForRequestDetails (
202
205
r .UserName , // 7
203
206
r .RequestInfo .Verb , // 8
@@ -212,7 +215,7 @@ func (cfgCtlr *configController) dumpRequests(w http.ResponseWriter, r *http.Req
212
215
r .RequestInfo .Subresource , // 14
213
216
))
214
217
}
215
- endline (tabWriter )
218
+ endLine (tabWriter )
216
219
}
217
220
}
218
221
}
@@ -223,7 +226,12 @@ func tabPrint(w io.Writer, row string) {
223
226
_ , err := fmt .Fprint (w , row )
224
227
runtime .HandleError (err )
225
228
}
226
- func endline (w io.Writer ) {
229
+
230
+ func continueLine (w io.Writer ) {
231
+ _ , err := fmt .Fprint (w , ",\t " )
232
+ runtime .HandleError (err )
233
+ }
234
+ func endLine (w io.Writer ) {
227
235
_ , err := fmt .Fprint (w , "\n " )
228
236
runtime .HandleError (err )
229
237
}
@@ -269,9 +277,14 @@ func rowForRequestDetails(username, verb, path, namespace, name, apiVersion, res
269
277
username ,
270
278
verb ,
271
279
path ,
280
+ namespace ,
281
+ name ,
282
+ apiVersion ,
283
+ resource ,
284
+ subResource ,
272
285
)
273
286
}
274
287
275
288
func row (columns ... string ) string {
276
- return strings .Join (columns , ",\t " ) + ", \t "
289
+ return strings .Join (columns , ",\t " )
277
290
}
0 commit comments