corefx added node command usage from grpc and removed mailing list link

This commit is contained in:
Blake J. Harnden 2019-05-31 12:38:35 -07:00
parent 1890db5991
commit 5542dbbce2
3 changed files with 11 additions and 9 deletions

View file

@ -88,7 +88,6 @@ public class Controller implements Initializable {
private NodeTypeCreateDialog nodeTypeCreateDialog = new NodeTypeCreateDialog(this); private NodeTypeCreateDialog nodeTypeCreateDialog = new NodeTypeCreateDialog(this);
public void connectToCore(String address, int port) { public void connectToCore(String address, int port) {
// ExecutorService executorService = Executors.newSingleThreadExecutor();
executorService.submit(() -> { executorService.submit(() -> {
try { try {
coreClient.setConnection(address, port); coreClient.setConnection(address, port);
@ -345,11 +344,6 @@ public class Controller implements Initializable {
application.getHostServices().showDocument("http://coreemu.github.io/core/"); application.getHostServices().showDocument("http://coreemu.github.io/core/");
} }
@FXML
private void onHelpMenuMailingList(ActionEvent event) {
application.getHostServices().showDocument("https://publists.nrl.navy.mil/mailman/listinfo/core-users");
}
@FXML @FXML
private void onOpenXmlAction() { private void onOpenXmlAction() {
FileChooser fileChooser = new FileChooser(); FileChooser fileChooser = new FileChooser();

View file

@ -723,8 +723,17 @@ public class CoreGrpcClient implements ICoreClient {
@Override @Override
public String nodeCommand(CoreNode node, String command) throws IOException { public String nodeCommand(CoreNode node, String command) throws IOException {
// TODO: convert node command CoreProto.NodeCommandRequest request = CoreProto.NodeCommandRequest.newBuilder()
return null; .setSessionId(sessionId)
.setNodeId(node.getId())
.setCommand(command)
.build();
try {
CoreProto.NodeCommandResponse response = blockingStub.nodeCommand(request);
return response.getOutput();
} catch (StatusRuntimeException ex) {
throw new IOException(ex);
}
} }
@Override @Override

View file

@ -51,7 +51,6 @@
<items> <items>
<MenuItem mnemonicParsing="false" onAction="#onHelpMenuWebsite" text="CORE Website" /> <MenuItem mnemonicParsing="false" onAction="#onHelpMenuWebsite" text="CORE Website" />
<MenuItem mnemonicParsing="false" onAction="#onHelpMenuDocumentation" text="CORE Documentation" /> <MenuItem mnemonicParsing="false" onAction="#onHelpMenuDocumentation" text="CORE Documentation" />
<MenuItem mnemonicParsing="false" onAction="#onHelpMenuMailingList" text="CORE Mailing List" />
</items> </items>
</Menu> </Menu>
<Menu mnemonicParsing="false" text="Test"> <Menu mnemonicParsing="false" text="Test">