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);
public void connectToCore(String address, int port) {
// ExecutorService executorService = Executors.newSingleThreadExecutor();
executorService.submit(() -> {
try {
coreClient.setConnection(address, port);
@ -345,11 +344,6 @@ public class Controller implements Initializable {
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
private void onOpenXmlAction() {
FileChooser fileChooser = new FileChooser();

View file

@ -723,8 +723,17 @@ public class CoreGrpcClient implements ICoreClient {
@Override
public String nodeCommand(CoreNode node, String command) throws IOException {
// TODO: convert node command
return null;
CoreProto.NodeCommandRequest request = CoreProto.NodeCommandRequest.newBuilder()
.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

View file

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