@@ -6,6 +6,7 @@ import '@vaadin/text-field';
6
6
import '@vaadin/text-area' ;
7
7
import '@vaadin/form-layout' ;
8
8
import '@vaadin/progress-bar' ;
9
+ import '@vaadin/tooltip' ;
9
10
import '@vaadin/checkbox' ;
10
11
import '@vaadin/grid' ;
11
12
import 'qui-alert' ;
@@ -22,9 +23,6 @@ export class QwcFlywayDatasources extends QwcHotReloadElement {
22
23
static styles = css `
23
24
.button {
24
25
cursor: pointer;
25
- }
26
- .clearIcon {
27
- color: var(--lumo-warning-text-color);
28
26
}` ;
29
27
30
28
static properties = {
@@ -87,18 +85,18 @@ export class QwcFlywayDatasources extends QwcHotReloadElement {
87
85
88
86
_renderMigrationButtons ( ds ) {
89
87
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 >
91
93
< vaadin-button theme ="small " @click =${ ( ) => this . _migrate ( ds ) } class ="button">
92
94
< 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
+ ` ;
102
100
}
103
101
}
104
102
0 commit comments