Skip to content

Commit

Permalink
disabling setup creation
Browse files Browse the repository at this point in the history
  • Loading branch information
hvarg committed Nov 21, 2019
1 parent a0341b6 commit 47212ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/model-catalog/model-configuration-actions.ts
Expand Up @@ -2,7 +2,7 @@ import { Action, ActionCreator } from "redux";
import { ThunkAction } from "redux-thunk";
import { RootState, store } from 'app/store';

import { Configuration, ModelConfiguration, ModelConfigurationApi, ParameterApi, DatasetSpecificationApi,
import { Configuration, ModelConfiguration, ModelConfigurationApi, Parameter, ParameterApi, DatasetSpecificationApi,
SampleResourceApi, SampleCollectionApi, DatasetSpecification } from '@mintproject/modelcatalog_client';
import { idReducer, isValidId, fixObjects, getStatusConfigAndUser, repeatAction, PREFIX_URI, DEFAULT_GRAPH,
START_LOADING, END_LOADING, START_POST, END_POST, MCACommon } from './actions';
Expand Down Expand Up @@ -77,7 +77,7 @@ export const modelConfigurationPost: ActionCreator<PostConfigThunk> = (modelConf
let parameterPromises = [];
let newParameters = [];
let adjustableParameters = [];
modelConfiguration.hasParameter.forEach((parameter) => {
modelConfiguration.hasParameter.forEach((parameter: Parameter) => {
let req = parameterApi.parametersPost({user: DEFAULT_GRAPH, parameter: parameter}) // This should be my username on prod.
let isFixed = parameter.hasFixedValue && parameter.hasFixedValue.length > 0 && parameter.hasFixedValue[0];
parameterPromises.push(req);
Expand Down Expand Up @@ -169,7 +169,8 @@ export const modelConfigurationPost: ActionCreator<PostConfigThunk> = (modelConf
let waiting = Promise.all(allPromises);
waiting.then((values) => {
console.log('AP', allPromises);
modelConfiguration.adjustableParameter = adjustableParameters;
//FIXME: this is not working, maybe we should use other class to create ModelConfigurationSetup or ConfigurationSetup
//modelConfiguration.adjustableParameter = adjustableParameters;
modelConfiguration.hasParameter = newParameters;
modelConfiguration.hasInput = newDS;
console.log('SS', modelConfiguration)
Expand Down
6 changes: 4 additions & 2 deletions src/screens/models/configure/new-setup.ts
Expand Up @@ -284,12 +284,14 @@ export class ModelsNewSetup extends connect(store)(PageViewElement) {
return newParam;
});

console.log('Creating...', setupCreated);

this._waitingFor = 'PostSetup' + this._setupIdentifier;
this._setupIdentifier += 1;

store.dispatch(modelConfigurationPost(setupCreated, configUri, this._waitingFor));
//store.dispatch(modelConfigurationPost(setupCreated, configUri, this._waitingFor));

showNotification("saveNotification", this.shadowRoot!);
//showNotification("saveNotification", this.shadowRoot!);
//goToPage(createUrl(this._model, this._version, this._config));
}
}
Expand Down

0 comments on commit 47212ff

Please sign in to comment.