11import { QwcHotReloadElement , html , css } from 'qwc-hot-reload-element' ;
2+ import { StorageController } from 'storage-controller' ;
23import { JsonRpc } from 'jsonrpc' ;
34import '@vaadin/vertical-layout' ;
45import '@vaadin/icon' ;
@@ -22,6 +23,7 @@ ring.register();
2223 */
2324export class QwcContinuousTesting extends QwcHotReloadElement {
2425 jsonRpc = new JsonRpc ( this , false ) ;
26+ storageControl = new StorageController ( this , true ) ;
2527
2628 static styles = css `
2729 :host {
@@ -91,7 +93,7 @@ export class QwcContinuousTesting extends QwcHotReloadElement {
9193 this . _detailsOpenedItem = [ ] ;
9294 this . _chartTitles = [ "passed" , "failed" , "skipped" ] ;
9395 this . _chartColors = [ '--lumo-success-text-color' , '--lumo-error-text-color' , '--lumo-contrast-70pct' ] ;
94- this . _displayTags = true ;
96+ this . _displayTags = this . storageControl . get ( "displayTags" ) ;
9597 }
9698
9799 set _tests ( value ) {
@@ -269,12 +271,12 @@ export class QwcContinuousTesting extends QwcHotReloadElement {
269271 >
270272 ${
271273 this . _displayTags && this . _hasTestResultWithTags
272- ? html `< vaadin-grid-sort-column path ="tags " header ="Tags " ${ columnBodyRenderer ( ( prop ) => this . _tagsRenderer ( prop ) , [ ] ) } > </ vaadin-grid-sort-column > `
274+ ? html `< vaadin-grid-sort-column path ="tags " header ="Tags " ${ columnBodyRenderer ( ( prop ) => this . _tagsRenderer ( prop ) , [ ] ) } resizable width =" 40px " > </ vaadin-grid-sort-column > `
273275 : ''
274276 }
275- < vaadin-grid-sort-column path ="testClass " header ="Test Class " ${ columnBodyRenderer ( ( prop ) => this . _testRenderer ( prop ) , [ ] ) } > </ vaadin-grid-sort-column >
276- < vaadin-grid-sort-column path ="displayName " header ="Name " ${ columnBodyRenderer ( ( prop ) => this . _nameRenderer ( prop ) , [ ] ) } > </ vaadin-grid-sort-column >
277- < vaadin-grid-sort-column path ="time " header ="Time " ${ columnBodyRenderer ( ( prop ) => this . _timeRenderer ( prop ) , [ ] ) } > > </ vaadin-grid-sort-column >
277+ < vaadin-grid-sort-column path ="testClass " header ="Test Class " ${ columnBodyRenderer ( ( prop ) => this . _testRenderer ( prop ) , [ ] ) } resizable auto-width > </ vaadin-grid-sort-column >
278+ < vaadin-grid-sort-column path ="displayName " header ="Name " ${ columnBodyRenderer ( ( prop ) => this . _nameRenderer ( prop ) , [ ] ) } resizable auto-width > </ vaadin-grid-sort-column >
279+ < vaadin-grid-sort-column path ="time " header ="Time " ${ columnBodyRenderer ( ( prop ) => this . _timeRenderer ( prop ) , [ ] ) } width =" 10px " flexGrow = 0 > </ vaadin-grid-sort-column >
278280 </ vaadin-grid > ` ;
279281
280282 } else {
@@ -477,6 +479,7 @@ export class QwcContinuousTesting extends QwcHotReloadElement {
477479
478480 _toggleDisplayTags ( ) {
479481 this . _displayTags = ! this . _displayTags ;
482+ this . storageControl . set ( 'displayTags' , this . _displayTags ) ;
480483 }
481484}
482485customElements . define ( 'qwc-continuous-testing' , QwcContinuousTesting ) ;
0 commit comments