summaryrefslogtreecommitdiffstats
path: root/workflow-designer-ui/src
diff options
context:
space:
mode:
authorStanislav Vishnevetskiy <shlomo-stanisla.vishnevetskiy@amdocs.com>2018-11-28 15:30:14 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-11-28 15:07:26 +0000
commite9657fd9f7e20ca5c7e21a64872dbbc9e2061013 (patch)
tree1c93026f5ac4fe9723136284de801007a5ea12d1 /workflow-designer-ui/src
parent420881cda3b7eeb0d4177917680b30e7c6946522 (diff)
workflow on context update
Issue-ID: SDC-1953 Change-Id: Iede18ed487c3ccba920fa708c6ca3d4f2ef77b4c Signed-off-by: Stanislav Vishnevetskiy <shlomo-stanisla.vishnevetskiy@amdocs.com>
Diffstat (limited to 'workflow-designer-ui/src')
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/version/versionController/VersionControllerView.jsx18
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/version/versionController/views/OperationModeButtons.js17
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/workflow/workflowSelectors.js4
-rw-r--r--workflow-designer-ui/src/main/frontend/src/pluginContext/pluginContextConstants.js1
4 files changed, 28 insertions, 12 deletions
diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/versionController/VersionControllerView.jsx b/workflow-designer-ui/src/main/frontend/src/features/version/versionController/VersionControllerView.jsx
index 2f86db4e..f2511c08 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/version/versionController/VersionControllerView.jsx
+++ b/workflow-designer-ui/src/main/frontend/src/features/version/versionController/VersionControllerView.jsx
@@ -21,7 +21,10 @@ import OperationModeButtons from 'features/version/versionController/views/Opera
import VersionContainer from 'features/version/versionController/views/VersionsContainer';
import WorkflowTitle from 'features/version/versionController/views/WorkflowTitle';
import { PluginPubSub } from 'shared/pubsub/plugin-pubsub.ts';
-import { notificationType } from 'wfapp/pluginContext/pluginContextConstants';
+import {
+ notificationType,
+ CATALOG_PATH
+} from 'wfapp/pluginContext/pluginContextConstants';
export default class VersionControllerView extends Component {
static propTypes = {
location: PropTypes.object,
@@ -64,12 +67,18 @@ export default class VersionControllerView extends Component {
} = this.props;
saveParamsToServer({ params: savedParams, workflowId, workflowName });
};
- handleSendMsgToCatalog = isCompeleted => {
+ handleSendMsgToCatalog = () => {
const {
- pluginContext: { eventsClientId, parentUrl }
+ pluginContext: { eventsClientId, parentUrl },
+ workflowId,
+ isCertifyDisable
} = this.props;
const client = new PluginPubSub(eventsClientId, parentUrl);
- client.notify(notificationType.CLOSE, { isCompleted: isCompeleted });
+ client.notify(notificationType.CLOSE, {
+ isCompleted: isCertifyDisable,
+ workflowId,
+ path: CATALOG_PATH
+ });
};
certifyVersion = () => {
const {
@@ -133,6 +142,7 @@ export default class VersionControllerView extends Component {
sendMsgToCatalog={this.handleSendMsgToCatalog}
saveDisabled={isReadonly}
onSaveClick={this.sendSaveParamsToServer}
+ onCertifyClick={this.certifyVersion}
/>
)}
{!operationMode && (
diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/versionController/views/OperationModeButtons.js b/workflow-designer-ui/src/main/frontend/src/features/version/versionController/views/OperationModeButtons.js
index 20de95d8..ea943974 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/version/versionController/views/OperationModeButtons.js
+++ b/workflow-designer-ui/src/main/frontend/src/features/version/versionController/views/OperationModeButtons.js
@@ -21,9 +21,12 @@ import PropTypes from 'prop-types';
import SvgButton from 'features/version/versionController/views/SvgButton';
const OperationModeButtons = props => {
- const { onSaveClick, saveDisabled, sendMsgToCatalog } = props;
- const handleCompleteMsgToCatalog = () => sendMsgToCatalog(true);
- const handleGoBackMsgToCatalog = () => sendMsgToCatalog();
+ const {
+ onSaveClick,
+ saveDisabled,
+ sendMsgToCatalog,
+ onCertifyClick
+ } = props;
return (
<div className="save-submit-cancel-container">
<div className="action-buttons">
@@ -37,9 +40,10 @@ const OperationModeButtons = props => {
/>
<Button
+ disabled={saveDisabled}
className="certifyBtn"
btnType="primary"
- onClick={handleCompleteMsgToCatalog}>
+ onClick={onCertifyClick}>
{I18n.t('buttons.completeBtn')}
</Button>
@@ -48,7 +52,7 @@ const OperationModeButtons = props => {
className="vs-back-btn"
dataTestId="vc-back-btn"
name="upload"
- onClick={handleGoBackMsgToCatalog}
+ onClick={sendMsgToCatalog}
/>
</div>
</div>
@@ -59,7 +63,8 @@ const OperationModeButtons = props => {
OperationModeButtons.propTypes = {
onSaveClick: PropTypes.func,
saveDisabled: PropTypes.bool,
- sendMsgToCatalog: PropTypes.func
+ sendMsgToCatalog: PropTypes.func,
+ onCertifyClick: PropTypes.func
};
export default OperationModeButtons;
diff --git a/workflow-designer-ui/src/main/frontend/src/features/workflow/workflowSelectors.js b/workflow-designer-ui/src/main/frontend/src/features/workflow/workflowSelectors.js
index e03bfbf0..53487012 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/workflow/workflowSelectors.js
+++ b/workflow-designer-ui/src/main/frontend/src/features/workflow/workflowSelectors.js
@@ -30,5 +30,5 @@ export const isWorkflowArchive = state =>
state &&
state.workflow &&
state.workflow.data &&
- state.workflow.data.status &&
- state.workflow.data.status === WORKFLOW_STATUS.ARCHIVE;
+ state.workflow.data.archiving &&
+ state.workflow.data.archiving === WORKFLOW_STATUS.ARCHIVE;
diff --git a/workflow-designer-ui/src/main/frontend/src/pluginContext/pluginContextConstants.js b/workflow-designer-ui/src/main/frontend/src/pluginContext/pluginContextConstants.js
index 942555b8..0f8f409f 100644
--- a/workflow-designer-ui/src/main/frontend/src/pluginContext/pluginContextConstants.js
+++ b/workflow-designer-ui/src/main/frontend/src/pluginContext/pluginContextConstants.js
@@ -19,3 +19,4 @@ export const notificationType = {
READY: 'READY',
CLOSE: 'CLOSE'
};
+export const CATALOG_PATH = 'workspace.interface_operation';