private void processRuntimeStatus(final Runtime runtime) { view.clearActionItems(); enableActions(true); view.addActionItem(startAction.getView()); view.addActionItem(stopAction.getView()); view.addActionItem(separator.getView()); view.addActionItem(deleteAction.getView()); startAction.setup(translationService.getTranslation(RuntimePresenter_RuntimeStartAction), this::startRuntime); stopAction.setup(translationService.getTranslation(RuntimePresenter_RuntimeStopAction), this::stopRuntime); deleteAction.setup(translationService.getTranslation(RuntimePresenter_RuntimeDeleteAction), this::deleteRuntime); RuntimeStatus runtimeStatus = buildRuntimeStatus(runtime.getStatus()); if (RUNNING == runtimeStatus) { startAction.setEnabled(false); } if (STOPPED == runtimeStatus || READY == runtimeStatus) { stopAction.setEnabled(false); } view.setStatus(buildIconStyle(runtimeStatus)); view.setStatusTitle(runtime.getStatus()); }
private void processRuntimeStatus(final Runtime runtime) { view.clearActionItems(); enableActions(true, startAction, stopAction, deleteAction); view.addActionItem(startAction.getView()); view.addActionItem(stopAction.getView()); view.addActionItem(separator.getView()); view.addActionItem(deleteAction.getView()); startAction.setup(translationService.getTranslation(RuntimePresenter_RuntimeStartAction), this::startRuntime); stopAction.setup(translationService.getTranslation(RuntimePresenter_RuntimeStopAction), this::stopRuntime); deleteAction.setup(translationService.getTranslation(RuntimePresenter_RuntimeDeleteAction), this::deleteRuntime); RuntimeStatus runtimeStatus = buildRuntimeStatus(runtime.getStatus()); if (RUNNING == runtimeStatus) { startAction.setEnabled(false); } if (STOPPED == runtimeStatus || READY == runtimeStatus) { stopAction.setEnabled(false); } view.setStatus(buildIconStyle(runtimeStatus)); view.setStatusTitle(runtime.getStatus()); }
private void assertRuntime(Runtime runtime) { assertEquals(RUNTIME_ID, runtime.getKey().getId()); assertEquals(PROVIDER_NAME, runtime.getKey().getProviderKey().getProviderTypeKey().getId()); assertEquals(PROVIDER_VERSION, runtime.getKey().getProviderKey().getProviderTypeKey().getVersion()); assertEquals(PROVIDER_NAME, runtime.getKey().getProviderKey().getProviderTypeKey().getId()); assertEquals(PROVIDER_ID, runtime.getKey().getProviderKey().getId()); assertEquals(RUNTIME_ENDPOINT, runtime.getEndpoint()); assertEquals(RUNTIME_STARTED_AT, runtime.getCreatedDate()); assertEquals(RUNTIME_STATUS, runtime.getStatus()); }
private void assertRuntime(Runtime runtime) { assertEquals(RUNTIME_ID, runtime.getKey().getId()); assertEquals(PROVIDER_NAME, runtime.getKey().getProviderKey().getProviderTypeKey().getId()); assertEquals(PROVIDER_VERSION, runtime.getKey().getProviderKey().getProviderTypeKey().getVersion()); assertEquals(PROVIDER_NAME, runtime.getKey().getProviderKey().getProviderTypeKey().getId()); assertEquals(PROVIDER_ID, runtime.getKey().getProviderKey().getId()); assertEquals(RUNTIME_ENDPOINT, runtime.getEndpoint()); assertEquals(RUNTIME_STARTED_AT, runtime.getCreatedDate()); assertEquals(RUNTIME_STATUS, runtime.getStatus()); }