@@ -1692,6 +1692,14 @@ private Panel welcomePanel(UI ui) {
16921692 return panel ;
16931693 }
16941694
1695+ private static final int HOST_WELCOME = 0 ;
1696+ private static final int HOST_INFO = 1 ;
1697+ private static final int HOST_CONFIG = 2 ;
1698+ private static final int HOST_AUTOSTART = 3 ;
1699+ private static final int HOST_CLUSTER = 4 ;
1700+ private static final int HOST_ADMIN = 5 ;
1701+ private static final int HOST_SERVICES = 6 ;
1702+
16951703 private Panel hostPanel (UI ui , int idx ) {
16961704 TabPanel panel = new TabPanel ();
16971705 panel .addTab (welcomePanel (ui ), "Welcome" );
@@ -1978,7 +1986,7 @@ private Panel hostClusterPanel(UI ui) {
19781986 }
19791987
19801988 refresh .addClickListener ((me , cmp ) -> {
1981- ui .setRightPanel (hostPanel (ui , 3 ));
1989+ ui .setRightPanel (hostPanel (ui , HOST_CLUSTER ));
19821990 });
19831991
19841992 help .addClickListener ((me , cmp ) -> {
@@ -2025,7 +2033,7 @@ public void doTask() {
20252033 ui .confirm_action = () -> {
20262034 Config .current .token = JF .generateUUID ();
20272035 Config .current .save ();
2028- ui .setRightPanel (hostPanel (ui , 3 ));
2036+ ui .setRightPanel (hostPanel (ui , HOST_CLUSTER ));
20292037 };
20302038 ui .confirm_popup .setVisible (true );
20312039 });
@@ -2101,7 +2109,7 @@ public void doTask() {
21012109 ui .confirm_action = () -> {
21022110 String host = hosts [idx ].host ;
21032111 Config .current .removeHost (host );
2104- ui .setRightPanel (hostPanel (ui , 3 ));
2112+ ui .setRightPanel (hostPanel (ui , HOST_CLUSTER ));
21052113 };
21062114 ui .confirm_button .setText ("Remove" );
21072115 ui .confirm_popup .setVisible (true );
@@ -2219,7 +2227,7 @@ private Panel hostServicesPanel(UI ui) {
22192227 }
22202228
22212229 refresh .addClickListener ((me , cmp ) -> {
2222- ui .setRightPanel (hostPanel (ui , 5 ));
2230+ ui .setRightPanel (hostPanel (ui , HOST_SERVICES ));
22232231 });
22242232
22252233 start .addClickListener ((me , cmp ) -> {
0 commit comments