@@ -13,6 +13,15 @@ export class ReportTable extends LitElement {
13
13
this . reports = [ ] ;
14
14
}
15
15
16
+ prepareId ( id ) {
17
+ const limit = 25 ;
18
+ if ( id . length <= limit ) {
19
+ return id ;
20
+ } else {
21
+ return id . substring ( 0 , limit ) + "..." ;
22
+ }
23
+ }
24
+
16
25
renderProblemsBadge ( problems ) {
17
26
if ( problems ) {
18
27
return html `< span class ="badge badge-negative "> Yes</ span > ` ;
@@ -26,22 +35,22 @@ export class ReportTable extends LitElement {
26
35
< table >
27
36
< tr >
28
37
< th > ID</ th >
29
- < th > Organization</ th >
30
- < th > Domain</ th >
38
+ < th class =" xs-hidden " > Organization</ th >
39
+ < th class =" sm-hidden " > Domain</ th >
31
40
< th class ="help " title ="Reports that indicate possible problems "> Problems</ th >
32
- < th > Records</ th >
33
- < th > Begin</ th >
34
- < th > End</ th >
41
+ < th class =" sm-hidden " > Records</ th >
42
+ < th class =" md-hidden " > Begin</ th >
43
+ < th class =" md-hidden " > End</ th >
35
44
</ tr >
36
45
${ this . reports . length !== 0 ? this . reports . map ( ( report ) =>
37
46
html `< tr >
38
- < td > < a href ="#/reports/ ${ report . hash } "> ${ report . id } </ a > </ td >
39
- < td > < a href ="#/reports?org= ${ encodeURIComponent ( report . org ) } "> ${ report . org } </ a > </ td >
40
- < td > < a href ="#/reports?domain= ${ encodeURIComponent ( report . domain ) } "> ${ report . domain } </ a > </ td >
47
+ < td > < a href ="#/reports/ ${ report . hash } " title =" ${ report . id } " > ${ this . prepareId ( report . id ) } </ a > </ td >
48
+ < td class =" xs-hidden " > < a href ="#/reports?org= ${ encodeURIComponent ( report . org ) } "> ${ report . org } </ a > </ td >
49
+ < td class =" sm-hidden " > < a href ="#/reports?domain= ${ encodeURIComponent ( report . domain ) } "> ${ report . domain } </ a > </ td >
41
50
< td > ${ this . renderProblemsBadge ( report . flagged ) } </ td >
42
- < td > ${ report . records } </ td >
43
- < td > ${ new Date ( report . date_begin * 1000 ) . toLocaleString ( ) } </ td >
44
- < td > ${ new Date ( report . date_end * 1000 ) . toLocaleString ( ) } </ td >
51
+ < td class =" sm-hidden " > ${ report . records } </ td >
52
+ < td class =" md-hidden " > ${ new Date ( report . date_begin * 1000 ) . toLocaleString ( ) } </ td >
53
+ < td class =" md-hidden " > ${ new Date ( report . date_end * 1000 ) . toLocaleString ( ) } </ td >
45
54
</ tr > `
46
55
47
56
) : html `< tr >
0 commit comments