Skip to content

Commit 30a4e9e

Browse files
author
Mike Reiche
authored
Merge pull request #82 from telekom/refactoring/virtual-log-view
Refactoring/virtual log view
2 parents 4e8bccc + 676d7b9 commit 30a4e9e

File tree

22 files changed

+224
-113
lines changed

22 files changed

+224
-113
lines changed

report-ng/app/package-lock.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

report-ng/app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"aurelia-fetch-client": "^1.8.2",
3939
"aurelia-templating": "^1.10.4",
4040
"aurelia-typed-observable-plugin": "^0.4.2",
41+
"aurelia-ui-virtualization": "^1.0.0-rc2",
4142
"highlight.js": "^10.3.2",
4243
"moment": "^2.29.1",
4344
"moment-duration-format": "^2.3.2",

report-ng/app/src/app.scss

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -61,57 +61,6 @@ html {
6161
overflow: hidden;
6262
}
6363

64-
.code-view {
65-
padding: 0.5em;
66-
font-size: 14px;
67-
background-color: #2b2b2b;
68-
//@extend .secondary;
69-
//border: 2px solid #495561; /*gray-300*/
70-
//border-radius: 2px;
71-
//word-break: break-all;
72-
overflow-x: auto;
73-
color: #c0dee0;
74-
line-height: 1.5em;
75-
font-family: monospace;
76-
word-break: break-all;
77-
78-
a {
79-
color: cornflowerblue;
80-
}
81-
//a:visited {
82-
// color: #c0dee0;
83-
//}
84-
//
85-
//.line {
86-
// padding: 0.3em;
87-
//}
88-
89-
.error {
90-
background: darken($failed, 36)
91-
}
92-
93-
.warn {
94-
background: darken($skipped, 36)
95-
}
96-
97-
.indicator {
98-
width:1rem;
99-
display: inline-block;
100-
}
101-
102-
.number {
103-
width:2rem;
104-
color: #808080 !important;
105-
}
106-
107-
.line {
108-
padding: 0.1rem 0.4rem;
109-
}
110-
.pre {
111-
white-space: pre;
112-
}
113-
}
114-
11564
.clickable {
11665
cursor: pointer;
11766
}

report-ng/app/src/components/classes/classes.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,12 @@ export class Classes extends AbstractViewModel {
167167
uniqueClasses[classStatistic.classContext.fullClassName] = true;
168168
uniqueStatuses[methodDetails.methodContext.resultStatus] = true;
169169
this._filteredMethodDetails.push(methodDetails);
170-
})
170+
});
171+
171172
});
172173

174+
175+
173176
// Sort by method name
174177
//this._filteredMethodDetails = this._filteredMethodDetails.sort((a, b) => a.methodContext.contextValues.name.localeCompare(b.methodContext.contextValues.name));
175178
// Sort by run index
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*!
2+
* Testerra
3+
*
4+
* (C) 2021, Mike Reiche, T-Systems Multimedia Solutions GmbH, Deutsche Telekom AG
5+
*
6+
* Deutsche Telekom AG and all other contributors /
7+
* copyright owners license this file to you under the Apache
8+
* License, Version 2.0 (the "License"); you may not use this
9+
* file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing,
15+
* software distributed under the License is distributed on an
16+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
* KIND, either express or implied. See the License for the
18+
* specific language governing permissions and limitations
19+
* under the License.
20+
*/
21+
22+
@import "styles/statuses";
23+
24+
.code-view {
25+
padding: 0.5em;
26+
font-size: 14px;
27+
background-color: #2b2b2b;
28+
color: #c0dee0;
29+
line-height: 1.5em;
30+
font-family: monospace;
31+
word-break: break-all;
32+
width: fit-content;
33+
min-width: 100%;
34+
35+
a {
36+
color: cornflowerblue;
37+
}
38+
//a:visited {
39+
// color: #c0dee0;
40+
//}
41+
//
42+
//.line {
43+
// padding: 0.3em;
44+
//}
45+
46+
.error {
47+
background: darken($failed, 36)
48+
}
49+
50+
.warn {
51+
background: darken($skipped, 36)
52+
}
53+
54+
.indicator {
55+
width:1rem;
56+
display: inline-block;
57+
}
58+
59+
.number {
60+
width:2rem;
61+
color: #808080 !important;
62+
}
63+
64+
.line {
65+
padding: 2px 4px;
66+
}
67+
}

report-ng/app/src/components/code-view/code-view.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,21 @@ import hljs from "highlight.js/lib/core";
2727
import java from 'highlight.js/lib/languages/java';
2828
import 'highlight.js/styles/darcula.css';
2929
import IScriptSource = data.IScriptSource;
30+
import './code-view.scss'
3031

3132
@autoinject()
3233
export class CodeView {
3334
private _hljs = hljs;
3435

35-
constructor() {
36-
this._hljs.registerLanguage("java", java);
37-
}
38-
39-
@bindable({bindingMode: bindingMode.toView})
36+
@bindable({defaultBindingMode: bindingMode.toView})
4037
source:IScriptSource;
4138

42-
@bindable({bindingMode: bindingMode.toView})
39+
@bindable({defaultBindingMode: bindingMode.toView})
4340
markClass:string = "error";
41+
42+
constructor() {
43+
this._hljs.registerLanguage("java", java);
44+
}
4445
//
4546
// sourceChanged() {
4647
// console.log(this.source);

report-ng/app/src/components/dashboard/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<require from="../test-duration-card/test-duration-card"></require>
2424
<require from="../test-results-card/test-results-card"></require>
2525
<require from="../test-classes-card/test-classes-card"></require>
26-
26+
<mdc-linear-progress if.bind="_loading"></mdc-linear-progress>
2727
<mdc-layout-grid>
2828
<mdc-layout-grid-inner>
2929
<mdc-layout-grid-cell span="3">

report-ng/app/src/components/dashboard/dashboard.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export class Dashboard extends AbstractViewModel {
5959
private _breakdownFilter:IFilter;
6060
private _classFilter:IFilter;
6161
private _topFailureAspects:FailureAspectStatistics[];
62+
private _loading = true;
6263

6364
constructor(
6465
private _statusConverter: StatusConverter,
@@ -156,6 +157,8 @@ export class Dashboard extends AbstractViewModel {
156157
}
157158
}
158159
});
160+
161+
this._loading = false;
159162
});
160163
};
161164

report-ng/app/src/components/layout-comparison/layout-comparison.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface ILayoutComparisonContext {
4747

4848
@autoinject
4949
export class LayoutComparison {
50-
@bindable({bindingMode:bindingMode.toView}) context:ILayoutComparisonContext;
50+
@bindable({defaultBindingMode:bindingMode.toView}) context:ILayoutComparisonContext;
5151
private _images:ICompareImages;
5252
private _actualImageElement:HTMLImageElement;
5353
private _expectedImageElement:HTMLImageElement;

report-ng/app/src/components/lazy-image/lazy-image.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ import IFile = data.IFile;
2929
@autoinject()
3030
export class LazyImage {
3131

32-
@bindable({bindingMode: bindingMode.toView})
32+
@bindable({defaultBindingMode: bindingMode.toView})
3333
fileId:string;
3434

35-
@bindable({bindingMode: bindingMode.toView})
35+
@bindable({defaultBindingMode: bindingMode.toView})
3636
class:string;
3737

3838
private _file:IFile;

0 commit comments

Comments
 (0)