summaryrefslogtreecommitdiffstats
path: root/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.html
blob: 8407b39345fc1bbcd133365b2d4ae164ffb00e9d (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
<!--
 Copyright 2018 ZTE Corporation.

 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="container-fluid" style="padding: 40px 55px 0 55px">
    <form #ruleForm="ngForm" class="form-group row" (submit)="onSubmit(ruleName)">
        <div class="form-body col-xs-10">
            <div class="row form-group">
                <label for="userName" class="col-xs-2 col-sm-1 col-form-label labelstyle">
                    <span>{{"field_rule_name_Add_Page"|translate}}</span>
                    <span style="color: red">*</span>
                </label>
                <div class="col-xs-5 col-sm-6">
                    <input class="form-control ng-pristine ng-untouched ng-invalid ng-invalid-required" type="text" name="rulename" [(ngModel)]="queryRule.ruleName"
                        id="ruleNameInput" readonly="{{addBottonStatus}}" #ruleName="ngModel" required>
                </div>
            </div>

            <div class="row form-group">
                <label for="controlLoopName" class="col-xs-2 col-sm-1 col-form-label labelstyle">
                    <span>{{"field_controlLoopName"|translate}}</span>
                    <span style="color: red">*</span>
                </label>
                <div class="col-xs-5 col-sm-6">
                    <input class="form-control ng-untouched ng-pristine ng-valid" readonly="{{addBottonStatus}}" type="text" [(ngModel)]="queryRule.loopControlName"
                        name="controlLoopName" id="controlLoopName" required>
                </div>
            </div>

            <div class="row form-group">
                <label for="userName" class="col-xs-2 col-sm-1 col-form-label labelstyle">
                    <span>{{"field_description"|translate}}</span>
                </label>
                <div class="col-xs-5 col-sm-6">
                    <input class="form-control ng-untouched ng-pristine ng-valid" readonly="{{addBottonStatus}}" type="text" [(ngModel)]="queryRule.description"
                        name="description">
                </div>
            </div>

            <div id="state" class="row form-group">
                <label class="col-xs-2 col-sm-1 col-form-label labelstyle">
                    <span>{{"common_status"|translate}}</span>
                </label>
                <div class="col-xs-10 col-sm-11">
                    <div class="row" style="margin-left:-30px">
                        <div *ngIf="queryRule.enabled == 1" class="col-xs-12">
                            <div class="row">
                                <div class="col-xs-4 col-sm-2 col-md-1">
                                    <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='1'>
                                    <label for="radio1">{{"common_on"|translate}}</label>
                                </div>
                                <div class="col-xs-4 col-sm-2 col-md-1">
                                    <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='0'>
                                    <label for="radio1" (click)="switch()">{{"common_off"|translate}}</label>
                                </div>
                            </div>
                        </div>
                        <div *ngIf="queryRule.enabled == 0" class="col-xs-12">
                            <div class="row">
                                <div class="col-xs-4 col-sm-2 col-md-1">
                                    <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='1'>
                                    <label for="radio1" (click)="switch()">{{"common_on"|translate}}</label>
                                </div>
                                <div class="col-xs-4 col-sm-2 col-md-1">
                                    <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='0'>
                                    <label for="radio1">{{"common_off"|translate}}</label>
                                </div>

                            </div>
                        </div>

                    </div>
                </div>
            </div>

            <div class="row form-group">
                <label for="" class="col-xs-2 col-sm-1 col-form-label labelstyle">
                    <span>{{"message_rule_content"|translate}}</span>
                    <span style="color: red">*</span>
                </label>
                <div class="col-xs-9 col-sm-10">
                    <div class="form-group">
                        <textarea id="cmds" class="form-control" readonly="{{addBottonStatus}}" [(ngModel)]="queryRule.content" name="content" rows="12"
                            cols="80" required placeholder="package org.onap.holmes.rule;">
                         </textarea>
                    </div>
                </div>
            </div>

            <div class="row form-group">
                <div class="col-xs-8 col-xs-offset-2 col-sm-offset-1">
                    <label class="myclass" id="checkLabel">
                        <button type="button" (click)="checkContent('check')" disabled="{{addBottonStatus}}" class="btn btn-small">{{"common_check"|translate}}</button>
                    </label>
                    <label class="myclass" id="updateLabel">
                        <button type="button" disabled="{{addBottonStatus}}" class="btn btn-primary btn-small" (click)="update()">{{"common_update"|translate}}</button>
                    </label>
                    <label class="myclass" id="saveLabel">
                        <button type="submit" disabled="{{addBottonStatus}}" class="btn btn-primary btn-small">{{"common_save"|translate}}</button>
                    </label>
                    <label class="myclass" id="cancelLabel">
                        <button type="button" routerLink='/alarmRule' class="btn btn-small">{{"common_cancel"|translate}}</button>
                    </label>
                </div>
            </div>
        </div>
    </form>
</div>