forked from arnoudkooi/SN-Utils
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpopup.html
More file actions
315 lines (287 loc) · 15.8 KB
/
popup.html
File metadata and controls
315 lines (287 loc) · 15.8 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
<!DOCTYPE html>
<html>
<head>
<title>ServiceNow Utils by arnoudkooi.com</title>
<link rel="stylesheet" href="/css/bootstrap.css">
<link rel="stylesheet" href="/css/datatables.css">
<link rel="stylesheet" href="/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/style.css">
<script src="/js/jquery.js"></script>
<script src="/js/bootstrap.js"></script>
<script src="/js/datatables.js"></script>
<script src="/js/moment.js"></script>
<script src="/js/functions.js"></script>
<script src="/popup.js"></script>
</head>
<body>
<div id="content">
<form>
<input id='tbxactivetab' name='tbxactivetab' value="tababout" class="sync" type="hidden" />
<ul class="nav nav-tabs compact" id="myTab">
<li class='nav-item onlyadmin'>
<a class="nav-link" data-target="#tabupdatesets" data-toggle="tab">Update Set
<span id="waitingupdatesets" class="waiting">
<i class='fa fa-spinner fa-spin' aria-hidden='true'></i>
</span>
</a>
</li>
<li class='nav-item onlyadmin'>
<a class="nav-link" data-target="#tabupdates" data-toggle="tab">Updates
<span id="waitingupdates" class="waiting">
<i class='fa fa-spinner fa-spin' aria-hidden='true'></i>
</span>
</a>
</li>
<li class='nav-item onlyadmin'>
<a class="nav-link" data-target="#tabnodes" data-toggle="tab">Nodes
<span id="waitingnodes" class="waiting">
<i class='fa fa-spinner fa-spin' aria-hidden='true'></i>
</span>
</a>
</li>
<li class='nav-item'>
<a class="nav-link" data-target="#tabtables" data-toggle="tab">Tables
<span id="waitingtables" class="waiting">
<i class='fa fa-spinner fa-spin' aria-hidden='true'></i>
</span>
</a>
</li>
<li class='nav-item'>
<a class="nav-link" data-target="#tabdataexplore" data-toggle="tab">View Data
<span id="waitingdataexplore" class="waiting">
<i class='fa fa-spinner fa-spin' aria-hidden='true'></i>
</span>
</a>
</li>
<li class='nav-item'>
<a class="nav-link" data-target="#tabuser" data-toggle="tab">User
<span id="waitinguser" class="waiting">
<i class='fa fa-spinner fa-spin' aria-hidden='true'></i>
</span>
</a>
</li>
<li class='nav-item'>
<a class="nav-link" data-target="#tabcodesearch" data-toggle="tab">Code Search
<span id="waitingcodesearch" class="waiting">
<i class='fa fa-spinner fa-spin' aria-hidden='true'></i>
</span>
</a>
</li>
<li class='nav-item'>
<a class="nav-link" data-target="#tabgr" data-toggle="tab">GlideRecord</a>
</li>
<li class='nav-item'>
<a class="nav-link" data-target="#tabscript" data-toggle="tab">ScriptSync
<span id="waitingscript" class="waiting">
<i class='fa fa-spinner fa-spin' aria-hidden='true'></i>
</span>
</a>
</li>
<li class='nav-item'>
<a class="nav-link active" data-target="#tababout" data-toggle="tab">About</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="tabupdatesets">
<div class="input-group">
<input type="search" id="tbxupdatesets" name="tbxupdatesets" class="form-control form-control-sm sync" placeholder="Search in progress update set in current scope...">
<span class="input-group-append">
<button class="btn btn-outline-secondary btn-sm" type="button">Go!</button>
</span>
</div>
<table id="updatesets" class="display table-condensed">
<thead>
<tr>
<th>Updateset</th>
<th>Action</th>
</tr>
</thead>
</table>
<span style="font-size:8pt">
<a class="popuplinks" id='btnnewupdateset' href='' target="_blank">New updateset...</a>
<a class="popuplinks" id='btnopenupdatesets' target="_blank">Update Sets - In Progress</a>
</span>
</div>
<div class="tab-pane" id="tabupdates">
<div class="input-group">
<input type="search" id="tbxupdates" name="tbxupdates" class="form-control form-control-sm sync" placeholder="Search in your last 20 updates...">
<span class="input-group-append">
<button class="btn btn-outline-secondary btn-sm" type="button">Go!</button>
</span>
</div>
<table id="updts" class="display table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Updated</th>
<th>Updateset</th>
<th>Action</th>
</tr>
</thead>
</table>
</div>
<div class="tab-pane" id="tabnodes">
<div class="input-group">
<input type="search" id="tbxnodes" name="tbxnodes" class="form-control form-control-sm" placeholder="Search Instance Nodes...">
<span class="input-group-append">
<button id="btnrefreshnodes" class="btn btn-outline-secondary btn-sm" type="button">Refresh</button>
</span>
</div>
<table id="instancenodes" class="display table-condensed">
<thead>
<tr>
<th>Node</th>
<th>Full name</th>
<th>Action</th>
</tr>
</thead>
</table>
</div>
<div class="tab-pane" id="tabtables">
<div class="input-group">
<input type="search" id="tbxtables" name="tbxtables" class="form-control form-control-sm sync" placeholder="Search tables...">
<span class="input-group-append">
<button id='btnrefreshtables' class="btn btn-outline-secondary btn-sm" title="Force refresh of the ServiceNow tables (API Call)"
type="button">Refresh</button>
</span>
</div>
<table id="tbls" class="display table-condensed">
<thead>
<tr>
<th>Label</th>
<th>Table</th>
<th>Action</th>
</tr>
</thead>
</table>
<!--<a href='/snutils.html' target='_blank' >Open this table list in new tab.</a>-->
</div>
<div class="tab-pane" id="tabdataexplore">
<div class="input-group">
<input type="search" id="tbxdataexplore" name="tbxdataexplore" class="form-control form-control-sm sync" placeholder="Search data...">
<span class="input-group-append">
<button id='btnrefreshdataexplore' class="btn btn-outline-secondary btn-sm" title="Refresh data" type="button">Refresh</button>
</span>
</div>
<table id="dataexplore" class="display table-condensed" style="width:100%; table-layout: fixed;word-wrap:break-word;">
<thead>
<tr>
<th>Label</th>
<th>Name</th>
<th>Type</th>
<th>Value</th>
<th>Display Value</th>
</tr>
</thead>
</table>
</div>
<div class="tab-pane" id="tabuser">
<div class="input-group">
<input type="search" id="tbxname" name="tbxname" class="form-control form-control-sm" placeholder="Search by username...">
<span class="input-group-append">
<button id='btnGetUser' class="btn btn-outline-secondary btn-sm" type="button">Go!</button>
</span>
</div>
<div id="rspns"></div>
</div>
<div class="tab-pane" id="tabcodesearch">
<div class="input-group">
<input type="search" id="tbcs" name="tbcs" class="form-control form-control-sm" placeholder="Search globally...">
<span class="input-group-append">
<button id='btnCodeSearch' class="btn btn-outline-secondary btn-sm" type="button">Go!</button>
</span>
</div>
</div>
<div class="tab-pane" id="tabgr">
<div class="input-group">
<input id="tbxgrname" name="tbxgrname" class="form-control form-control-sm" placeholder="Change default gr variable name...">
<span class="input-group-append">
<button id='btnSetGRName' class="btn btn-outline-secondary btn-sm" type="button">Create GlideRecord Template.</button>
</span>
</div>
<div class="form-group">
<label for="tbxgrtemplate">Template for fields: ({0} = variable like gr, {1} = field name like sys_created_on)</label>
<select class="form-control form-control-sm" name="tbxgrtemplate" id="tbxgrtemplate">
<option>gs.info('{1}: ' + {0}.getValue('{1}'));</option>
<option>{0}.getValue('{1}');</option>
<option>{0}.setValue('{1}','');</option>
<option>gs.addInfoMessage('{1}: ' + {0}.{1});</option>
<option>{0}.{1}</option>
<option>{0}.{1} = '';</option>
<option value=''>- none -</option>
</select>
</div>
<textarea class="form-control form-control-sm" autocomplete="off" autocapitalize="off" spellcheck="false" style="font-family: Consolas, Lucida Console, monospace; font-size:10pt; height:290px; margin-top:20px; margin-right:4px;"
id="txtgrquery"></textarea>
<br />
</div>
<div class="tab-pane" id="tabrest">
<textarea class="form-control form-control-sm" autocomplete="off" autocapitalize="off" spellcheck="false" style="font-family: Consolas, Lucida Console, monospace; font-size:10pt; height:290px; margin-top:20px; margin-right:4px;"
id="txtrest"></textarea>
<br />
</div>
<div class="tab-pane" id="tabscript">
<div class="col-12" id='sciptcontainerdiv'>
<p>Select
<span id='scripttable' style='font-weight:bold'></span> field(s) to edit localy (existing files will be overwritten)</p>
<div class="col-6" id='scriptform'>
</div>
<div class="col-6">
<br />
<button id='btncreatefiles' type="button" class="btn btn-primary btn-sm">Create Files</button>
<span id='scriptmessage'></span>
</div>
</div>
</div>
<div class="tab-pane active" id="tababout">
<h4>ServiceNow Utils</h4>
Developed by
<a class="popuplinks" href="http://arnoudkooi.com" target="_blank">arnoudkooi.com</a>
<br />
<br /> Click below to watch video's explaining features:
<br />
<a class="popuplinks" target="_blank" href="https://www.youtube.com/watch?v=VMcjzmnDzP4">
<img src="/images/basics.png" alt="basics" style="width:175px" title="Watch basics video on YouTube" />
</a>
<a class="popuplinks" target="_blank" href="https://www.youtube.com/watch?v=2ZoubJMePD8">
<img src="/images/advanced.png" alt="advanced" style="width:175px" title="Watch advanced video on YouTube" />
</a>
<a class="popuplinks" target="_blank" href="https://www.youtube.com/watch?v=KHMH0weFTao">
<img src="/images/4-2018.png" alt="updates" style="width:175px" title="Watch April 2018 updates video on YouTube" />
</a>
<br />
Check my <a class="popuplinks" href="https://www.youtube.com/channel/UCtr-9_HAEAPmcDRQSyKNzxg/videos" target="_blank">YouTube Channel</a> for the latest updates.
<br /><br /> New features:
<ul>
<li>
Support for studio.
</li>
<li>
Context menu to insert code snippets, or open usefull links, like cancel transactions and show versions.
</li>
<li>
Node list and switch for admins.
</li>
<li>
Updated usability, look and feel.
</li>
<li>
Rename pasted image.
</li>
<li>
Doubleclick in breadcrumb area of list to view/edit encodedquery.
</li>
</ul>
Sourcecode is available on
<a class="popuplinks" href="https://github.com/arnoudkooi/ServiceNow-Utils" target="_blank">GitHub</a> for review purposes. (Redistribution not allowed)
<br /> Please connect with me, if you have feedback or feature requests, or good snippets to integrate.
<div id="livemessage"></div>
</div>
</div>
</form>
</div>
</body>
</html>