+
+ { this.getModals() }
+
+
);
}
}
diff --git a/src/modules/Admin/components/ProtectedView/container.jsx b/src/modules/Admin/components/ProtectedView/container.jsx
new file mode 100644
index 000000000..b37f19ed5
--- /dev/null
+++ b/src/modules/Admin/components/ProtectedView/container.jsx
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright 2018 Odysseus Data Services, inc.
+ * 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.
+ *
+ * Company: Odysseus Data Services, Inc.
+ * Product Owner/Architecture: Gregory Klebanov
+ * Authors: Anastasiia Klochkova
+ * Created: December 09, 2019
+ *
+ */
+
+import { Component } from 'react';
+import { get, ContainerBuilder } from 'services/Utils';
+import ProtectedViewPresenter from './presenter';
+
+
+class ProtectedView extends Component {
+
+ render() {
+ return ProtectedViewPresenter({
+ ...this.props,
+ });
+ }
+}
+
+class ProtectedViewBuilder extends ContainerBuilder {
+ getComponent() {
+ return ProtectedView;
+ }
+
+ mapStateToProps(state) {
+ return {
+ isAdmin: get(state, 'auth.principal.queryResult.result.isAdmin'),
+ };
+ }
+
+ mergeProps(stateProps, dispatchProps, ownProps) {
+ return {
+ ...stateProps,
+ ...dispatchProps,
+ ...ownProps,
+ };
+ }
+}
+export default ProtectedViewBuilder;
diff --git a/src/modules/Admin/components/ProtectedView/index.js b/src/modules/Admin/components/ProtectedView/index.js
new file mode 100644
index 000000000..cc90d7847
--- /dev/null
+++ b/src/modules/Admin/components/ProtectedView/index.js
@@ -0,0 +1,25 @@
+/*
+ *
+ * Copyright 2018 Odysseus Data Services, inc.
+ * 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.
+ *
+ * Company: Odysseus Data Services, Inc.
+ * Product Owner/Architecture: Gregory Klebanov
+ * Authors: Anastasiia Klochkova
+ * Created: December 09, 2019
+ *
+ */
+
+import ProtectedViewBuilder from './container';
+
+export default new ProtectedViewBuilder().build();
diff --git a/src/modules/Admin/components/ProtectedView/presenter.jsx b/src/modules/Admin/components/ProtectedView/presenter.jsx
new file mode 100644
index 000000000..e19c8c34a
--- /dev/null
+++ b/src/modules/Admin/components/ProtectedView/presenter.jsx
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2018 Odysseus Data Services, inc.
+ * 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.
+ *
+ * Company: Odysseus Data Services, Inc.
+ * Product Owner/Architecture: Gregory Klebanov
+ * Authors: Anastasiia Klochkova
+ * Created: December 09, 2019
+ *
+ */
+
+import React from 'react';
+import BEMHelper from 'services/BemHelper';
+
+require('./style.scss');
+
+function ProtectedView(props) {
+ const { children, isAdmin } = props;
+ const classes = new BEMHelper('admin-settings-warning');
+ if (!isAdmin) {
+ return
The page you're looking for can't be found
;
+ }
+ return (
+
+ {children}
+
+ );
+}
+
+
+export default ProtectedView;
\ No newline at end of file
diff --git a/src/modules/Admin/components/ProtectedView/style.scss b/src/modules/Admin/components/ProtectedView/style.scss
new file mode 100644
index 000000000..605661a84
--- /dev/null
+++ b/src/modules/Admin/components/ProtectedView/style.scss
@@ -0,0 +1,40 @@
+/*
+ *
+ * Copyright 2018 Odysseus Data Services, inc.
+ * 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.
+ *
+ * Company: Odysseus Data Services, Inc.
+ * Product Owner/Architecture: Gregory Klebanov
+ * Authors: Anastasiia Klochkova
+ * Created: December 09, 2019
+ *
+ */
+
+@import 'styles/vars-and-mixins.scss';
+
+.#{$namespace} {
+
+ &admin-settings-warning {
+
+ display: flex;
+ height: 100%;
+ width: 100%;
+
+ &__access-denied-title {
+ width: 100%;
+ text-align: center;
+ margin-top: 15rem;
+ font-size: 2.5rem;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/modules/Admin/components/SystemSettings/presenter.jsx b/src/modules/Admin/components/SystemSettings/presenter.jsx
index 9408b4f76..c314db0c6 100644
--- a/src/modules/Admin/components/SystemSettings/presenter.jsx
+++ b/src/modules/Admin/components/SystemSettings/presenter.jsx
@@ -31,6 +31,7 @@ import {
LoadingPanel,
} from 'arachne-ui-components';
import { get } from 'services/Utils';
+import ProtectedView from 'modules/Admin/components/ProtectedView';
require('./style.scss');
@@ -69,78 +70,80 @@ function SystemSettings(props) {
})
return (
-
-
- {!isApplied &&
-
-
- Some settings were changed, but have not been applied yet. To apply settings, you need to restart server.
-
-
-
- Import is available for analysis with type Cohort or Population Level Estimation.
+ Import is available for analysis with type Cohort, Incidence Rates, Patient Level Prediction or Population Level Estimation.
}
diff --git a/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalStatusHistory/style.scss b/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalStatusHistory/style.scss
index 9e3c77d35..c52021a09 100644
--- a/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalStatusHistory/style.scss
+++ b/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalStatusHistory/style.scss
@@ -53,6 +53,17 @@
text-transform: initial;
}
+ &__tooltip-container {
+ position: absolute;
+ display: inline;
+ }
+
+ &__tooltip-wrapper {
+ position: relative;
+ display: inline;
+ bottom: 1rem;
+ }
+
&__comment-ico {
@include material-icon();
color: $black;
diff --git a/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalUpdateDescription/container.js b/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalUpdateDescription/container.js
new file mode 100644
index 000000000..7a1653bb3
--- /dev/null
+++ b/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalUpdateDescription/container.js
@@ -0,0 +1,79 @@
+/*
+ *
+ * Copyright 2018 Odysseus Data Services, inc.
+ * 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.
+ *
+ * Company: Odysseus Data Services, Inc.
+ * Product Owner/Architecture: Gregory Klebanov
+ * Authors: Alexandr Cumarav
+ * Created: January 22, 2020
+ *
+ */
+
+import { connect } from 'react-redux';
+import { reduxForm } from 'redux-form';
+import { get } from 'services/Utils';
+import actions from 'actions/index';
+import { ModalUtils } from "arachne-ui-components";
+import { form, modal } from 'modules/AnalysisExecution/const';
+import ModalUpdateDescription from './presenter';
+
+function mapStateToProps(state) {
+
+ const modalState = state.modal.updateAnalysisDescription;
+ const newDescription = get(modalState, 'data.newDescription', '');
+ const analysisData = get(state, 'analysisExecution.analysis.data.result');
+ return {
+ analysisId: get(analysisData, 'id'),
+ typeId: get(analysisData, 'type.id'),
+ initialValues: {
+ description: get(analysisData, 'description'),
+ },
+ newDescription,
+ };
+}
+
+const mapDispatchToProps = {
+ updateAnalysis: actions.analysisExecution.analysis.update,
+ loadAnalysis: actions.analysisExecution.analysis.find,
+ closeModal: () => ModalUtils.actions.toggle(modal.updateAnalysisDescription, false),
+};
+
+function mergeProps(stateProps, dispatchProps, ownProps) {
+ return Object.assign({
+ ...ownProps,
+ ...stateProps,
+ ...dispatchProps,
+ async doSubmit() {
+
+ await dispatchProps.updateAnalysis(
+ {id: stateProps.analysisId},
+ {description: stateProps.newDescription, typeId: stateProps.typeId},
+ false
+ );
+ await dispatchProps.closeModal();
+ dispatchProps.loadAnalysis({id: stateProps.analysisId});
+ },
+ });
+}
+
+let ReduxModalUpdateDescription = ModalUtils.connect({
+ name: modal.updateAnalysisDescription,
+})(ModalUpdateDescription);
+
+ReduxModalUpdateDescription = reduxForm({
+ form: form.updateAnalysisDescription,
+ enableReinitialize: true,
+})(ReduxModalUpdateDescription);
+
+export default connect(mapStateToProps, mapDispatchToProps, mergeProps)(ReduxModalUpdateDescription);
diff --git a/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalUpdateDescription/index.js b/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalUpdateDescription/index.js
new file mode 100644
index 000000000..9e7dac892
--- /dev/null
+++ b/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalUpdateDescription/index.js
@@ -0,0 +1,25 @@
+/*
+ *
+ * Copyright 2018 Odysseus Data Services, inc.
+ * 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.
+ *
+ * Company: Odysseus Data Services, Inc.
+ * Product Owner/Architecture: Gregory Klebanov
+ * Authors: Alexandr Cumarav
+ * Created: January 22, 2020
+ *
+ */
+
+import ModalUpdateDescription from './container';
+
+export default ModalUpdateDescription;
\ No newline at end of file
diff --git a/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalUpdateDescription/presenter.jsx b/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalUpdateDescription/presenter.jsx
new file mode 100644
index 000000000..8547f8947
--- /dev/null
+++ b/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalUpdateDescription/presenter.jsx
@@ -0,0 +1,67 @@
+/*
+ *
+ * Copyright 2018 Odysseus Data Services, inc.
+ * 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.
+ *
+ * Company: Odysseus Data Services, Inc.
+ * Product Owner/Architecture: Gregory Klebanov
+ * Authors: Alexandr Cumarav
+ * Created: January 22, 2020
+ *
+ */
+
+import React from 'react';
+import BEMHelper from 'services/BemHelper';
+import { Form, Modal } from 'arachne-ui-components';
+
+require('./style.scss');
+
+function ModalUpdateDescription(props) {
+
+ const {newDescription} = props;
+ const classes = new BEMHelper('analysis-form-update-description');
+
+ const submitBtn = {
+ label: 'Replace',
+ loadingLabel: 'Replacing...',
+ mods: ['success', 'rounded'],
+ };
+
+ const cancelBtn = {
+ label: 'Leave existing',
+ };
+
+ return (
+
+
+
+
Would you like to replace the existing description with the:
+
{newDescription}
+
+
+
+
+
+
+ );
+}
+
+export default ModalUpdateDescription;
\ No newline at end of file
diff --git a/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalUpdateDescription/style.scss b/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalUpdateDescription/style.scss
new file mode 100644
index 000000000..0830702a1
--- /dev/null
+++ b/src/modules/AnalysisExecution/components/ViewEditAnalysis/ModalUpdateDescription/style.scss
@@ -0,0 +1,41 @@
+/*
+ *
+ * Copyright 2018 Odysseus Data Services, inc.
+ * 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.
+ *
+ * Company: Odysseus Data Services, Inc.
+ * Product Owner/Architecture: Gregory Klebanov
+ * Authors: Alexandr Cumarav
+ * Created: January 22, 2020
+ *
+ */
+
+@import 'styles/vars-and-mixins.scss';
+
+.#{$namespace} {
+
+ &analysis-form-update-description {
+ @include form();
+ width: 60rem;
+
+ &__question {
+ padding: 1rem;
+ }
+
+ &__new-description {
+ font-weight: bold;
+ padding: 1rem;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/src/modules/AnalysisExecution/components/ViewEditAnalysis/Settings/container.js b/src/modules/AnalysisExecution/components/ViewEditAnalysis/Settings/container.js
index ac35e12cc..9185c944b 100644
--- a/src/modules/AnalysisExecution/components/ViewEditAnalysis/Settings/container.js
+++ b/src/modules/AnalysisExecution/components/ViewEditAnalysis/Settings/container.js
@@ -58,7 +58,7 @@ function mergeProps(stateProps, dispatchProps, ownProps) {
...stateProps,
...dispatchProps,
setType: (type) => {
- dispatchProps
+ type && dispatchProps
.update(
{ id: stateProps.analysisId },
{ typeId: type }
diff --git a/src/modules/AnalysisExecution/components/ViewEditAnalysis/presenter.jsx b/src/modules/AnalysisExecution/components/ViewEditAnalysis/presenter.jsx
index c89befea4..e9aa0e60a 100644
--- a/src/modules/AnalysisExecution/components/ViewEditAnalysis/presenter.jsx
+++ b/src/modules/AnalysisExecution/components/ViewEditAnalysis/presenter.jsx
@@ -40,6 +40,7 @@ import ModalSubmitCode from './ModalSubmitCode/index';
import ModalFiles from './ModalFiles/index';
import ModalStatusHistory from './ModalStatusHistory';
import ModalUploadResult from './ModalUploadResult';
+import ModalUpdateDescription from './ModalUpdateDescription/index';
import ModalRejectSubmission from './ModalRejectSubmission';
import ModalAddDataSource from 'modules/StudyManager/components/ViewEdit/ModalAddDataSource';
import ModalError from './ModalCreateCode/components/ModalError';
@@ -71,6 +72,7 @@ export default class ViewEditAnalysis extends Component {
,
,
,
+ ,
,
,
,
diff --git a/src/modules/AnalysisExecution/components/ViewEditInsight/Description/View/style.scss b/src/modules/AnalysisExecution/components/ViewEditInsight/Description/View/style.scss
index 932d913b7..fab354dde 100644
--- a/src/modules/AnalysisExecution/components/ViewEditInsight/Description/View/style.scss
+++ b/src/modules/AnalysisExecution/components/ViewEditInsight/Description/View/style.scss
@@ -23,11 +23,12 @@
@import 'styles/vars-and-mixins.scss';
.#{$namespace} {
-
+
&insight-description-view {
display: block;
padding: 15px 20px;
line-height: 2.1rem;
+ word-break: break-all;
&--empty {
color: $grey-placeholder;
diff --git a/src/modules/AnalysisExecution/const.js b/src/modules/AnalysisExecution/const.js
index 4bef5019a..ec9949327 100644
--- a/src/modules/AnalysisExecution/const.js
+++ b/src/modules/AnalysisExecution/const.js
@@ -36,6 +36,7 @@ const modal = keyMirror({
statusHistory: null,
submitCode: null,
uploadResult: null,
+ updateAnalysisDescription: null,
rejectSubmission: null,
submissionsTableFilter: null,
modalError: null,
@@ -55,6 +56,7 @@ const form = keyMirror({
requestUnlock: null,
submitCode: null,
uploadResult: null,
+ updateAnalysisDescription: null,
importNodeSelector: null,
importCodeList: null,
rejectSubmission: null,
@@ -84,6 +86,7 @@ function importEntityPathByType(type) {
case 'ESTIMATION': return 'estimations';
case 'PREDICTION': return 'predictions';
case 'INCIDENCE': return 'incidence-rates';
+ case 'COHORT_PATHWAY': return 'cohort-pathways';
default: return '';
}
}
@@ -198,7 +201,7 @@ const submissionActionTypes = keyMirror({
HIDE: null,
});
-const importableAnalysisTypes = ['COHORT', 'ESTIMATION', 'PREDICTION', 'COHORT_HERACLES', 'COHORT_CHARACTERIZATION', 'INCIDENCE'];
+const importableAnalysisTypes = ['COHORT', 'ESTIMATION', 'PREDICTION', 'COHORT_HERACLES', 'COHORT_CHARACTERIZATION', 'INCIDENCE', 'COHORT_PATHWAY'];
const analysisTypeNames = {
COHORT: 'cohort',
ESTIMATION: 'PLE analysis',
@@ -207,6 +210,7 @@ const analysisTypeNames = {
COHORT_CHARACTERIZATION: 'cohort characterization',
INCIDENCE: 'incidence rates',
CUSTOM: 'custom',
+ COHORT_PATHWAY: 'cohort pathway',
};
const pluralAnalysisTypeNames = {
COHORT: 'cohorts',
@@ -216,6 +220,7 @@ const pluralAnalysisTypeNames = {
COHORT_CHARACTERIZATION: 'cohort characterizations',
INCIDENCE: 'incidence rates',
CUSTOM: 'custom',
+ COHORT_PATHWAY: 'cohort pathways',
};
function nameAnalysisType({ analysisType, capitalize = false, plural = false }) {
const typeNames = plural ? pluralAnalysisTypeNames : analysisTypeNames;
@@ -255,6 +260,7 @@ const analysisTypes = keyMirror({
COHORT_CHARACTERIZATION: null,
ESTIMATION: null,
PREDICTION: null,
+ COHORT_PATHWAY: null,
});
const submissionGroupsPageSize = 5;
@@ -282,7 +288,7 @@ const submissionStatuses = [
},
{
value: 'EXECUTED',
- label: 'Avaiting approval (success)',
+ label: 'Awaiting approval (success)',
},
{
value: 'FAILED',
diff --git a/src/modules/AnalysisExecution/ducks/index.js b/src/modules/AnalysisExecution/ducks/index.js
index 41b239312..bc280889e 100644
--- a/src/modules/AnalysisExecution/ducks/index.js
+++ b/src/modules/AnalysisExecution/ducks/index.js
@@ -45,6 +45,8 @@ import fileTreeData from './fileTreeData';
import submissionSummary from './submissionSummary';
import submissionGroups from './submissionGroups';
+import pathwaySummary from './pathwaySummary';
+
export default {
actions: {
analysis: analysis.actions,
@@ -70,6 +72,7 @@ export default {
fileTreeData: fileTreeData.actions,
submissionSummary: submissionSummary.actions,
submissionGroups: submissionGroups.actions,
+ pathwaySummary: pathwaySummary.actions,
},
reducer: {
analysis: analysis.reducer,
@@ -89,5 +92,6 @@ export default {
fileTreeData: fileTreeData.reducer,
submissionSummary: submissionSummary.reducer,
submissionGroups: submissionGroups.reducer,
+ pathwaySummary: pathwaySummary.reducer,
},
};
diff --git a/src/modules/AnalysisExecution/ducks/pathwaySummary.js b/src/modules/AnalysisExecution/ducks/pathwaySummary.js
new file mode 100644
index 000000000..8de4a1f0b
--- /dev/null
+++ b/src/modules/AnalysisExecution/ducks/pathwaySummary.js
@@ -0,0 +1,102 @@
+/*
+ *
+ * Copyright 2018 Odysseus Data Services, inc.
+ * 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.
+ *
+ * Company: Odysseus Data Services, Inc.
+ * Product Owner/Architecture: Gregory Klebanov
+ * Authors: Vitaly Koulakov
+ * Created: May 24, 2019
+ *
+ */
+
+import Duck from 'services/Duck';
+import { get } from 'services/Utils';
+import cloneDeep from 'lodash/cloneDeep';
+import { apiPaths, fileTypes } from 'modules/AnalysisExecution/const';
+import ReducerFactory from 'services/ReducerFactory';
+import { action as actionName } from 'services/CrudActionNameBuilder';
+
+const coreName = 'AE_PATHWAY_SUMMARY';
+
+class PathwaySummaryDuckBuilder {
+ constructor() {
+ this.reducerFactory = new ReducerFactory();
+
+ this.actions = {
+ GET_DETAILS: `${coreName}_GET_DETAILS`,
+ };
+
+ this.duck = new Duck({
+ name: coreName,
+ urlBuilder: () => null,
+ });
+ }
+
+ getGetDetailsAction() {
+ return ({ pathway, node }) => {
+ const path = pathway.getPathToNode(node);
+
+ const rowBuilder = (path, i ,allPaths) => ({
+ names: path.names,
+ personCount: path.count,
+ remainPct: path.count / pathway.summary.totalPathways
+ });
+
+ let rows = path.map(rowBuilder);
+ rows.forEach((r, i) => {
+ if (i > 0) {
+ r.diffPct = rows[i-1].remainPct - r.remainPct;
+ } else {
+ r.diffPct = 1.0 - r.remainPct;
+ }
+ });
+
+ return ({
+ type: this.actions.GET_DETAILS,
+ payload: {
+ details: rows,
+ }
+ })
+ };
+ }
+
+ buildReducer() {
+ return this.reducerFactory
+ .setActionHandlers([
+ {
+ action: this.actions.GET_DETAILS,
+ handler: (state, { payload: { details } }) => {
+ return ({
+ ...state,
+ details,
+ });
+ }
+ }
+ ])
+ .build();
+ }
+
+ build() {
+ return {
+ actions: {
+ getDetails: this.getGetDetailsAction(),
+ },
+ reducer: this.buildReducer(),
+ }
+ }
+}
+
+const builder = new PathwaySummaryDuckBuilder();
+
+export default builder.build();
\ No newline at end of file
diff --git a/src/modules/Auth/components/Login/FormLogin/container.js b/src/modules/Auth/components/Login/FormLogin/container.js
index fa2bafc8c..4a8619b75 100644
--- a/src/modules/Auth/components/Login/FormLogin/container.js
+++ b/src/modules/Auth/components/Login/FormLogin/container.js
@@ -31,7 +31,7 @@ import FormLogin from './presenter';
import Auth from 'services/Auth';
function mapStateToProps(state) {
- const authMethod = get(state, 'auth.authMethod.data.result.userOrigin', authMethods.NATIVE);
+ const authMethod = get(state, 'auth.authMethod.data.result.userOrigin', authMethods.JDBC);
const isUnactivated = get(state, 'form.login.submitErrors.unactivated', false);
const userEmail = get(state, 'form.login.values.username', '');
const isStandalone = get(state, 'auth.nodeMode.data.mode') === nodeFunctionalModes.Standalone;
diff --git a/src/modules/Auth/components/Logout/container.jsx b/src/modules/Auth/components/Logout/container.jsx
index 53ee9c6ae..de48276ac 100644
--- a/src/modules/Auth/components/Logout/container.jsx
+++ b/src/modules/Auth/components/Logout/container.jsx
@@ -24,13 +24,21 @@ import React from 'react';
import { connect } from 'react-redux';
import authDucks from 'modules/Auth/ducks';
import Logout from './presenter';
+import { get } from 'services/Utils';
-function mapStateToProps() {
- return {};
+function mapStateToProps(state) {
+ return {
+ authMode: get(state, 'auth.authMode.data.result.mode')
+ }
}
const mapDispatchToProps = {
+ iapLogout: () => {
+ window.location = '/_gcp_iap/clear_login_cookie';
+ },
logout: () => authDucks.actions.logout(),
+
};
+
export default connect(mapStateToProps, mapDispatchToProps)(Logout);
diff --git a/src/modules/Auth/components/Logout/presenter.jsx b/src/modules/Auth/components/Logout/presenter.jsx
index 2b6d4e0a1..5eae6206d 100644
--- a/src/modules/Auth/components/Logout/presenter.jsx
+++ b/src/modules/Auth/components/Logout/presenter.jsx
@@ -23,11 +23,20 @@
import React from 'react';
import BEMHelper from 'services/BemHelper';
import { Link } from 'arachne-ui-components';
+import { authenticationModes } from 'modules/Auth/const';
require('./style.scss');
-function Logout({ logout }) {
+function Logout({ logout, iapLogout, authMode }) {
const classes = new BEMHelper('user-menu');
+ if (authMode === authenticationModes.Proxy) {
+ return (
+
+ power_settings_new
+
+
+ );
+ }
return (
diff --git a/src/modules/Auth/components/Logout/style.scss b/src/modules/Auth/components/Logout/style.scss
index c173f5f58..a563038f0 100644
--- a/src/modules/Auth/components/Logout/style.scss
+++ b/src/modules/Auth/components/Logout/style.scss
@@ -35,6 +35,14 @@
font-size: 2.4rem;
}
}
+ &__iap {
+ &--iframe {
+ position: absolute;
+ width: 0;
+ height: 0;
+ border: none;
+ }
+ }
}
}
\ No newline at end of file
diff --git a/src/modules/Auth/const.js b/src/modules/Auth/const.js
index c7a75fd04..8dd586f21 100644
--- a/src/modules/Auth/const.js
+++ b/src/modules/Auth/const.js
@@ -68,6 +68,7 @@ const apiPaths = {
//
principal: () => '/api/v1/auth/me',
authMethod: () => '/api/v1/auth/method',
+ authMode: () => '/api/v1/auth/mode',
refresh: () => '/api/v1/auth/refresh',
//
passwordPolicy: () => '/api/v1/auth/password-policies',
@@ -81,7 +82,7 @@ const apiPaths = {
const authMethods = keyMirror({
LDAP: null,
- NATIVE: null,
+ JDBC: null,
});
const registerFields = function ({ professionalTypesOptions,
@@ -301,6 +302,11 @@ const nodeFunctionalModes = {
Network: 'NETWORK',
}
+const authenticationModes = {
+ Standard: 'STANDARD',
+ Proxy: 'PROXY',
+}
+
export {
actionTypes,
authMethods,
@@ -311,4 +317,5 @@ export {
paths,
registerFields,
nodeFunctionalModes,
+ authenticationModes,
};
diff --git a/src/modules/Auth/ducks/authMode.js b/src/modules/Auth/ducks/authMode.js
new file mode 100644
index 000000000..aef62d852
--- /dev/null
+++ b/src/modules/Auth/ducks/authMode.js
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2018 Odysseus Data Services, inc.
+ * 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.
+ *
+ * Company: Odysseus Data Services, Inc.
+ * Product Owner/Architecture: Gregory Klebanov
+ * Authors: Pavel Grafkin, Alexander Saltykov, Vitaly Koulakov, Anton Gackovka, Alexandr Ryabokon, Mikhail Mironov
+ * Created: October 12, 2017
+ *
+ */
+
+import Duck from 'services/Duck';
+import { apiPaths } from 'modules/Auth/const';
+
+const actionCoreName = 'AU_AUTH_MODE';
+
+const authModeDuck = new Duck(
+ {
+ name: actionCoreName,
+ urlBuilder: apiPaths.authMode,
+ },//
+);
+
+const actions = authModeDuck.actions;
+const reducer = authModeDuck.reducer;
+
+
+export default {
+ actions,
+ reducer,
+};
\ No newline at end of file
diff --git a/src/modules/Auth/ducks/index.js b/src/modules/Auth/ducks/index.js
index 99f1b3fd7..8205dda0e 100644
--- a/src/modules/Auth/ducks/index.js
+++ b/src/modules/Auth/ducks/index.js
@@ -37,6 +37,7 @@ import passwordPolicy from './passwordPolicy';
import countries from './countries';
import provinces from './provinces';
import nodeMode from './nodeMode';
+import authMode from './authMode';
function setBackUrl(state, action) {
return !isAuthModulePath(action.payload.pathname) ? { ...state, backUrl: action.payload.pathname } : state;
@@ -52,6 +53,7 @@ const actions = {
clearToken: authLogout.actions.clearToken,
principal: principal.actions,
authMethod: authMethod.actions,
+ authMode: authMode.actions,
register: authRegister.actions.create,
professionalType: professionalType.actions,
remindPassword: remindPassword.actions,
@@ -69,6 +71,7 @@ const reducer = combineReducers({
authLogout: authLogout.reducer,
principal: principal.reducer,
authMethod: authMethod.reducer,
+ authMode: authMode.reducer,
authRegister: authRegister.reducer,
professionalType: professionalType.reducer,
remindPassword: remindPassword.reducer,
diff --git a/src/modules/Portal/components/Settings/FormPassword/container.js b/src/modules/Portal/components/Settings/FormPassword/container.js
index ca7f42f47..2d17bb772 100644
--- a/src/modules/Portal/components/Settings/FormPassword/container.js
+++ b/src/modules/Portal/components/Settings/FormPassword/container.js
@@ -51,8 +51,12 @@ function mergeProps(stateProps, dispatchProps, ownProps) {
});
submitPromise
- .then(dispatchProps.resetForm)
- .catch(() => {});
+ .then(() => {
+ dispatchProps.resetForm();
+ alert('Password has been updated successfully.');
+ })
+ .catch(() => {
+ });
return submitPromise;
},
diff --git a/src/modules/Portal/components/Settings/FormPassword/presenter.jsx b/src/modules/Portal/components/Settings/FormPassword/presenter.jsx
index 4cd6100b2..306f49659 100644
--- a/src/modules/Portal/components/Settings/FormPassword/presenter.jsx
+++ b/src/modules/Portal/components/Settings/FormPassword/presenter.jsx
@@ -68,7 +68,7 @@ function FormPassword(props) {
mods: ['bordered'],
placeholder: 'New password confirmation',
showHint: false,
- }
+ },
},
},
];
diff --git a/src/modules/StudyManager/components/ViewEdit/Actions/container.js b/src/modules/StudyManager/components/ViewEdit/Actions/container.js
index 57943ea9e..c0857283f 100644
--- a/src/modules/StudyManager/components/ViewEdit/Actions/container.js
+++ b/src/modules/StudyManager/components/ViewEdit/Actions/container.js
@@ -111,7 +111,7 @@ export default class StudyActionsBuilder {
message: `Are you sure you want to delete study '${stateProps.title}'?`,
})
.then(() => {
- dispatchProps.remove(stateProps.studyId)
+ dispatchProps.remove({id: stateProps.studyId})
.then(() => dispatchProps.goBack())
.catch(() => {});
});
diff --git a/src/modules/StudyManager/components/ViewEdit/ListParticipants/presenter.jsx b/src/modules/StudyManager/components/ViewEdit/ListParticipants/presenter.jsx
index 43d6487b8..646e93812 100644
--- a/src/modules/StudyManager/components/ViewEdit/ListParticipants/presenter.jsx
+++ b/src/modules/StudyManager/components/ViewEdit/ListParticipants/presenter.jsx
@@ -15,7 +15,7 @@
*
* Company: Odysseus Data Services, Inc.
* Product Owner/Architecture: Gregory Klebanov
- * Authors: Pavel Grafkin, Alexander Saltykov, Vitaly Koulakov, Anton Gackovka, Alexandr Ryabokon, Mikhail Mironov
+ * Authors: Pavel Grafkin, Alexander Saltykov, Vitaly Koulakov, Anton Gackovka, Alexandr Ryabokon, Mikhail Mironov, Alexandr Cumarav
* Created: December 27, 2016
*
*/
@@ -25,9 +25,29 @@ import DraggableList from 'react-draggable-list';
import { ListItem, Link, Select } from 'arachne-ui-components';
import BEMHelper from 'services/BemHelper';
import { newParticipantRolesOptions, participantRoles } from 'modules/StudyManager/const';
+import { Avatar } from 'arachne-ui-components';
+import { apiPaths } from 'modules/StudyManager/const';
require('./style.scss');
+function ParticipantCard({url, participant}) {
+ const classes = new BEMHelper('participant-card-avatar');
+
+ return (
+