aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-07-31 18:55:26 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-31 18:55:26 +0000
commit82a22313f1d87f32417c5a878ffb7e20cfd464fe (patch)
tree13d6f54e9232acfd9d0ad7c786469e5f24adf1d5 /cds-ui
parentd3e573f5d0f53c8209a8c2e5cf4725abf173eb69 (diff)
parentf052a06d5d0520f883babbbb91550ce7e790a478 (diff)
Merge "Source template component- store update"
Diffstat (limited to 'cds-ui')
-rw-r--r--cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts
index 3e8f4f8d6..1d41ae7c7 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts
@@ -28,7 +28,7 @@ import { Observable } from 'rxjs';
import { Store } from '@ngrx/store';
import { IAppState } from '../../../../common/core/store/state/app.state';
import { A11yModule } from '@angular/cdk/a11y';
-import { LoadResourcesSuccess } from 'src/app/common/core/store/actions/resources.action';
+import { SetResourcesState } from 'src/app/common/core/store/actions/resources.action';
import { ISourcesData } from 'src/app/common/core/store/models/sourcesData.model';
import { JsonEditorComponent, JsonEditorOptions } from 'ang-jsoneditor';
import { ResourceEditService } from '../resource-edit.service';
@@ -171,6 +171,20 @@ export class SourcesTemplateComponent implements OnInit {
}
}
});
+ let newsources= {};
+ this.sourcesOptions.forEach(sourceItem=>{
+ console
+ newsources[sourceItem.name] = {};
+ newsources[sourceItem.name] = sourceItem.data;
+ });
+ this.resources.definition.sources = newsources;
+ let resourcesState = {
+ resources: this.resources,
+ isLoadSuccess: true,
+ isUpdateSuccess:true,
+ isSaveSuccess:true
+ }
+ this.store.dispatch(new SetResourcesState(resourcesState));
});
}
});