@@ -137,6 +137,9 @@ const formatOneListResult = options => (entity, idx, A) => {
137
137
|| ( ( ) => self . pexec ( `wsk ${ entity . type } get "/${ entity . namespace } /${ entity . name } "` ) )
138
138
}
139
139
140
+ const addKind = kind => addCell ( 'entity-kind green-text' , kind , 'deemphasize deemphasize-partial' )
141
+ const addVersion = ( ) => entity . version && addCell ( 'entity-version' , entity . version , 'deemphasize' )
142
+
140
143
//
141
144
// case-specific cells
142
145
//
@@ -147,18 +150,41 @@ const formatOneListResult = options => (entity, idx, A) => {
147
150
// action-specific cells
148
151
const kind = entity . annotations . find ( ( { key} ) => key === 'exec' )
149
152
if ( kind || entity . prettyKind ) {
150
- addCell ( 'entity-kind green-text' , entity . prettyKind || kind . value , 'deemphasize deemphasize-partial' )
153
+ addKind ( entity . prettyKind || kind . value )
154
+ }
155
+
156
+ if ( entity . prettyType === 'sequence' ) {
157
+ setTimeout ( ( ) => {
158
+ repl . qexec ( `wsk action get "/${ entity . namespace } /${ entity . name } "` )
159
+ . then ( action => {
160
+ if ( action . exec && action . exec . components ) {
161
+ const ns = new RegExp ( '^/' + namespace . current ( ) + '/' )
162
+ addCell ( 'entity-sequence-components' ,
163
+ action . exec . components
164
+ . map ( _ => _ . replace ( ns , '' ) )
165
+ . join ( ' \u27f6 ' ) ) // ->
166
+
167
+ } else {
168
+ addVersion ( )
169
+ }
170
+ } )
171
+ } , 0 )
172
+
173
+ } else {
174
+ addVersion ( )
151
175
}
152
- addCell ( 'entity-version' , entity . version , 'deemphasize' )
153
176
} else if ( entity . type === 'rules' ) {
154
177
// rule-specific cells
155
178
setTimeout ( ( ) => {
156
179
repl . qexec ( `wsk rule get "/${ entity . namespace } /${ entity . name } "` )
157
180
. then ( rule => {
158
- addCell ( `entity-rule-status ${ rule . status === 'active' ? 'green-text' : 'red-text' } ` , rule . status , 'deemphasize' )
181
+ addCell ( `entity-rule-status ${ rule . status === 'active' ? 'green-text' : 'red-text' } ` , rule . status , 'deemphasize deemphasize-partial ' )
159
182
addCell ( 'entity-rule-definition' , `${ rule . trigger . name } \u27fc ${ rule . action . name } ` )
160
183
} )
161
184
} , 0 )
185
+ } else if ( entity . type ) {
186
+ addKind ( entity . prettyType || entity . type . replace ( / s $ / , '' ) )
187
+ addVersion ( )
162
188
}
163
189
164
190
return dom
0 commit comments