Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverted extra changes back #1699

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion js/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ define(
this.currentCohortDefinitionInfo([]);
} else {
const { data: cohortDefinition } = await httpService.doGet(config.api.url + 'cohortdefinition/' + cohortDefinitionId);
cohortDefinition.expression = JSON.parse(cohortDefinition.expression);
this.currentCohortDefinition(new CohortDefinition(cohortDefinition));

const { data: generationInfo } = await httpService.doGet(config.api.url + 'cohortdefinition/' + cohortDefinitionId + '/info');
Expand All @@ -518,7 +519,7 @@ define(
// Now that we have loaded up the cohort definition, we'll need to
// resolve all of the concepts embedded in the concept set collection
// to ensure they have all of the proper properties for editing in the cohort
// editor
// editior
if (this.currentCohortDefinition().expression().ConceptSets()) {
const identifiers = [];
this.currentCohortDefinition().expression().ConceptSets()
Expand Down
24 changes: 12 additions & 12 deletions js/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define([
],
(
ko,
config,
config,
) => {

const minChartHeight = 300;
Expand Down Expand Up @@ -384,22 +384,22 @@ define([
}];

const apiPaths = {
role: (id = '') => `${config.api.url}role/${id}`,
roleUsers: roleId => `${config.api.url}role/${roleId}/users`,
permissions: () => `${config.api.url}permission`,
rolePermissions: roleId => `${config.api.url}role/${roleId}/permissions`,
relations: (roleId, relation, ids = []) => `${config.api.url}role/${roleId}/${relation}/${ids.join('+')}`,
role: (id = '') => `${config.api.url}role/${id}`,
roleUsers: roleId => `${config.api.url}role/${roleId}/users`,
permissions: () => `${config.api.url}permission`,
rolePermissions: roleId => `${config.api.url}role/${roleId}/permissions`,
relations: (roleId, relation, ids = []) => `${config.api.url}role/${roleId}/${relation}/${ids.join('+')}`,
jobs: () => `${config.api.url}job/execution?comprehensivePage=true`,
job: (id) => `${config.api.url}job/${id}`,
jobByName: (name, type) => `${config.api.url}job/type/${type}/name/${name}`,
};

const applicationStatuses = {
initializing: 'initializing',
running: 'running',
noSourcesAvailable: 'no-sources-available',
failed: 'failed',
};
const applicationStatuses = {
initializing: 'initializing',
running: 'running',
noSourcesAvailable: 'no-sources-available',
failed: 'failed',
};

const generationStatuses = {
STARTED: 'STARTED',
Expand Down
3 changes: 3 additions & 0 deletions js/pages/cohort-definitions/cohort-definition-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ define(['jquery', 'knockout', 'text!./cohort-definition-manager.html',
this.sharedState = sharedState;
this.identifiers = ko.observable();
this.sourcecodes = ko.observable();
this.isSaveable = ko.pureComputed(() => {
return this.dirtyFlag() && this.dirtyFlag().isDirty();
});
this.conceptLoading = ko.observable(false);
this.conceptSetName = ko.observable();
this.tabPath = ko.computed(() => {
Expand Down
14 changes: 7 additions & 7 deletions js/pages/estimation/cca-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ define([
this.loadingMessage = ko.observable(this.defaultLoadingMessage);
this.packageName = ko.observable().extend({alphaNumeric: null});
this.selectedTabKey = ko.observable(params.routerParams().section);
this.isSaving = ko.observable(false);
this.isCopying = ko.observable(false);
this.isDeleting = ko.observable(false);
this.isSaving = ko.observable(false);
this.isCopying = ko.observable(false);
this.isDeleting = ko.observable(false);
this.defaultName = globalConstants.newEntityNames.ple;
this.executionTabTitle = config.useExecutionEngine ? "Executions" : "";
this.isProcessing = ko.computed(() => {
return this.isSaving() || this.isCopying() || this.isDeleting();
});
this.componentParams = ko.observable({
return this.isSaving() || this.isCopying() || this.isDeleting();
});
this.componentParams = ko.observable({
comparisons: sharedState.estimationAnalysis.comparisons,
defaultCovariateSettings: this.defaultCovariateSettings,
dirtyFlag: sharedState.estimationAnalysis.dirtyFlag,
Expand All @@ -88,7 +88,7 @@ define([
loadingMessage: this.loadingMessage,
packageName: this.packageName,
subscriptions: this.subscriptions,
});
});

this.isNameFilled = ko.computed(() => {
return this.estimationAnalysis() && this.estimationAnalysis().name();
Expand Down
4 changes: 2 additions & 2 deletions js/pages/estimation/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define(

const apiPaths = {
downloadCcaAnalysisPackage: (id, name) => `estimation/${id}/download?packageName=${name}`,
downloadResults: id => `estimation/generation/${id}/result`,
downloadResults: id => `estimation/generation/${id}/result`,
};

const paths = {
Expand All @@ -19,7 +19,7 @@ define(
browser: () => '#/estimation',
};

const estimationGenerationStatus = consts.generationStatuses;
const estimationGenerationStatus = consts.generationStatuses;

const conceptSetCrossReference = {
targetComparatorOutcome: {
Expand Down
6 changes: 3 additions & 3 deletions js/pages/estimation/estimation-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ define([
this.columns = [
{
title: 'Id',
data: 'id'
data: 'estimationId'
},
{
title: 'Type',
Expand All @@ -72,7 +72,7 @@ define([
{
title: 'Name',
render: datatableUtils.getLinkFormatter(d => ({
link: constants.paths.ccaAnalysisDash(d.id),
link: constants.paths.ccaAnalysisDash(d.estimationId),
label: d['name']
})),
},
Expand All @@ -92,7 +92,7 @@ define([
},
{
title: 'Author',
data: 'createdBy.login'
data: 'createdBy'
}
];
}
Expand Down
6 changes: 3 additions & 3 deletions js/pages/estimation/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
define(
(require, exports) => {
const ko = require('knockout');
const ko = require('knockout');
const buildRoutes = require('./routes');
const appState = require('atlas-state');
const constants = require('./const');
Expand All @@ -27,8 +27,8 @@ define(
title: 'Estimation',
buildRoutes,
navUrl: navUrl,
icon: 'balance-scale',
statusCss: statusCss
icon: 'balance-scale',
statusCss: statusCss
};
}
);
4 changes: 2 additions & 2 deletions js/pages/incidence-rates/ir-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ define([
this.loading(true);
const analysis = await IRAnalysisService.copyAnalysis(this.selectedAnalysisId());
this.selectedAnalysis(new IRAnalysisDefinition(analysis));
this.selectedAnalysisId(analysis.id);
this.selectedAnalysisId(analysis.id)
this.dirtyFlag(new ohdsiUtil.dirtyFlag(this.selectedAnalysis()));
this.isCopying(false);
this.loading(false);
Expand All @@ -338,7 +338,7 @@ define([
if (this.dirtyFlag().isDirty() && !confirm("Incidence Rate Analysis changes are not saved. Would you like to continue?")) {
return;
}
this.close();
this.close()
commonUtils.routeTo(constants.apiPaths.analysis());
}

Expand Down
6 changes: 3 additions & 3 deletions js/pages/prediction/prediction-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ define([
this.columns = [
{
title: 'Id',
data: 'id'
data: 'analysisId'
},
{
title: 'Type',
Expand All @@ -72,7 +72,7 @@ define([
{
title: 'Name',
render: datatableUtils.getLinkFormatter(d => ({
link: constants.paths.analysis(d.id),
link: constants.paths.analysis(d.analysisId),
label: d['name']
})),

Expand All @@ -93,7 +93,7 @@ define([
},
{
title: 'Author',
data: 'createdBy.login'
data: 'createdBy'
}
];
}
Expand Down
10 changes: 5 additions & 5 deletions js/pages/prediction/prediction-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ define([
this.defaultTemporalCovariateSettings = null;
this.fullSpecification = ko.observable(null);
this.packageName = ko.observable().extend({alphaNumeric: null});
this.isSaving = ko.observable(false);
this.isCopying = ko.observable(false);
this.isSaving = ko.observable(false);
this.isCopying = ko.observable(false);
this.isDeleting = ko.observable(false);
this.executionTabTitle = config.useExecutionEngine ? "Executions" : "";
this.isProcessing = ko.computed(() => {
return this.isSaving() || this.isCopying() || this.isDeleting();
});
this.isProcessing = ko.computed(() => {
return this.isSaving() || this.isCopying() || this.isDeleting();
});
this.defaultName = globalConstants.newEntityNames.plp;
this.componentParams = ko.observable({
analysisId: sharedState.predictionAnalysis.selectedId,
Expand Down
1 change: 1 addition & 0 deletions js/pages/profiles/profile-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ define([
} else if (this.cohortDefinitionId()) {
cohortDefinitionService.getCohortDefinition(this.cohortDefinitionId())
.then((cohortDefinition) => {
cohortDefinition.expression = JSON.parse(cohortDefinition.expression);
this.currentCohortDefinition(new CohortDefinition(cohortDefinition));
});
}
Expand Down
12 changes: 6 additions & 6 deletions js/services/IRAnalysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ define(function (require, exports) {
}

function saveAnalysis(definition) {
var definitionCopy = JSON.parse(ko.toJSON(definition));
var definitionCopy = JSON.parse(ko.toJSON(definition))

if (typeof definitionCopy.expression != 'string')
definitionCopy.expression = JSON.stringify(definitionCopy.expression);
Expand Down Expand Up @@ -105,7 +105,7 @@ define(function (require, exports) {
});
}

const errorHandler = response => {
const errroHandler = response => {
if (response.status === 404) {
throw new Error("Not found entity");
}
Expand All @@ -118,15 +118,15 @@ define(function (require, exports) {

return promise
.then(({ data }) => data)
.catch(errorHandler);
.catch(errroHandler);
}

function loadResultsSummary(id, sourceKey) {
const promise = httpService.doGet(`${config.webAPIRoot}ir/${id}/info/${sourceKey}`);

return promise
.then(({data}) => data)
.catch(errorHandler);
.catch(errroHandler);
}

function deleteInfo(id, sourceKey) {
Expand All @@ -148,7 +148,7 @@ define(function (require, exports) {
authApi.handleAccessDenied(response);
return response;
});
}
}

function exists(name, id) {
return httpService
Expand All @@ -173,7 +173,7 @@ define(function (require, exports) {
getReport: getReport,
loadResultsSummary,
exists,
};
}

return api;
});