summaryrefslogtreecommitdiffstats
path: root/components/datalake-handler/admin/src/src/app/views/dashboard-setting/template/template-list/edit-template-modal/edit-template-modal.component.html
blob: 9e2bde5e285da6d62e34d81c3a59273c1f05843f (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!--
    Copyright (C) 2019 CMCC, Inc. and others. All rights reserved.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file 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.
-->
<div class="p-1">
  <div class="modal-header pb-0 border-0">
    <div class="container-fluid">
      <div class="row">
        <div class="col-md-12">
          <label class="dl-h3">{{ templateInputTitle }}</label>
          <i class="fas fa-plus fa-2x close-btn-icon" (click)="activeModal.close('Close click')"></i>
        </div>
      </div>
      <div class="row">
        <div class="col-md-12">
          <hr>
        </div>
      </div>
    </div>
  </div>
  <div class="modal-body border-0">
    <div class="container-fluid">
      <div class="form-group row row-wrapper">
        <div class="row-half-item usual-item">
          <div>
            <label class="dl-emphasis1" for="inputtemplateName">{{ 'TEMPLATE_NAME' | translate }}</label>
          </div>
          <div>
            <input #inputtemplateName [(ngModel)]="this.templateInput.name" class="form-control dl-input-text"
              type="text" placeholder="Username" />
          </div>
        </div>
        <div class="row-half-item upload-item">
          <div>
            <label class="dl-emphasis1">{{ 'FIELUPLOAD' | translate }}</label>
          </div>
          <div class="upload-item-button">
            <input type="file" id="f-file" (change)="this.jsReadFiles()" />
            <label for="f-file" class="upload-item-content-button">
              <button type="button" class="btn dl-btn-dark btn-block" style="cursor: pointer">
                {{ 'FIELUPLOAD' | translate }}
              </button>
            </label>
            <span style="margin-left: 15px;">
              <i class="fa fa-file" style="margin-right: 5px" *ngIf="this.fileName"></i>{{this.fileName}}</span>
          </div>
        </div>
      </div>

      <div class="form-group">
        <div>
          <label class="dl-emphasis1" for="templatebody">{{ 'TEMPLATE_BODY'| translate }}</label>
        </div>
        <div>
          <textarea #templatebody [(ngModel)]="this.templateInput.body"
            class="form-control dl-input-text upload-item-content-body" placeholder="Put the design here..."
            rows="3"></textarea>
        </div>
      </div>

      <div class="form-group row row-wrapper">
        <div class="row-half-item usual-item">
          <div>
            <label class="dl-emphasis1">{{ 'TEMPLATE_TYPE' | translate }}</label>
          </div>
          <div>
            <select #templatetype class="custom-select dl-input-text" id="selDataFormat" disabled>
              <option *ngFor="let item of templatetypedata" [selected]="item.name === defaultDesigntype">
                {{item.name}}</option>
            </select>
          </div>
        </div>
        <div class="row-half-item usual-item">
          <div>
            <label class="dl-emphasis1">{{ 'TOPICS_NAME' | translate }}</label>
          </div>
          <div>
            <select #topic class="custom-select dl-input-text" id="selDataFormat">
              <option *ngFor="let item of topicname" [selected]="item === defaultTopicname">{{item}}</option>
            </select>
          </div>
        </div>
      </div>

      <div class="form-group">
        <div class="row-half-item">
          <label class="dl-emphasis1">{{ 'SINK' | translate }}</label>
        </div>

        <div class="input-group row-quarter-item" *ngFor="let db of dbList">
          <div class="input-group-prepend">
            <label class="input-group-text dl-input-chk-label">
              <input id="chk_{{ db }}" type="checkbox" [checked]="templateInput.dbs.includes(+db.key)"
                (change)="this.updateSelectedDB($event, db)" />
              <span class="dl-input-checkmark"></span>
            </label>
          </div>
          <label class="form-control dl-input-chk" for="chk_{{ db }}">
            {{ db.name }}
          </label>
        </div>
      </div>
    </div>
  </div>

  <div class="modal-footer border-0 pt-0 pb-2">
    <div class="container-fluid">
      <div class="row">
        <div class="col-md-6 p-0">
        </div>
        <div class="col-md-3 p-1">
          <span>
            <button type="button" class="btn dl-btn-dark btn-block" (click)="this.passBack()">
              Save
            </button>
          </span>
        </div>
        <div class="col-md-3 p-1">
          <span>
            <button type="button" class="btn dl-btn-light btn-block" (click)="activeModal.close('Close click')">
              Cancel
            </button>
          </span>
        </div>
      </div>
    </div>
  </div>
</div>