Skip to content

Commit

Permalink
Add trace visualization
Browse files Browse the repository at this point in the history
This is the first prototype implementation of textual trace
visualization. All of the code (including the schema) is highly
experimental and will be reworked in the future.
  • Loading branch information
mederly committed Mar 27, 2020
1 parent 66048c5 commit ec97183
Show file tree
Hide file tree
Showing 40 changed files with 3,641 additions and 3 deletions.
Expand Up @@ -26,9 +26,11 @@
*/
public class DropDownChoicePanel<T> extends InputPanel {

private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
private static final String ID_INPUT = "input";

private boolean sortChoices = true;

public DropDownChoicePanel(String id, IModel<T> model, IModel<? extends List<? extends T>> choices) {
this(id, model, choices, false);
}
Expand Down Expand Up @@ -67,7 +69,11 @@ protected String getNullValidDisplayValue() {
@Override
public IModel<? extends List<? extends T>> getChoicesModel() {
IModel<? extends List<? extends T>> choices = super.getChoicesModel();
return Model.ofList(WebComponentUtil.sortDropDownChoices(choices, renderer));
if (sortChoices) {
return Model.ofList(WebComponentUtil.sortDropDownChoices(choices, renderer));
} else {
return choices;
}
}

@Override
Expand Down Expand Up @@ -102,4 +108,12 @@ public IModel<T> getModel() {
protected String getNullValidDisplayValue() {
return getString("DropDownChoicePanel.notDefined");
}

public boolean isSortChoices() {
return sortChoices;
}

public void setSortChoices(boolean sortChoices) {
this.sortChoices = sortChoices;
}
}
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2020 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
-->

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
<body>
<wicket:extend>
<form wicket:id="mainForm" class="form-inline" role="form">

<div class="container-fluid">

<div class="row">
<div class="col-md-6">
<div class="form-group" style="margin-bottom: 5px; width:100%">
<label for="clockworkExecution" class="col-xs-3"><wicket:message key="PageTraceView.clockworkExecution"/></label>
<div id="clockworkExecution" wicket:id="clockworkExecution"></div>
</div>
<div class="form-group" style="margin-bottom: 5px; width:100%">
<label for="clockworkClick" class="col-xs-3"><wicket:message key="PageTraceView.clockworkClick"/></label>
<div id="clockworkClick" wicket:id="clockworkClick"></div>
</div>
<div class="form-group" style="margin-bottom: 5px; width:100%">
<label for="mappingEvaluation" class="col-xs-3"><wicket:message key="PageTraceView.mappingEvaluation"/></label>
<div id="mappingEvaluation" wicket:id="mappingEvaluation"></div>
</div>
<div class="form-group" style="margin-bottom: 5px; width:100%">
<label for="focusLoad" class="col-xs-3"><wicket:message key="PageTraceView.focusLoad"/></label>
<div id="focusLoad" wicket:id="focusLoad"></div>
</div>
<div class="form-group" style="margin-bottom: 5px; width:100%">
<label for="projectionLoad" class="col-xs-3"><wicket:message key="PageTraceView.projectionLoad"/></label>
<div id="projectionLoad" wicket:id="projectionLoad"></div>
</div>
<div class="form-group" style="margin-bottom: 5px; width:100%">
<label for="focusChange" class="col-xs-3"><wicket:message key="PageTraceView.focusChange"/></label>
<div id="focusChange" wicket:id="focusChange"></div>
</div>
<div class="form-group" style="margin-bottom: 5px; width:100%">
<label for="projectionChange" class="col-xs-3"><wicket:message key="PageTraceView.projectionChange"/></label>
<div id="projectionChange" wicket:id="projectionChange"></div>
</div>
<div class="form-group" style="margin-bottom: 5px; width:100%">
<label for="others" class="col-xs-3"><wicket:message key="PageTraceView.others"/></label>
<div id="others" wicket:id="others"></div>
</div>
<div class="main-button-bar">
<a class="btn btn-primary" wicket:id="show"/> &nbsp;&nbsp;<wicket:message key="PageTraceView.note"/>
</div>
</div>
<div class="col-md-6">
<label class="col-md-12">
<input wicket:id="showInvocationId" type="checkbox" name="optionsRadios">
<wicket:message key="PageTraceView.showInvocationId"/>
</label>
<label class="col-md-12">
<input wicket:id="showDurationBefore" type="checkbox" name="optionsRadios">
<wicket:message key="PageTraceView.showDurationBefore"/>
</label>
<label class="col-md-12">
<input wicket:id="showDurationAfter" type="checkbox" name="optionsRadios">
<wicket:message key="PageTraceView.showDurationAfter"/>
</label>
<label class="col-md-12">
<input wicket:id="showRepoOpCount" type="checkbox" name="optionsRadios">
<wicket:message key="PageTraceView.showRepoOpCount"/>
</label>
<label class="col-md-12">
<input wicket:id="showConnIdOpCount" type="checkbox" name="optionsRadios">
<wicket:message key="PageTraceView.showConnIdOpCount"/>
</label>
<label class="col-md-12">
<input wicket:id="showRepoOpTime" type="checkbox" name="optionsRadios">
<wicket:message key="PageTraceView.showRepoOpTime"/>
</label>
<label class="col-md-12">
<input wicket:id="showConnIdOpTime" type="checkbox" name="optionsRadios">
<wicket:message key="PageTraceView.showConnIdOpTime"/>
</label>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3 wicket:id="resultLabel"/>
<textarea wicket:id="resultText"></textarea>
<wicket:message key="PageTraceView.forMoreInformation"/>
</div>
</div>
</div>
</form>

</wicket:extend>
</body>
</html>

0 comments on commit ec97183

Please sign in to comment.