File tree Expand file tree Collapse file tree
packages/cluster/src/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const formatStatus = status => {
3636
3737const run = async function ( argv ) {
3838 const clusters = await listClusters ( argv )
39-
39+ const anyCustomContext = clusters . some ( cluster => cluster . contextPath !== '' )
4040 const table = new Table ( {
4141 head : [
4242 'Name' ,
@@ -45,20 +45,21 @@ const run = async function (argv) {
4545 'DHIS2 Version' ,
4646 'DB Version' ,
4747 'Status' ,
48- ] ,
48+ ] . concat ( anyCustomContext ? 'Context Path' : [ ] ) ,
4949 } )
5050
5151 await Promise . all (
5252 clusters . map ( async cluster => {
5353 const status = await getStatus ( cluster )
5454 table . push ( [
55- chalk . blue ( cluster . name ) ,
56- cluster . port ,
57- cluster . channel ,
58- cluster . dhis2Version ,
59- cluster . dbVersion ,
60- formatStatus ( status ) ,
61- ] )
55+ chalk . blue ( cluster . name ) ,
56+ cluster . port ,
57+ cluster . channel ,
58+ cluster . dhis2Version ,
59+ cluster . dbVersion ,
60+ formatStatus ( status ) ,
61+ ] . concat ( anyCustomContext ? cluster . contextPath : [ ] )
62+ )
6263 } )
6364 )
6465
You can’t perform that action at this time.
0 commit comments