aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2019-03-14 16:50:43 +0530
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>2019-03-14 16:50:53 +0530
commitfb2c2a29913164f7d474156b68a416e50a24b6f2 (patch)
treeaf71220e7ea8286093edbd4f9fb13b9a665c9557 /cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
parent57e97e6e0abe1f42c8596f9b9dbbe202ca4e0919 (diff)
Removed inline css styles
Moved the inline styles to .css file Issue-ID: CCSDK-1069 Change-Id: Id4a6fd43290666b992d6884dccda0896062a00b2 Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts')
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts75
1 files changed, 1 insertions, 74 deletions
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
index 2a2455c61..9a7a570ad 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
@@ -36,61 +36,6 @@ import 'brace';
import 'brace/ext/language_tools';
import 'ace-builds/src-min-noconflict/snippets/html';
-interface FoodNode {
- name: string;
- children?: FoodNode[];
-}
-
-const TREE_DATA: FoodNode[] = [
- {
- name: 'Definitions',
- children: [
- { name: 'activation-blueprint.json' },
- { name: 'artifacts_types.json' },
- { name: 'data_types.json' },
- ]
- },
- {
- name: 'Scripts',
- children: [
- {
- name: 'kotlin',
- children: [
- { name: 'ScriptComponent.cba.kts' },
- { name: 'ResourceAssignmentProcessor.cba.kts' },
- ]
- }
- ]
- },
- {
- name: 'Templates',
- children: [
- {
- name: 'baseconfig-template'
- }
- ]
- },
- {
- name: 'TOSCA-Metada',
- children: [
- {
- name: 'TOSCA.meta'
- }
- ]
- },
-];
-
-/** Flat node with expandable and level information */
-interface ExampleFlatNode {
- expandable: boolean;
- name: string;
- level: number;
-}
-
-
-
-
-
@Component({
selector: 'app-test-template',
templateUrl: './test-template.component.html',
@@ -102,37 +47,19 @@ export class TestTemplateComponent implements OnInit {
private workflows = [];
@ViewChild('editor') editor;
options: any = { fontSize: "100%", printMargin: false, tabSize: 2 };
- private transformer = (node: FoodNode, level: number) => {
- return {
- expandable: !!node.children && node.children.length > 0,
- name: node.name,
- level: level,
- };
- }
-
- treeControl = new FlatTreeControl<ExampleFlatNode>(
- node => node.level, node => node.expandable);
-
- treeFlattener = new MatTreeFlattener(
- this.transformer, node => node.level, node => node.expandable, node => node.children);
-
- dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
constructor(private store: Store<IAppState>) {
this.blueprintpState = this.store.select('blueprint')
.subscribe((data: any) => {
console.log(data);
- if (data.blueprint.topology_template && data.blueprint.topology_template.workflows) {
+ if (data && data.blueprint && data.blueprint.topology_template && data.blueprint.topology_template.workflows) {
this.buildWorkflowData(data.blueprint.topology_template.workflows);
// this.request = JSON.stringify(data.blueprint.topology_template.workflows[0], undefined, 4);
}
});
- this.dataSource.data = TREE_DATA;
}
- hasChild = (_: number, node: ExampleFlatNode) => node.expandable;
-
ngOnInit() {
}