Skip to content

Commit

Permalink
show parameters in tree
Browse files Browse the repository at this point in the history
  • Loading branch information
sseliverstov committed Jun 15, 2017
1 parent b3c6c64 commit 9107338
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="tree">
{{#if items}}
{{#each items}}
{{> tree-group baseUrl=../baseUrl showGroupInfo=../showGroupInfo tabName=../tabName}}
{{~> tree-group baseUrl=../baseUrl showGroupInfo=../showGroupInfo tabName=../tabName}}
{{/each}}
{{else}}
<div class="{{b 'tree' 'empty'}}">{{t 'component.tree.empty'}}</div>
Expand Down
11 changes: 10 additions & 1 deletion allure-generator/src/main/javascript/components/tree/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@
position: absolute;
}
&__stats {
display: block;
float: right;
white-space: nowrap;
}
&__title {
overflow: hidden;
line-height: 1.2em;
padding: 7px $gap-size 7px 25px;
flex: 1;
display: flex;
cursor: pointer;
border-top: 1px solid #ECEFF1;
position: relative;
Expand All @@ -55,7 +58,13 @@
&__time {
padding: 5px;
}

&__parameters {
color: $text-muted-color;
min-width: 2ch;
&_separator:last-child {
display: none;
}
}
&__children {
display: none;
.node__expanded > & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{{else}}
{{t 'component.tree.unknown'}}
{{/if}}
<div class="tree__strut">&nbsp</div>
<span class="node__stats">
{{statistic-bar statistic tabName}}
</span>
Expand All @@ -23,10 +24,10 @@
</div>
{{/if}}
{{#each children}}
{{> tree-group baseUrl=../baseUrl showGroupInfo=../showGroupInfo tabName=../tabName}}
{{~> tree-group baseUrl=../baseUrl showGroupInfo=../showGroupInfo tabName=../tabName}}
{{/each}}
</div>
</div>
{{else}}
{{> tree-leaf baseUrl=baseUrl}}
{{~> tree-leaf baseUrl=baseUrl}}
{{/if}}
31 changes: 24 additions & 7 deletions allure-generator/src/main/javascript/components/tree/tree-leaf.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
<a class="node node__leaf" href="#{{baseUrl}}/{{uid}}">
<div class="node__title long-line" data-uid="{{uid}}">
<span class="node__anchor">
<div class="node__title" data-uid="{{uid}}">
<div class="node__anchor">
{{allure-icon status 'fa-lg'}}
</span>
</div>
{{#if flaky}}
{{allure-icon 'flaky'}}
{{/if}}
{{name}}
<span class="node__stats">
{{duration time.duration}}
</span>
<div class="node__name">
{{name}}
</div>
{{#if parameters}}

<div class="node__parameters long-line line-ellipsis">
<span>&nbsp</span>
{{#each parameters}}
{{#if value}}
{{value}}
{{~else}}
null
{{~/if~}}
<span class="node__parameters_separator">,</span>
{{/each}}
</div>
{{/if}}
<div class="tree__strut">&nbsp</div>
<div class="node__stats">
{{~duration time.duration~}}
</div>
</div>
</a>

0 comments on commit 9107338

Please # to comment.