6378429b016c436a6951a4bce5431f9b9c04e6eb
[holmes/rule-management.git] / rulemgt-frontend / src / app / correlation-ruleInfo / ruleInfo.component.html
1 <!--
2  Copyright 2017 ZTE Corporation.
3
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7
8      http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 -->
16 <div class="container" style="margin-top: 20px">
17     <form #ruleForm="ngForm" class="form-group row" (submit)="onSubmit(ruleName)">
18         <div class="form-body">
19             <div class="row form-group col-xs-12 ">
20                 <label for="userName" class="col-xs-2 col-form-label labelstyle">
21                         <span>{{"field_rule_name_Add_Page"|translate}}</span>
22                         <span style="color: red">*</span>
23                     </label>
24                 <div class="col-xs-6" style="margin-left: -100px">
25                     <input class="form-control ng-pristine ng-untouched ng-invalid ng-invalid-required" style="width: 60%" type="text" name="rulename"
26                         [(ngModel)]="queryRule.ruleName" id="ruleNameInput" readonly="{{addBottonStatus}}" #ruleName="ngModel"
27                         required>
28                 </div>
29             </div>
30
31             <div class="row form-group col-xs-12">
32                 <label for="userName" class="col-xs-2 col-form-label labelstyle">
33                         <span>{{"field_description"|translate}}</span>
34                     </label>
35                 <div class="col-xs-6" style="margin-left: -100px">
36                     <input class="form-control ng-untouched ng-pristine ng-valid" readonly="{{addBottonStatus}}" style="width: 60%" type="text"
37                         [(ngModel)]="queryRule.loopControlName" name="description">
38                 </div>
39             </div>
40
41             <div class="row form-group col-xs-12">
42                 <label for="userName" class="col-xs-2 col-form-label labelstyle">
43                         <span>{{"field_description"|translate}}</span>
44                     </label>
45                 <div class="col-xs-6" style="margin-left: -100px">
46                     <input class="form-control ng-untouched ng-pristine ng-valid" readonly="{{addBottonStatus}}" style="width: 60%" type="text"
47                         [(ngModel)]="queryRule.description" name="description">
48                 </div>
49             </div>
50
51             <div id="state" class="row form-group col-xs-12">
52                 <label class="col-xs-2 col-form-label labelstyle">
53                          <span>{{"common_status"|translate}}</span>
54                      </label>
55
56                 <div class="col-xs-6" style="margin-left: -113px">
57                     <div *ngIf="queryRule.enabled == 0">
58                         <div class="col-xs-3" >
59                             <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='0'>
60                             <label for="radio1" >{{"common_off"|translate}}</label>
61                         </div>
62                         <div class="col-xs-3" >
63                             <input class="magic-radio" type="radio" name="radio"  [(ngModel)]="queryRule.enabled" value='1'>
64                             <label for="radio1" (click)="switch()">{{"common_on"|translate}}</label>
65                         </div>
66                     </div>
67                     <div *ngIf="queryRule.enabled == 1">
68                         <div class="col-xs-3" >
69                             <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='0'>
70                             <label for="radio1" (click)="switch()">{{"common_off"|translate}}</label>
71                         </div>
72                         <div class="col-xs-3" >
73                             <input class="magic-radio" type="radio" name="radio"  [(ngModel)]="queryRule.enabled" value='1'>
74                             <label for="radio1" >{{"common_on"|translate}}</label>
75                         </div>
76                     </div>             
77                 </div>
78             </div>
79
80             <div class="row form-group col-xs-12">
81                 <label for="" class="col-xs-2 col-form-label labelstyle">
82                         <span>{{"common_file"|translate}}</span>
83                     </label>
84                 <div class="col-xs-6" style="margin-left: -100px">
85                     <div class="btn-group btn-group-circle">
86                         <span class="importDivArea mmlBatchBtnBar">
87                             <button class="btn btn-info" id="importBtn" disabled="{{addBottonStatus}}">
88                                 <span class="ict-import"></span>
89                         <span>{{"import"|translate}}</span>
90                         </button>
91                         <div id="importDiv" class="container upload">
92                             <form id="fileupload" #fileForm="ngForm" role="form" enctype="multipart/form-data">
93                                 <div class="file-preview">
94                                     <div id="dropzone" class="file-drop-zone">
95                                         <div class="file-drop-zone-title">
96                                             <span>{{"file_import"|translate}}</span>
97                                         </div>
98                                     </div>
99                                 </div>
100
101                                 <div class="input-group fileupload-btn">
102                                     <div id="fileName" class="form-control file-caption">task2.zip</div>
103                                     <span class="input-group-btn" id="btnGroup">
104                                             <span class="btn btn-primary fileinput-button white radius_s blue1-active" id="browse" data-placement="bottom" data-toggle="tooltip">
105                                                 <span class="importBtnFontSize">{{"common_browse"|translate}}</span>
106                                     <input type="file" name="file" title=" " accept=".txt" multiple="">
107                                     </span>
108                                     <button id="fileremove" class="btn btn-default" type="button">
109                                                 <span class="importBtnFontSize">{{"common_remove"|translate}}</span>
110                                             </button>
111                                     <button id="filesubmit" class="btn btn-default" type="button">{{"common_confirm"|translate}}</button>
112                                     </span>
113                                 </div>
114
115                             </form>
116                         </div>
117                         </span>
118                     </div>
119                 </div>
120             </div>
121
122             <div class="row form-group col-xs-12">
123                 <label for="" class="col-xs-2 col-form-label labelstyle">
124                         <span>{{"message_rule_content"|translate}}</span>
125                         <span style="color: red">*</span>
126                     </label>
127                 <div class="col-xs-8" style="margin-left: -100px">
128                     <div class="form-group">
129                         <textarea id="cmds" class="form-control" readonly="{{addBottonStatus}}" [(ngModel)]="queryRule.content" name="content" rows="12"
130                             cols="80" required placeholder="package example;">
131                          </textarea>
132
133                     </div>
134                 </div>
135             </div>
136
137             <div class="row form-group col-xs-12 " style="margin-left: 73px">
138                 <div class="col-xs-8 ">
139                     <label class="myclass" id="checkLabel">
140                         <button type="button" (click)="checkContent('check')" disabled="{{addBottonStatus}}" class="btn btn-info">{{"common_check"|translate}}</button>
141                     </label>
142                     <label class="myclass" id="updateLabel">
143                         <button type="button"  disabled="{{addBottonStatus}}" class="btn btn-info" (click)="update()">{{"common_update"|translate}}</button>
144                     </label>
145                     <label class="myclass" id="saveLabel">
146                         <button type="submit"  disabled="{{addBottonStatus}}" class="btn btn-info">{{"common_save"|translate}}</button>
147                     </label>
148                     <label class="myclass" id="cancelLabel">
149                         <button type="button" routerLink='/alarmRule' class="btn btn-info">{{"common_cancel"|translate}}</button>
150                     </label>
151                 </div>
152             </div>
153         </div>
154     </form>
155 </div>