summaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html
blob: 619412c17ac4c7246095da83b0645c2717bfecd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!--
============LICENSE_START==========================================
===================================================================
Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
===================================================================

Unless otherwise specified, all software contained herein is licensed
under the Apache License, Version 2.0 (the License);
you may not use this software 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.
============LICENSE_END============================================ -->
<div class="containerDiv">
    <div class="fileViewContainer">
        <!-- <div style="width:inherit; height: inherit; position: fixed;z-index: 1; background-color: rgb(0,0,0);background-color: rgba(0,0,0,0.4);"></div> -->
        <div style="display: flex;">
            <div>
                <i class="fa fa-folder delete-add-file" aria-hidden="true" [ngClass]="{'fa-disabled': selectedFileObj.type == 'file' || selectedFileObj.type == ''}" (click)="enableNameInputEl('createFolder')"></i>
                <i class="fa fa-file add-file" aria-hidden="true" [ngClass]="{'fa-disabled' : selectedFileObj.type == 'file' ||selectedFileObj.type == ''}" (click)="enableNameInputEl('createFile')"></i>
                <i class="fa fa-trash delete-add-file" aria-hidden="true" [ngClass]="{'fa-disabled' : selectedFileObj.type == ''}" (click)="deleteFolderOrFile('deleteFile')"></i>
            </div>
            <div>
                <input *ngIf="isNameTextboxEnablled" type="text" (focusout)="createFolderOrFile($event)" />
            </div>
        </div>
        <mat-tree [dataSource]="dataSource" [treeControl]="treeControl" style="background-color: #ebebeb">
            <mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)="selectFileToView(node);activeNode = node" [ngClass]="{ 'background-highlight': activeNode === node }">
                <button mat-icon-button disabled></button>
                <button mat-icon-button (click)="selectFileToView(node)">{{node.name}}</button>
            </mat-tree-node>
            <mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)="selectFolder(node);activeNode = node" [ngClass]="{ 'background-highlight': activeNode === node }">
                <button mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
                <mat-icon class="mat-icon-rtl-mirror">
                  {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
                </mat-icon>
              </button>
                <button mat-icon-button>{{node.name}}</button>
            </mat-tree-node>
        </mat-tree>
    </div>
    <div class="editorConatiner" [ngClass] = "{ 'apply-scrol-to-editor-container' : viewTemplateMode}">
        <!-- <i class="fa fa-save save-icon" style="font-size:24px" (click)="updateBlueprint()"></i>
        <ace-editor [(text)]="text" [(mode)]="mode" #editor class="aceEditor"></ace-editor> -->
        <div class="normal-editor-mode" [ngClass]="{ 'resource-mapping-mode': viewTemplateMode}">
            <i class="fa fa-save save-icon" style="font-size:24px" (click)="saveEditedChanges()"></i>
            <ace-editor [(text)]="text" [(mode)]="mode" #editor class="aceEditor"></ace-editor>
        </div>
        <button *ngIf="viewTemplateMode" class="btn-active" (click)="loadConfigParams()">Load Config Parameters</button>
        <button *ngIf="viewTemplateMode" class="btn-active">Auto Map to Data dictionary</button>
        <div style="height: 50%;overflow: scroll" *ngIf="viewTemplateMode">
            <app-resource-mapping [paramData]="paramData"></app-resource-mapping>
        </div>
    </div>

</div>