Commit 6a0c7b78 by Johannes Edmeier

Revisit liquibase and flyway after changes to the endpoints

parent 7cfce4a0
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
"autoprefixer": "^8.0.0", "autoprefixer": "^8.0.0",
"babel-core": "^6.25.0", "babel-core": "^6.25.0",
"babel-eslint": "^8.2.2", "babel-eslint": "^8.2.2",
"babel-jest": "^22.4.0", "babel-jest": "^22.4.1",
"babel-loader": "^7.1.1", "babel-loader": "^7.1.3",
"babel-plugin-lodash": "^3.3.2", "babel-plugin-lodash": "^3.3.2",
"babel-polyfill": "^6.26.0", "babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1", "babel-preset-env": "^1.6.1",
...@@ -55,14 +55,14 @@ ...@@ -55,14 +55,14 @@
"eslint": "^4.18.1", "eslint": "^4.18.1",
"eslint-loader": "^1.9.0", "eslint-loader": "^1.9.0",
"eslint-plugin-html": "^4.0.2", "eslint-plugin-html": "^4.0.2",
"eslint-plugin-vue": "^4.2.2", "eslint-plugin-vue": "^4.3.0",
"extract-text-webpack-plugin": "^3.0.2", "extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^1.1.9", "file-loader": "^1.1.9",
"glob": "^7.1.2", "glob": "^7.1.2",
"html-loader": "^0.5.5", "html-loader": "^0.5.5",
"html-webpack-plugin": "^2.30.0", "html-webpack-plugin": "^2.30.0",
"identity-obj-proxy": "^3.0.0", "identity-obj-proxy": "^3.0.0",
"jest": "^22.4.0", "jest": "^22.4.2",
"jest-vue": "^0.8.2", "jest-vue": "^0.8.2",
"lodash-webpack-plugin": "^0.11.4", "lodash-webpack-plugin": "^0.11.4",
"node-sass": "^4.7.2", "node-sass": "^4.7.2",
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
"vue-svg-loader": "^0.5.0", "vue-svg-loader": "^0.5.0",
"vue-template-compiler": "^2.5.13", "vue-template-compiler": "^2.5.13",
"webpack": "^3.11.0", "webpack": "^3.11.0",
"webpack-bundle-analyzer": "^2.10.0" "webpack-bundle-analyzer": "^2.11.0"
}, },
"browserslist": [ "browserslist": [
"> 2%", "> 2%",
......
...@@ -24,13 +24,14 @@ ...@@ -24,13 +24,14 @@
This is an administration UI for Spring Boot applications. This is an administration UI for Spring Boot applications.
</p> </p>
<p> <p>
To monitor applications, they must be registered at this server. This is either done by including To monitor applications, they must be registered at this server. This is either done by including the
the <a <a href="https://codecentric.github.io/spring-boot-admin/@project.version@/#register-clients-via-spring-boot-admin">
href="https://codecentric.github.io/spring-boot-admin/@project.version@/#register-clients-via-spring-boot-admin">Spring Spring Boot Admin Client
Boot Admin Client</a> </a>
or using a <a or using a
href="https://codecentric.github.io/spring-boot-admin/@project.version@/#discover-clients-via-spring-cloud-discovery">Spring <a href="https://codecentric.github.io/spring-boot-admin/@project.version@/#discover-clients-via-spring-cloud-discovery">
Cloud Discovery Client</a> implementation. Spring Cloud Discovery Client
</a> implementation.
</p> </p>
<p> <p>
If you have any question please consult the If you have any question please consult the
...@@ -93,40 +94,40 @@ ...@@ -93,40 +94,40 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.about-links { .about-links {
display: flex; display: flex;
align-items: center; align-items: center;
& > * { & > * {
margin-right: 0.5rem; margin-right: 0.5rem;
}
} }
}
$stackoverflow: #f48024; $stackoverflow: #f48024;
.button.is-stackoverflow.is-outlined { .button.is-stackoverflow.is-outlined {
background-color: transparent; background-color: transparent;
border-color: $stackoverflow; border-color: $stackoverflow;
color: $stackoverflow; color: $stackoverflow;
&:hover, &:hover,
&:focus { &:focus {
background-color: $stackoverflow; background-color: $stackoverflow;
border-color: $stackoverflow; border-color: $stackoverflow;
color: white; color: white;
}
} }
}
$gitter: #ed1965; $gitter: #ed1965;
.button.is-gitter.is-outlined { .button.is-gitter.is-outlined {
background-color: transparent; background-color: transparent;
border-color: $gitter; border-color: $gitter;
color: $gitter; color: $gitter;
&:hover, &:hover,
&:focus { &:focus {
background-color: $gitter; background-color: $gitter;
border-color: $gitter; border-color: $gitter;
color: white; color: white;
}
} }
}
</style> </style>
...@@ -26,39 +26,43 @@ ...@@ -26,39 +26,43 @@
<p v-text="error.message"/> <p v-text="error.message"/>
</div> </div>
</div> </div>
<sba-panel v-for="(report, name) in reports" :key="name" :title="name" class="migration"> <template v-for="(context, ctxName) in contexts">
<table class="table"> <h3 class="title" v-text="ctxName" :key="ctxName"/>
<thead> <sba-panel v-for="(report, name) in context.flywayBeans" :key="`${ctxName}-${name}`" :title="name"
<tr> class="migration">
<th>Type</th> <table class="table">
<th>Checksum</th> <thead>
<th>Version</th> <tr>
<th>Description</th> <th>Type</th>
<th>Script</th> <th>Checksum</th>
<th>State</th> <th>Version</th>
<th>Installed by</th> <th>Description</th>
<th>Installed on</th> <th>Script</th>
<th>Installed rank</th> <th>State</th>
<th>Execution Time</th> <th>Installed by</th>
</tr> <th>Installed on</th>
</thead> <th>Installed rank</th>
<tbody> <th>Execution Time</th>
<tr v-for="migration in report.migrations" :key="migration.checksum"> </tr>
<td v-text="migration.type"/> </thead>
<td v-text="migration.checksum"/> <tbody>
<td v-text="migration.version"/> <tr v-for="migration in report.migrations" :key="migration.checksum">
<td v-text="migration.description"/> <td v-text="migration.type"/>
<td v-text="migration.script"/> <td v-text="migration.checksum"/>
<td><span v-text="migration.state" class="tag" <td v-text="migration.version"/>
:class="stateClass(migration.state)"/></td> <td v-text="migration.description"/>
<td v-text="migration.installedBy"/> <td v-text="migration.script"/>
<td v-text="migration.installedOn"/> <td><span v-text="migration.state" class="tag"
<td v-text="migration.installedRank"/> :class="stateClass(migration.state)"/></td>
<td v-text="`${migration.executionTime}ms`"/> <td v-text="migration.installedBy"/>
</tr> <td v-text="migration.installedOn"/>
</tbody> <td v-text="migration.installedRank"/>
</table> <td v-text="`${migration.executionTime}ms`"/>
</sba-panel> </tr>
</tbody>
</table>
</sba-panel>
</template>
</div> </div>
</section> </section>
</template> </template>
...@@ -76,7 +80,7 @@ ...@@ -76,7 +80,7 @@
data: () => ({ data: () => ({
hasLoaded: false, hasLoaded: false,
error: null, error: null,
reports: [] contexts: null
}), }),
computed: {}, computed: {},
created() { created() {
...@@ -88,7 +92,7 @@ ...@@ -88,7 +92,7 @@
this.error = null; this.error = null;
try { try {
const res = await this.instance.fetchFlyway(); const res = await this.instance.fetchFlyway();
this.reports = res.data; this.contexts = res.data.contexts;
} catch (error) { } catch (error) {
console.warn('Fetching flyway reports failed:', error); console.warn('Fetching flyway reports failed:', error);
this.error = error; this.error = error;
......
<!--
- Copyright 2014-2018 the original author or authors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-->
<template>
<table class="table">
<tr>
<td>Id</td>
<td v-text="changeSet.id"/>
</tr>
<tr>
<td>Author</td>
<td v-text="changeSet.author"/>
</tr>
<tr>
<td>Change log</td>
<td v-text="changeSet.changeLog"/>
</tr>
<tr>
<td>Description</td>
<td v-text="changeSet.description"/>
</tr>
<tr>
<td>Execution</td>
<td>
<span v-text="changeSet.execType" class="tag"
:class="execClass"/>
</td>
</tr>
<tr>
<td>Execution Date</td>
<td v-text="changeSet.dateExecuted"/>
</tr>
<tr>
<td>Execution Order</td>
<td v-text="changeSet.orderExecuted"/>
</tr>
<tr>
<td>Checksum</td>
<td v-text="changeSet.checksum"/>
</tr>
<tr v-if="changeSet.comments">
<td>Comments</td>
<td v-text="changeSet.comments"/>
</tr>
<tr>
<td>Deployment Id</td>
<td v-text="changeSet.deploymentId"/>
</tr>
<tr v-if="changeSet.tag">
<td>Tag</td>
<td v-text="changeSet.tag"/>
</tr>
<tr v-if="changeSet.contexts && changeSet.contexts.length > 0">
<td>Contexts</td>
<td v-text="changeSet.contexts"/>
</tr>
<tr v-if="changeSet.labels && changeSet.labels.length > 0">
<td>Labels</td>
<td>
<span v-for="label in changeSet.labels" :key="label" class="tag is-info" v-text="label"/>
</td>
</tr>
</table>
</template>
<script>
export default {
props: {
changeSet: {
type: Object,
required: true
}
},
computed: {
execClass() {
switch (this.changeSet.execType) {
case 'EXECUTED':
return 'is-success';
case 'FAILED':
return 'is-danger';
case 'SKIPPED':
return 'is-light';
case 'RERAN':
case 'MARK_RAN':
return 'is-warning';
default:
return 'is-info';
}
}
}
}
</script>
...@@ -26,12 +26,68 @@ ...@@ -26,12 +26,68 @@
<p v-text="error.message"/> <p v-text="error.message"/>
</div> </div>
</div> </div>
<template v-for="(report, name) in reports"> <template v-for="(context, ctxName) in contexts">
<h4 class="title" v-text="name" :key="name"/> <h3 class="title" v-text="ctxName" :key="ctxName"/>
<sba-panel v-for="changeSet in report.changeSets" :key="`${name}-${changeSet.id}`" <template v-for="(report, name) in context.liquibaseBeans">
:title="`${changeSet.id}: ${changeSet.description}`" class="change-set"> <sba-panel :key="`${ctxName}-${name}`" :title="`name`" class="change-set">
<change-set :change-set="changeSet"/> <table class="table is-hoverable is-fullwidth">
</sba-panel> <thead>
<tr>
<th>Id</th>
<th>Execution</th>
<th>Description</th>
<th>Tag</th>
<th>Contexts</th>
<th>Labels</th>
</tr>
</thead>
<tbody>
<template v-for="changeSet in report.changeSets">
<tr :key="`${ctxName}-${name}-${changeSet.id}`" class="is-selectable"
@click="showDetails[changeSet.checksum] ? $delete(showDetails, changeSet.checksum) : $set(showDetails, changeSet.checksum, true)">
<td v-text="changeSet.id"/>
<td>
<span v-text="changeSet.execType" class="tag" :class="execClass(execType)"/>
</td>
<td v-text="changeSet.description"/>
<td v-text="changeSet.tag"/>
<td v-text="changeSet.contexts.join(', ')"/>
<td>
<span v-for="label in changeSet.labels" :key="`${ctxName}-${name}-${changeSet.id}-${label}`"
class="tag is-info" v-text="label"/>
</td>
</tr>
<tr v-if="showDetails[changeSet.checksum]" :key="`${ctxName}-${name}-${changeSet.id}-details`">
<td colspan="6">
<table class="table is-fullwidth">
<tr>
<th>Changelog</th>
<td colspan="3" v-text="changeSet.changeLog"/>
<th>Author</th>
<td v-text="changeSet.author"/>
</tr>
<tr>
<th>Checksum</th>
<td v-text="changeSet.checksum"/>
<th>Comments</th>
<td colspan="3" v-text="changeSet.comments"/>
</tr>
<tr>
<th>Execution Order</th>
<td v-text="changeSet.orderExecuted"/>
<th>ExecutionDate</th>
<td v-text="changeSet.dateExecuted"/>
<th>DeploymentId</th>
<td v-text="changeSet.deploymentId"/>
</tr>
</table>
</td>
</tr>
</template>
</tbody>
</table>
</sba-panel>
</template>
</template> </template>
</div> </div>
</section> </section>
...@@ -39,7 +95,6 @@ ...@@ -39,7 +95,6 @@
<script> <script>
import Instance from '@/services/instance'; import Instance from '@/services/instance';
import changeSet from './change-set';
export default { export default {
props: { props: {
...@@ -48,13 +103,11 @@ ...@@ -48,13 +103,11 @@
required: true required: true
} }
}, },
components: {
changeSet
},
data: () => ({ data: () => ({
hasLoaded: false, hasLoaded: false,
error: null, error: null,
reports: [] contexts: null,
showDetails: {}
}), }),
computed: {}, computed: {},
created() { created() {
...@@ -66,13 +119,28 @@ ...@@ -66,13 +119,28 @@
this.error = null; this.error = null;
try { try {
const res = await this.instance.fetchLiquibase(); const res = await this.instance.fetchLiquibase();
this.reports = res.data; this.contexts = res.data.contexts;
} catch (error) { } catch (error) {
console.warn('Fetching Liquibase migrations failed:', error); console.warn('Fetching Liquibase changeSets failed:', error);
this.error = error; this.error = error;
} }
this.hasLoaded = true; this.hasLoaded = true;
} }
},
execClass(execType) {
switch (execType) {
case 'EXECUTED':
return 'is-success';
case 'FAILED':
return 'is-danger';
case 'SKIPPED':
return 'is-light';
case 'RERAN':
case 'MARK_RAN':
return 'is-warning';
default:
return 'is-info';
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment