-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·187 lines (154 loc) · 8.01 KB
/
Copy pathindex.html
File metadata and controls
executable file
·187 lines (154 loc) · 8.01 KB
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html>
<html ng-app="DEditor">
<head>
<title>ASM Dictionary Editor</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.20/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.20/angular-sanitize.min.js"></script>
<script src="components/scripts/ui-bootstrap-tpls-0.9.0.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.20/angular-resource.js"></script>
<script src="components/scripts/main.js"></script>
<script>
$(window).on('load',function(){
$('#getAllChecks2').attr('disabled', true);
$('#getAllChecks1').attr('disabled', true);
$('#apiKey').keyup(function(){
if($(this).val().length ==0 || $('#dikey').val().length ==0){
$('#getAllChecks2').attr('disabled', true);
$('#getAllChecks1').attr('disabled', true);
}else{ $('#getAllChecks2').attr('disabled', false);
$('#getAllChecks1').attr('disabled', false); }
});
$('#dikey').keyup(function(){
if($(this).val().length ==0 || $('#apiKey').val().length==0)
{$('#getAllChecks2').attr('disabled', true);
$('#getAllChecks1').attr('disabled', true); }
else{ $('#getAllChecks2').attr('disabled', false);
$('#getAllChecks1').attr('disabled', false); }
})
});
</script>
</head>
<!-- Controller dkey goes here -->
<body ng-controller="KeyValCtrl">
<div class="loader"></div>
<div class="container">
<div class="row">
<div class="col-sm-12">
<nav class="navbar navbar-light bg-faded">
<h3>ASM Dictionary Editor</h3>
</nav>
<div class="row">
<div class="col-xs-4">
<label for="apiKeys">API Key:</label>
<input class="form-control" id="apiKey" placeholder="APIKEY" ng-model="apiKey"/>
<br/>
</div>
<div class="col-xs-2 form-group">
<label class="control-label" for="selectSilo">
Select a silo
</label>
<select id="selectSilo" class="select form-control" ng-model="selectSilo">
<option value="">Silo #1</option>
<option value="2">Silo #2</option>
<option value="3">Silo #3</option>
<option value="4">Silo #4</option>
</select>
</div>
<div class="col-lg-6" style="margin-top: 25px;">
<label class="control-label">
</label>
</div>
</div>
<div class="row">
<div class="col-xs-4 form-group">
<!--<label class="control-label " for="select-check1">
Select to Edit
</label>
<select class="select form-control" id="select-check1">
</select>-->
<label for="dkey">New/Existing Dictionary Key</label>
<input class="form-control" id="dikey" placeholder="Dictionary Key" ng-model="dikey" pattern="^\S+$" required />
<br/>
<button type="button" id="getAllChecks1" ng-click="sendpost()" class="btn btn-primary gtasm"><span class="glyphicon glyphicon-refresh"></span> Fetch</button>
<button type="button" id="getAllChecks2" ng-click="createnew()" class="btn btn-success gtasm"><span class="glyphicon glyphicon-plus"></span> Add </button>
</div>
</div>
<div class="col-xs-1" style="margin-top: 20px;">
<label class="control-label">
</label>
</div>
<div class="col-xs-1" style="margin-top: 20px;margin-left: 20px;">
<label class="control-label">
</label>
<!-- <button type="button" id="getAllChecks" class="btn btn-primary">Refresh</button> -->
</div>
</div>
<div class="row">
<div class="col-md-12">
<p ng-bind-html="statusmessage"></p>
<br/>
<div class="row allresults" style="display: none;">
<div class="col-md-12">
<table style="width:100%;margin-top: 30px;">
<tr>
<td style="width:60%">
<table class="table">
<tr>
<th>Key
</th>
<th>Value
</th>
<th>Actions
</th>
</tr>
<tr ng-repeat="company in dictionarydata">
<td>{{company.dkey}}
</td>
<td>{{company.dvalue}}
</td>
<td>
<button class="btn btn-primary btn-xs" data-title="Edit" data-toggle="modal" data-target="#edit" ng-click="editRow(company.dkey)""><span class="glyphicon glyphicon-pencil"></span></button>
<button class="btn btn-danger btn-xs" data-title="Delete" data-toggle="modal" data-target="#delete" ng-click="removeRow(company.dkey)"><span class="glyphicon glyphicon-trash"></span></button>
</td>
</tr>
</table>
</td>
<td style="width:30%;">
<form class="form-horizontal" role="form" ng-submit="addRow()">
<div class="form-group">
<label class="col-md-2 control-label">Key</label>
<div class="col-md-4">
<input title="Key cannot contain spaces" required pattern="^\S+$" type="text" class="form-control" dkey="dkey" ng-model="dkey" />
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">Value</label>
<div class="col-md-4">
<input required type="text" class="form-control" dvalue="dvalue" ng-model="dvalue" />
</div>
</div>
<div class="form-group">
<div style="padding-left:110px">
<input type="submit" value="Add" class="btn btn-primary" />
</div>
</div>
</form>
</td>
</tr>
</table>
<button type="button" id="updateDictionary" class="btn btn-primary" ng-click="updated()"><span class="glyphicon glyphicon-floppy-disk"></span> Update Dictionary</button>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="blog-footer">
<p><br/><br/>
<a href="#">Back to top</a>
</p>
</footer>
</body>
</html>