diff options
author | Avi Gaffa <avi.gaffa@amdocs.com> | 2018-08-07 06:04:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-08-07 06:04:31 +0000 |
commit | 307b186cbbe704b28979890b48a14e6425b88184 (patch) | |
tree | fa41e49016e64920aa7a6708acab58d548cc92c5 /workflow-designer-ui/src/main | |
parent | 845600ee47e74e822429475ef1d7aa34176bb810 (diff) | |
parent | c67d1775fb73ee782e7a90aa483109d1161a7cf0 (diff) |
Merge "added saga for activities"
Diffstat (limited to 'workflow-designer-ui/src/main')
5 files changed, 40 insertions, 2 deletions
diff --git a/workflow-designer-ui/src/main/frontend/resources/scss/features/_composition.scss b/workflow-designer-ui/src/main/frontend/resources/scss/features/_composition.scss index a159a4b7..119bbf02 100644 --- a/workflow-designer-ui/src/main/frontend/resources/scss/features/_composition.scss +++ b/workflow-designer-ui/src/main/frontend/resources/scss/features/_composition.scss @@ -8,6 +8,7 @@ } .bpmn-sidebar { height: 100%; + width: 320px; .properties-panel { &, .bpp-properties-panel { height: 100%; diff --git a/workflow-designer-ui/src/main/frontend/src/features/activities/activitiesActions.js b/workflow-designer-ui/src/main/frontend/src/features/activities/activitiesActions.js new file mode 100644 index 00000000..ab0a3c4c --- /dev/null +++ b/workflow-designer-ui/src/main/frontend/src/features/activities/activitiesActions.js @@ -0,0 +1,6 @@ +import { SET_ACTIVITIES_LIST } from './activitiesConstants'; + +export const setActivitiesList = payload => ({ + type: SET_ACTIVITIES_LIST, + payload +}); diff --git a/workflow-designer-ui/src/main/frontend/src/features/activities/activitiesApi.js b/workflow-designer-ui/src/main/frontend/src/features/activities/activitiesApi.js new file mode 100644 index 00000000..8e1afc15 --- /dev/null +++ b/workflow-designer-ui/src/main/frontend/src/features/activities/activitiesApi.js @@ -0,0 +1,25 @@ +/* +* Copyright © 2018 European Support Limited +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* + * http://www.apache.org/licenses/LICENSE-2.0 +* + * Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +const mockActivities = { + results: [] +}; + +export default { + fetchActivities: () => { + return Promise.resolve(mockActivities); + } +}; diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/composition/Composition.js b/workflow-designer-ui/src/main/frontend/src/features/version/composition/Composition.js index d2c273c4..d322207d 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/version/composition/Composition.js +++ b/workflow-designer-ui/src/main/frontend/src/features/version/composition/Composition.js @@ -20,11 +20,13 @@ import CompositionView from './CompositionView'; import { showErrorModalAction } from '../../../shared/modal/modalWrapperActions'; import { getComposition } from './compositionSelectors'; import { getWorkflowName } from '../../workflow/workflowSelectors'; +import { activitiesSelector } from 'features/activities/activitiesSelectors'; function mapStateToProps(state) { return { composition: getComposition(state), - name: getWorkflowName(state) + name: getWorkflowName(state), + activities: activitiesSelector(state) }; } diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js b/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js index 78b82ab1..be52579e 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js +++ b/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js @@ -33,6 +33,8 @@ import { versionState } from 'features/version/versionConstants'; import overviewApi from '../workflow/overview/overviewApi'; import { versionListFetchAction } from '../workflow/overview/overviewConstansts'; import { updateComposition } from 'features/version/composition/compositionActions'; +import activitiesApi from 'features/activities/activitiesApi'; +import { setActivitiesList } from 'features/activities/activitiesActions'; function* fetchVersion(action) { try { @@ -46,10 +48,12 @@ function* fetchVersion(action) { action.payload ); } + const activitiesList = yield call(activitiesApi.fetchActivities); yield all([ put(setWorkflowVersionAction(rest)), put(setInputsOutputs({ inputs, outputs })), - put(updateComposition(composition)) + put(updateComposition(composition)), + put(setActivitiesList(activitiesList.results)) ]); } catch (error) { yield put(genericNetworkErrorAction(error)); |