@@ -6,6 +6,7 @@ import '@vaadin/text-field';
66import '@vaadin/text-area' ;
77import '@vaadin/form-layout' ;
88import '@vaadin/progress-bar' ;
9+ import '@vaadin/tooltip' ;
910import '@vaadin/checkbox' ;
1011import '@vaadin/grid' ;
1112import 'qui-alert' ;
@@ -22,9 +23,6 @@ export class QwcFlywayDatasources extends QwcHotReloadElement {
2223 static styles = css `
2324 .button {
2425 cursor: pointer;
25- }
26- .clearIcon {
27- color: var(--lumo-warning-text-color);
2826 }` ;
2927
3028 static properties = {
@@ -87,18 +85,18 @@ export class QwcFlywayDatasources extends QwcHotReloadElement {
8785
8886 _renderMigrationButtons ( ds ) {
8987 if ( ds . hasMigrations ) {
90- return html `${ this . _renderCleanButton ( ds ) }
88+ let colorvar = this . _cleanDisabled ? '--lumo-disabled-text-color' : '--lumo-warning-text-color' ;
89+ return html `< div id =${ ds . name } style ="display: inline-block;">
90+ < vaadin-button theme ="small " @click =${ ( ) => this . _clean ( ds ) } class ="button" ?disabled=${ this . _cleanDisabled } >
91+ < vaadin-icon style ="color: var(${ colorvar } ); " icon ="font-awesome-solid:broom "> </ vaadin-icon > Clean
92+ </ vaadin-button > </ div >
9193 < vaadin-button theme ="small " @click =${ ( ) => this . _migrate ( ds ) } class ="button">
9294 < vaadin-icon icon ="font-awesome-solid:arrow-right-arrow-left "> </ vaadin-icon > Migrate
93- </ vaadin-button > ` ;
94- }
95- }
96-
97- _renderCleanButton ( ds ) {
98- if ( ! this . _cleanDisabled ) {
99- return html `< vaadin-button theme ="small " @click =${ ( ) => this . _clean ( ds ) } class ="button">
100- < vaadin-icon class ="clearIcon " icon ="font-awesome-solid:broom "> </ vaadin-icon > Clean
101- </ vaadin-button > ` ;
95+ </ vaadin-button >
96+ ${ this . _cleanDisabled
97+ ? html `< vaadin-tooltip for ="${ ds . name } " text ="Flyway clean has been disabled via quarkus.flyway.clean-disabled=true "> </ vaadin-tooltip > `
98+ : null }
99+ ` ;
102100 }
103101 }
104102
0 commit comments