You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "timoninmaxim (via GitHub)" <gi...@apache.org> on 2023/05/05 13:37:19 UTC

[GitHub] [ignite] timoninmaxim commented on a diff in pull request #10691: IGNITE-15629 local commands implemented

timoninmaxim commented on code in PR #10691:
URL: https://github.com/apache/ignite/pull/10691#discussion_r1186102059


##########
modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/DeclarativeCommandAdapter.java:
##########
@@ -377,14 +397,37 @@ private void printExample(
         logger.info(bldr.toString());
     }
 
+    /** {@inheritDoc} */
+    @Override public void prepareConfirmation(GridClientConfiguration clientCfg) throws Exception {
+        if (confirmed)
+            return;
+
+        try (GridClient client = Command.startClient(clientCfg)) {
+            confirmMsg = cmd.confirmationPrompt(client, arg);
+        }
+    }
+
     /** {@inheritDoc} */
     @Override public String confirmationPrompt() {
-        return parsed == null ? null : parsed.get1().confirmationPrompt(parsed.get2());
+        return confirmMsg;
     }
 
     /** {@inheritDoc} */
     @Override public A arg() {
-        return parsed.get2();
+        return arg;
+    }
+
+    /** */
+    private void state(
+        org.apache.ignite.internal.management.api.Command<A, ?> cmd,
+        A arg,
+        boolean confirmed,
+        String confirmMsg

Review Comment:
   The `confirmMsg` param always `null`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org