-
/* Prefix */
$box-sizing-prefix: webkit moz spec;
.sdc-modal {
.custom-modal-wrapper {
- padding: 35px 60px 60px 60px;
+ padding: 35px 60px 20px 60px;
width: auto;
}
button:first-child {
margin-right: 2em;
}
+}
+
+textarea.field-section.sdc-input__input {
+ height: 75px;
+ padding-top: 5px;
}
\ No newline at end of file
justify-content: space-between;
align-items: center;
padding-left: 16px;
- padding-right: 40px;
+ padding-right: 100px;
border-left: 1px solid #eaeaea;
.vc-separator {
border-left: 1px solid $silver;
height: 37px;
- margin-left: 5px;
- margin-right: 5px;
}
.version-status-container {
}
.certifyBtn {
- margin-left: 10px;
+ margin-left: 20px;
}
.version-control-buttons {
display: flex;
align-items: center;
height: 70px;
+ padding: 10px;
- &:hover:not(.disabled) {
+ &:hover {
background-color: $silver;
}
- &:active:not(.disabled) {
+ &:active {
background-color: $light-gray;
}
.general-page {
@include body-1;
- padding: 0 100px 20px 100px;
+ padding: 0 131px 20px 100px;
background-color: #fff;
.general-page-title {
.description-part textarea {
height: 200px;
+ padding-top: 5px;
}
.version-info-part {
.description-part textarea{
height: 200px;
+ padding-top: 5px;
}
.save-description {
padding: 20px;
box-sizing: border-box;
.label {
- @include body-3;
+ @include body-1;
margin-bottom: 5px;
}
.value {
.svg-icon-wrapper {
justify-content: flex-start;
+ margin: 5px;
}
.create-new-version {
}
.tree-view {
- //background-color: $white;
flex: 1;
-
+ border-left: 1px solid $silver;
+ &:last-child {
+ border-bottom: 1px solid $silver;
+ }
.node:not(.selectedNode):hover {
.outer-circle, .inner-circle {
transform: scale(1.1);
.version-list-items {
@extend .flex-column;
+ .item-version, .item-status {
+ font-size: 12px;
+ font-weight: 600;
+ }
.version-item-row {
- border-bottom: 1px solid $silver;
-
&:last-child {
- border-bottom: none;
+ border-bottom: 1px solid $silver;
}
}
}
+++ /dev/null
-import RestfulAPIUtil from 'services/restAPIUtil';
-import Configuration from 'config/Configuration.js';
-
-function baseUrl() {
- const restPrefix = Configuration.get('restPrefix');
- return `${restPrefix}/v1.0/items`;
-}
-
-const Api = {
- fetchData: () => {
- return RestfulAPIUtil.fetch(`${baseUrl()}/test`);
- }
-};
-
-export default Api;
import { SVGIcon } from 'sdc-ui/lib/react';
import SearchInput from 'shared/searchInput/SearchInput';
-import { getValidtionsError } from 'features/version/inputOutput/inputOutputValidations';
+import { getValidationsError } from 'features/version/inputOutput/inputOutputValidations';
import Tab from 'features/version/inputOutput/views/Tab';
import TableHead from 'features/version/inputOutput/views/TableHead';
import TableBody from 'features/version/inputOutput/views/TableBody';
componentDidUpdate() {
const { dataRows, error, handleChangeError } = this.props;
- const validationsError = getValidtionsError(dataRows);
+ const validationsError = getValidationsError(dataRows);
const isDiff = Object.keys(validationsError).some(errorKey => {
if (!error.hasOwnProperty(errorKey)) {
export const OUTPUTS = 'outputs';
export const STRING = 'String';
+export const DEFAULT_STRING = 'STRING';
export const BOOLEAN = 'Boolean';
export const INTEGER = 'Integer';
export const FLOAT = 'Float';
INPUTS,
OUTPUTS,
STRING,
+ DEFAULT_STRING,
BOOLEAN,
INTEGER,
FLOAT,
export const defaultInputOutput = {
[INPUTS]: {
name: '',
- value: STRING,
+ type: DEFAULT_STRING,
mandatory: false
},
[OUTPUTS]: {
name: '',
- value: STRING,
+ type: DEFAULT_STRING,
mandatory: false
}
};
* limitations under the License.
*/
-export const getValidtionsError = dataRows => {
+export const getValidationsError = dataRows => {
const error = {};
const groupBy = dataRows.reduce((result, value, key) => {
changeVersion({ versionId, workflowId });
};
+ undoClickCallback = () => {
+ const {
+ currentWorkflowVersion,
+ changeVersion,
+ workflowId
+ } = this.props;
+ changeVersion({ versionId: currentWorkflowVersion.id, workflowId });
+ };
+
render() {
const {
currentWorkflowVersion,
onSaveClick={this.sendSaveParamsToServer}
certifyDisabled={isCertifyDisable}
onCertifyClick={this.certifyVersion}
+ onUndoClick={this.undoClickCallback}
/>
</div>
</div>
const Separator = () => <div className="vc-separator" />;
const ActionButtons = props => {
- const { onSaveClick, certifyDisabled, onCertifyClick } = props;
+ const { onSaveClick, certifyDisabled, onCertifyClick, onUndoClick } = props;
return (
<div className="save-submit-cancel-container">
<div className="action-buttons">
name="version-controller-undo"
tooltipText={I18n.t('buttons.undoBtn')}
disabled={false}
- onClick={() => console.log('undo')}
+ onClick={onUndoClick}
/>
<Separator />
<Button
ActionButtons.propTypes = {
onSaveClick: PropTypes.func,
certifyDisabled: PropTypes.bool,
- onCertifyClick: PropTypes.func
+ onCertifyClick: PropTypes.func,
+ onUndoClick: PropTypes.func
};
export default ActionButtons;
try {
const data = yield call(versionApi.fetchVersion, action.payload);
const { inputs, outputs, ...rest } = data;
-
yield all([
put(setWorkflowVersionAction(rest)),
put(setInputsOutputs({ inputs, outputs }))
watchWorkflow,
watchSubmitWorkflow
} from 'features/workflow/create/createWorkflowSaga';
+import { put } from 'redux-saga/effects';
import newWorkflowApi from 'features/workflow/create/createWorkflowApi';
+import { SUBMIT_WORKFLOW } from 'features/workflow/create/createWorkflowConstants';
+import { submitVersionAction } from 'features/version/create/createVersionConstants';
+import { NEW_VERSION } from 'features/workflow/create/createWorkflowConstants';
import {
- NEW_VERSION,
- SUBMIT_WORKFLOW
-} from 'features/workflow/create/createWorkflowConstants';
-import versionApi from 'features/version/versionApi';
+ setWorkflowAction,
+ clearWorkflowAction
+} from 'features/workflow/workflowConstants';
+import { genericNetworkErrorAction } from 'wfapp/appConstants';
describe('New workflow saga test', () => {
it('Create new workflow', () => {
expect(gen.next().value).toEqual(
call(newWorkflowApi.createNewWorkflow, action.payload)
);
+ const history = undefined,
+ workflowId = undefined;
expect(gen.next(action.payload).value).toEqual(
- call(versionApi.createNewVersion, {
- workflowId: undefined,
- ...NEW_VERSION
- })
+ put(submitVersionAction({ history, workflowId, ...NEW_VERSION }))
);
+ expect(gen.next().value).toEqual(
+ put(setWorkflowAction({ ...action.payload, id: undefined }))
+ );
+ //handling errors
+ expect(gen.throw({ error: 'error' }).value).toEqual(
+ put(clearWorkflowAction)
+ );
+ expect(gen.next().value).toEqual(
+ put(genericNetworkErrorAction({ error: 'error' }))
+ );
+ expect(gen.next().done).toBe(true);
});
});
clearWorkflowAction
} from 'features/workflow/workflowConstants';
import newWorkflowApi from 'features/workflow/create/createWorkflowApi';
-import versionApi from 'features/version/versionApi';
import { genericNetworkErrorAction } from 'wfapp/appConstants';
+import { submitVersionAction } from 'features/version/create/createVersionConstants';
import { NEW_VERSION } from 'features/workflow/create/createWorkflowConstants';
export function* watchSubmitWorkflow(action) {
//Calling to create empty version
const workflowId = workflow.id;
const { history } = action.payload;
- yield call(versionApi.createNewVersion, {
- workflowId,
- ...NEW_VERSION
- });
- yield call(history.push('/workflow/' + workflowId + '/overview'));
+ yield put(submitVersionAction({ history, workflowId, ...NEW_VERSION }));
yield put(setWorkflowAction(workflow));
} catch (error) {
yield put(clearWorkflowAction);
export const CLEAR_WORKFLOW_DATA = 'workflow/CLEAR_WORKFLOW_DATA';
export const SET_WORKFLOW = 'workflow/SET_WORKFLOW';
-export const setWorkflowAction = createAction(SET_WORKFLOW);
+export const setWorkflowAction = createAction(SET_WORKFLOW, payload => payload);
export const clearWorkflowAction = { type: CLEAR_WORKFLOW_DATA };
* limitations under the License.
*/
-export const getWorkflowName = state => state && state.workflow.data.name;
+export const getWorkflowName = state =>
+ state && state.workflow.data.name && state.workflow.data.name.trim();
export const getWorkflowId = state => state && state.workflow.data.id;
export const getWorkflowDescription = state =>
state && state.workflow.data.description;