-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpanel.html
executable file
·606 lines (530 loc) · 34.3 KB
/
panel.html
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
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
<!--
~ #%L
~ AEM Chrome Plug-in
~ %%
~ Copyright (C) 2016 Adobe
~ %%
~ 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.
~ #L%
-->
<html ng-app="aem-chrome-plugin-app">
<head>
<link rel="stylesheet" type="text/css" href="assets/stylesheets/panel.css">
<link rel="stylesheet" type="text/css" href="assets/stylesheets/common.css">
<link rel="stylesheet" type="text/css" href="assets/stylesheets/tracer-plugin/tracer.css">
<link rel="stylesheet" type="text/css" href="assets/stylesheets/form-plugin/afCommon.css">
<link rel="stylesheet" type="text/css" href="assets/stylesheets/form-plugin/afAuthoring.css">
<link rel="stylesheet" type="text/css" href="assets/stylesheets/form-plugin/afRuntime.css">
<script src="vendor/assets/javascripts/jquery-2.2.0.min.js"></script>
<script src="vendor/assets/javascripts/underscore-min.js"></script>
<!-- Adaptive Form Plugin -->
<script src="assets/javascripts/form-plugin/namespace.js"></script>
<script src="assets/javascripts/form-plugin/init.js"></script>
<script src="assets/javascripts/form-plugin/authoring/authorUtils.js"></script>
<script src="assets/javascripts/form-plugin/runtime/debugUtils.js"></script>
<script src="assets/javascripts/form-plugin/runtime/bridgeUtils.js"></script>
<script src="assets/javascripts/form-plugin/runtime/bridgeApiList.js"></script>
<script src="assets/javascripts/form-plugin/runtime/logger.js"></script>
<script src="assets/javascripts/form-plugin/panel.js"></script>
<!-- Tracer Plugin -->
<script src="vendor/assets/javascripts/jquery-ui-1.9.2.tabs.min.js"></script>
<script src="vendor/assets/javascripts/stupidtable.min.js"></script>
<script src="vendor/assets/javascripts/URI.min.js"></script>
<script src="vendor/assets/javascripts/angular.min.js"></script>
<script src="assets/javascripts/tracer-plugin/helpers/tracer-log-list.js"></script>
<script src="assets/javascripts/tracer-plugin/app.js"></script>
<script src="assets/javascripts/tracer-plugin/filters/remove-host-filter.js"></script>
<script src="assets/javascripts/tracer-plugin/filters/log-blacklist-filter.js"></script>
<script src="assets/javascripts/tracer-plugin/filters/query-blacklist-filter.js"></script>
<script src="assets/javascripts/tracer-plugin/directives/dividers-directive.js"></script>
<script src="assets/javascripts/tracer-plugin/directives/log-list-directive.js"></script>
<script src="assets/javascripts/tracer-plugin/services/options-service.js"></script>
<script src="assets/javascripts/tracer-plugin/services/requests-service.js"></script>
<script src="assets/javascripts/tracer-plugin/services/communications-service.js"></script>
<script src="assets/javascripts/tracer-plugin/services/download-service.js"></script>
<script src="assets/javascripts/tracer-plugin/services/tracer-set-service.js"></script>
<script src="assets/javascripts/tracer-plugin/controllers/requests-controller.js"></script>
<script src="assets/javascripts/tracer-plugin/controllers/options-controller.js"></script>
</head>
<body class="aem-chrome-plugin" aem-chrome-plugin-panels>
<div>
<div id="aemPluginTab" class="tabbed-pane">
<div class="tabbed-pane-header">
<div class="tabbed-pane-header-contents">
<ul class="aem-plugin-tabs tabbed-pane-header-tabs">
<li class="tabbed-pane-header-tab">
<a href="#tracerPlugin" class="tabbed-pane-header-tab-title">Log Tracer</a>
</li>
<li class="tabbed-pane-header-tab">
<a href="#adaptiveFormsPlugin" class="tabbed-pane-header-tab-title">Adaptive Form</a>
</li>
</ul>
</div>
</div>
<div>
<div class="active" id="tracerPlugin"
ng-controller="RequestsCtrl"
ng-init="init();">
<div class="aem-chrome-plugin-requests-controller split-view"
ng-controller="OptionsCtrl">
<!-- Start Inline Options -->
<div id="mini-options" ng-show="showMiniOptions">
<button class="mini-options--close"
ng-click="showMiniOptions = false">Close</button>
<div>
<input type="checkbox"
id="caller-enabled--checkbox"
ng-checked="getCallerEnabled()"
ng-true-value="true"
ng-true-false="false"
ng-click="toggleCallerEnabled()"/>
<label for="caller-enabled--checkbox"><strong>Include caller in logs</strong> <em>(global setting; "Inherit" in tracer sets use this value)</em></label>
</div>
<div>
<h4>Provided Tracer Sets</h4>
<div class="field-wrapper">
<div class="tracer-set"
ng-repeat="tracerSet in options.providedTracerSets track by $index">
<span class="tracer-set--enabled--wrapper">
<input class="tracer-set--enabled"
type="checkbox" ng-model="tracerSet.enabled" ng-checked="tracerSet.enabled" ng-true-value="true" ng-true-false="false"/>
</span>
<input class="tracer-set--package" type="text" ng-model="tracerSet.package" readonly />
<select class="tracer-set--level" ng-model="tracerSet.level">
<option value="TRACE">TRACE</option>
<option value="DEBUG">DEBUG</option>
<option value="INFO">INFO</option>
<option value="WARN">WARN</option>
<option value="ERROR">ERROR</option>
</select>
<select class="tracer-set--caller" ng-model="tracerSet.caller">
<option value="">Inherit</option>
<option value="true">Include caller</option>
<option value="false">Exclude caller</option>
</select>
</div>
</div>
<h4>Ad-Hoc Tracer Sets</h4>
<div class="field-wrapper">
<div class="tracer-set"
ng-repeat="tracerSet in options.tracerSets track by $index">
<span class="tracer-set--enabled--wrapper">
<input class="tracer-set--enabled"
type="checkbox"
ng-model="tracerSet.enabled"
ng-checked="tracerSet.enabled"
ng-true-value="true"
ng-true-false="false"/>
</span>
<input class="tracer-set--package" type="text" ng-model="tracerSet.package" placeholder="Package"/>
<select class="tracer-set--level" ng-model="tracerSet.level">
<option value="TRACE">TRACE</option>
<option value="DEBUG">DEBUG</option>
<option value="INFO">INFO</option>
<option value="WARN">WARN</option>
<option value="ERROR">ERROR</option>
</select>
<select class="tracer-set--caller" ng-model="tracerSet.caller">
<option value="">Inherit</option>
<option value="true">Include caller</option>
<option value="false">Exclude caller</option>
</select>
<button
class="tracer-set--remove"
ng-click="options.tracerSets.splice($index, 1);
syncOptionRemovalToRequests(tracerSet, activeTracerData.loggerNames)">Remove
</button>
</div>
</div>
<button class="tracer-set--add"
ng-click="options.tracerSets.push({enabled: true, package:'', level:'DEBUG'})">
Add TracerSet
</button>
</div>
</div>
<!-- End Options -->
<div ng-show="!ready"
class="hide-onload error-overlay">
<div class="error-message">
<h1>Attention!</h1>
<p>AEM Chrome Plug-in could not establish a connection to Sling Log Tracer for this Chrome Tab.</p>
<p>Click the button below to (try to) automatically enable Sling Log Tracer.</p>
<!--<button ng-click="checkReadiness(false)">Check this Chrome Tab for Sling Log Tracer Readiness</button>-->
<button class="cta" ng-click="enableSlingTracer()">Enable Sling Log Tracer in AEM</button>
<br/><br/>
<p>If the automatic setup fails, check the web console credentials, host and context in the AEM Chrome Plugin's options, and/or follow the setup instructions at:</p>
<ul style="margin-left: .5rem;">
<li><strong>
<a href="http://adobe-consulting-services.github.io/acs-aem-tools/aem-chrome-plugin/log-tracer/" target="_blank">AEM Chrome Plug-in documentation Web site</a>
</strong></li>
</ul>
<!--
<p>
<br/>
<br/>
<strong>
Ensure AEM Chrome Plug-in is started DOCKED to the Chrome tab that has AEM (with Sling Log Tracer enabled) opened.
</strong>
</p>
-->
</div>
</div>
<div class="split-view-contents split-view-contents-requests">
<div class="data-grid data-grid-requests">
<div class="control-bar">
<span class="control-url-filter">
<input class="control-filter" type="text"
placeholder="URL Filter"
ng-model="controls.urlFilter"/>
</span>
<span class="control-search-filter">
<input class="control-filter" type="text"
placeholder="Search"
ng-model="controls.searchFilter"/>
</span>
<span class="control-max-requests">
{{ requestKeys.length }} / <input type="number"
min="0"
ng-model="controls.maxRequests"/>
</span>
<span class="control-clear">
<input type="button" value="Clear" ng-click="clear()"/>
</span>
<span class="control-reload">
<input type="button" value="Reload" ng-click="reload()"/>
</span>
</div>
<table class="header">
<tr>
<th class="status">Status</th>
<th class="url">URL</th>
<th class="method">Method</th>
<th class="numQueries">Queries</th>
<th class="duration">Resp. Time</th>
</tr>
</table>
<div class="data-container">
<table id="requests">
<tr ng-repeat="request in requests() | filter: {request: {url: controls.searchFilter}} track by $index "
ng-click="setActive(request.key)"
ng-class="getClass(request.key)">
<td class="status">{{ request.response.status }}</td>
<td class="url ellipsis">{{ request.request.url | removeHost }}</td>
<td class="method">{{ request.request.method }}</td>
<td class="numQueries">{{ request.tracerData.queries.length }}</td>
<td class="duration">{{ request.time | number: 0 }}ms</td>
</tr>
<tr class="filler">
<td class="status"></td>
<td class="url"></td>
<td class="method"></td>
<td class="numQueries"></td>
<td class="duration"></td>
</tr>
</table>
</div>
</div>
</div>
<div class="split-view-contents split-view-contents-details">
<div id="vdivider"></div>
<div id="tabs" class="tabbed-pane">
<div id="hdivider"></div>
<div class="request-info">
<button
class="mini-options--button"
ng-click="showMiniOptions = !showMiniOptions">Tracer Sets
</button>
<span ng-hide="activeRequest">
Select a request to see the details
</span>
<span ng-show="activeRequest">
{{ activeRequest.request.method }} {{ activeRequest.request.url | removeHost }}
</span>
</div>
<div class="tabbed-pane-header">
<div class="tabbed-pane-header-contents">
<ul class="tabbed-pane-header-tabs">
<!-- Log Tab -->
<li class="tabbed-pane-header-tab">
<a href="#tab-log" class="tabbed-pane-header-tab-title">Log
<span ng-show="activeTracerData.logs">({{ activeTracerData.logs.length }})</span></a>
</li>
<!-- Request Progress -->
<li class="tabbed-pane-header-tab">
<a href="#tab-request-progress" class="tabbed-pane-header-tab-title">Request Progress
<span ng-show="activeTracerData.requestProgressLogs">({{ activeTracerData.requestProgressLogs.length }})</span></a>
</li>
<!-- Queries Tab -->
<li class="tabbed-pane-header-tab">
<a href="#tab-queries" class="tabbed-pane-header-tab-title">Queries
<span ng-show="activeTracerData.queries">({{ activeTracerData.queries.length }})</span></a>
</li>
<!-- Logger Names -->
<li class="tabbed-pane-header-tab"
ng-show="activeTracerData.loggerNames.length > 0">
<a href="#tab-logger-names" class="tabbed-pane-header-tab-title">Logger Names
<span ng-show="activeTracerData.loggerNames">({{ activeTracerData.loggerNames.length }})</span></a>
</li>
</ul>
</div>
</div>
<div class="tabbed-pane-content data-grid data-grid-details">
<!-- Log Tab Panel -->
<div id="tab-log">
<div class="tab-filter-container">
<div class="tab-filter-wrapper">
<button
class="download-button"
ng-show="notEmpty(activeTracerData.logs)"
ng-click="download(activeTracerData.logs, 'logs')">Download</button>
<input class="tab-filter"
type="text"
placeholder="Search Logs"
ng-model="controls.logFilter"
ng-model-options="{ debounce: { 'default': 500, 'blur': 0 } }"/>
</div>
<div aem-chrome-plugin-log-list
id="log"
class="tracer-log-list"
format="logs"
entries="activeTracerData.logs"
filter="controls.logFilter"
ng-show="notEmpty(activeTracerData.logs)">
</div>
</div>
</div>
<!-- Request Progress Tab Panel -->
<div id="tab-request-progress">
<div class="tab-filter-container">
<div class="tab-filter-wrapper">
<button
class="download-button"
ng-show="notEmpty(activeTracerData.requestProgressLogs)"
ng-click="download(activeTracerData.requestProgressLogs, 'request-progress', 'text/plain')">Download</button>
<input class="tab-filter"
type="text"
placeholder="Search Request Progress"
ng-model="controls.requestProgressFilter"
ng-model-options="{ debounce: { 'default': 500, 'blur': 0 } }"/>
</div>
<div aem-chrome-plugin-log-list
id="request-progress"
format="requestProgress"
class="tracer-log-list"
entries="activeTracerData.requestProgressLogs"
filter="controls.requestProgressFilter"
ng-show="notEmpty(activeTracerData.requestProgressLogs)">
</div>
</div>
</div>
<!-- Queries Tab Panel -->
<div id="tab-queries">
<div class="tab-filter-container">
<div class="tab-filter-wrapper">
<button
class="download-button"
ng-show="notEmpty(activeTracerData.queries)"
ng-click="download(activeTracerData.queries, 'queries')">Download</button>
<input class="tab-filter"
type="text"
placeholder="Search Queries"
ng-model="controls.queryFilter"
ng-model-options="{ debounce: { 'default': 500, 'blur': 0 } }"/>
</div>
<div aem-chrome-plugin-log-list
id="queries"
class="tracer-log-list"
format="queries"
entries="activeTracerData.queries"
filter="controls.queryFilter"
ng-show="notEmpty(activeTracerData.queries)">
</div>
</div>
</div>
<!-- Logger Names Tab Panel -->
<div id="tab-logger-names">
<p><em>
Only packages that have log statements in the execution path for this request display below.
Check boxes to add/remove packages from Tracer Sets.
</em></p>
<ul class="logger-names--list">
<li ng-repeat="loggerName in syncOptionsToRequestLoggerNames(options.tracerSets, activeTracerData.loggerNames) track by $index">
<input type="checkbox"
ng-click="toggleLoggerName(loggerName, options.tracerSets)"
ng-checked="loggerName.enabled"/>
<label ng-click="toggleLoggerName(loggerName, options.tracerSets)">{{ loggerName.package }}</label>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="inactive" id="adaptiveFormsPlugin">
<div class="afPlugin">
<div id="authoring" class="authoring inactive" >
<div>
<button id="reloadAuthoringTab" class="reload-button">Reload</button>
</div>
<div class="tabbingPanel">
<div class="af-tab-panelHeader">
<div>
<ul class="tabLinkList">
<li class="active"><a href="#tab-performance" id="performanceTabPanelHeader">Performance</a></li>
<li><a href="#tab-keyword-error" id="keywordTabPanelHeader">Keyword Errors</a></li>
<li><a href="#tab-bindref-error" id="bindRefTabPanelHeader">BindRef Errors</a></li>
<li><span class="linkDisabled">Logging</span></li>
<li><span class="linkDisabled">Debugger</span></li>
<li><span class="linkDisabled">Guide Bridge Playground</span></li>
</ul>
</div>
</div>
<div class="content-area">
<div id="tab-performance" class="active">
<div>
<div class="legend-text"> Error</div>
<div class="legend-icon"></div>
</div>
<div id="authoringTree"></div>
</div>
<div id="tab-keyword-error" class="inactive">
<div class="keywordError emptyable-container">
<p class="show-on-empty ok">No Keyword errors detected</p>
<div class="hide-on-empty">
<h3>Components with error in Name property:</h3>
<ul id="nameError" class="af-tree-ul"></ul>
</div>
<div class="hide-on-empty">
<h3>Components with error in Title property:</h3>
<ul id="labelError" class="af-tree-ul"></ul>
</div>
</div>
</div>
<div id="tab-bindref-error" class="inactive">
<div class="keywordError emptyable-container">
<p class="show-on-empty ok">No BindRef errors detected</p>
<div class="hide-on-empty">
<h3>Field with incorrect bindRef value:</h3>
<ul id="bindrefErrorList" class="af-tree-ul"></ul>
</div>
<div class="hide-on-empty">
<h3>Fields missing a bindRef property:</h3>
<ul id="noBindrefErrorList" class="af-tree-ul"></ul>
</div>
<div class="hide-on-empty">
<h3>Fields with incorrect minOccur value:</h3>
<ul id="minOccurErrorList" class="af-tree-ul"></ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="runtime" class="runtime inactive" >
<div class="tabbingPanel">
<div class="af-tab-panelHeader">
<div>
<ul class="tabLinkList">
<li><span class="linkDisabled">Performance</span></li>
<li><span class="linkDisabled">Keyword Errors</span></li>
<li><span class="linkDisabled">BindRef Errors</span></li>
<li class="active"><a href="#tab-af-log" id="logTabPanelHeader">Logging</a></li>
<li><a href="#tab-debug" id="debugTabPanelHeader">Debugger</a></li>
<li><a href="#tab-bridge" id="bridgeTabPanelHeader">Guide Bridge Playground</a></li>
</ul>
</div>
</div>
<div class="content-area">
<div id="tab-debug" class="inactive ">
<div>
<div class="runtimeComponentTree"></div>
<div class="debugListing">
<p class="tab-help">Scripts to debug:</p>
<ul id="debugList" class="af-tree-ul"></ul>
</div>
</div>
</div>
<div id="tab-bridge" class="inactive">
<div>
<div class="info">
GuideBridge is bridge API that can communicate with the current Adaptive Form and manipulate or query it's state.
</div>
<div id="bridgeApiList">
<select id="apiListDropdown" class="emphasized-dropdown"></select>
<br/>
<div id="selected-api-info" class="inactive sectionInfo">
<div id="api-description">
<h3><span>DESCRIPTION</span></h3>
<div id="apiDetail"></div>
</div>
<div id="api-parameters">
<h3><span>PARAMETERS</span></h3>
<div id="parameterDescription"></div>
</div>
<div id="api-return-type">
<h3><span>RETURNS</span></h3>
<div id="returnTypeDetail"></div>
</div>
</div>
<div id="parameterInputList" class="inactive sectionInfo">
<h3><span>Enter PARAMETERS</span></h3><br/>
<div id="a" class="parameterInput"></div>
</div>
<div id="parameterExample" class="sectionInfo">
<h3><span>EXAMPLE</span></h3>
<code></code>
</div>
<br/>
<hr/>
<button class="run-button">Run ►</button>
</div>
<div class="apiResult inactive">
<strong>Result:</strong>
<div id="bridgeApiResultValue"></div>
</div>
</div>
</div>
<div id="tab-af-log" class="active">
<div class="warning">
Enabling logs will refresh the page. Open Chrome's Console Tab to see the logs.
</div>
<ul class="af-log-levels">
<li><label>Enable:</label><input type="checkbox" id="enableLog" name="enableLogging" value="logging"/></li>
<li><label>Model:</label><select id="logCategory-xfa" name="xfaCategory"></select></li>
<li><label>View:</label><select id="logCategory-xfaView" name="xfaViewCategory"></select></li>
<li><label>Performance:</label><select id="logCategory-xfaPerf" name="xfaPerfCategory"></select></li>
<li><label>AF:</label><select id="logCategory-aF" name="adaptiveFormCategory"></select></li>
</ul>
<p>
The log configuration is made up of logger category and a corresponding log level. The different categories are Model(Scripting engine-related logs), View(Layout engine-related logs), Performance(Performance-related logs) and Adaptive Form.
</p>
<p>
In the log URL, the log configuration query string parameter is defined as follows: <strong>{a level}-{b level}-{c level}-{d level}</strong>
</p>
<p>
For example: to enable a logger to have the following settings...
<br/>
Model: INFO, Adaptive Form: ALL and OFF for other categories, the value of <strong>window.AF_log_config</strong> should be <strong>a4-b0-c0-d7</strong>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>