Commit 6a0c7b78 by Johannes Edmeier

Revisit liquibase and flyway after changes to the endpoints

parent 7cfce4a0
......@@ -41,8 +41,8 @@
"autoprefixer": "^8.0.0",
"babel-core": "^6.25.0",
"babel-eslint": "^8.2.2",
"babel-jest": "^22.4.0",
"babel-loader": "^7.1.1",
"babel-jest": "^22.4.1",
"babel-loader": "^7.1.3",
"babel-plugin-lodash": "^3.3.2",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
......@@ -55,14 +55,14 @@
"eslint": "^4.18.1",
"eslint-loader": "^1.9.0",
"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",
"file-loader": "^1.1.9",
"glob": "^7.1.2",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^2.30.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^22.4.0",
"jest": "^22.4.2",
"jest-vue": "^0.8.2",
"lodash-webpack-plugin": "^0.11.4",
"node-sass": "^4.7.2",
......@@ -75,7 +75,7 @@
"vue-svg-loader": "^0.5.0",
"vue-template-compiler": "^2.5.13",
"webpack": "^3.11.0",
"webpack-bundle-analyzer": "^2.10.0"
"webpack-bundle-analyzer": "^2.11.0"
},
"browserslist": [
"> 2%",
......
......@@ -24,13 +24,14 @@
This is an administration UI for Spring Boot applications.
</p>
<p>
To monitor applications, they must be registered at this server. This is either done by including
the <a
href="https://codecentric.github.io/spring-boot-admin/@project.version@/#register-clients-via-spring-boot-admin">Spring
Boot Admin Client</a>
or using a <a
href="https://codecentric.github.io/spring-boot-admin/@project.version@/#discover-clients-via-spring-cloud-discovery">Spring
Cloud Discovery Client</a> implementation.
To monitor applications, they must be registered at this server. This is either done by including the
<a href="https://codecentric.github.io/spring-boot-admin/@project.version@/#register-clients-via-spring-boot-admin">
Spring Boot Admin Client
</a>
or using a
<a href="https://codecentric.github.io/spring-boot-admin/@project.version@/#discover-clients-via-spring-cloud-discovery">
Spring Cloud Discovery Client
</a> implementation.
</p>
<p>
If you have any question please consult the
......@@ -93,40 +94,40 @@
</script>
<style lang="scss">
.about-links {
display: flex;
align-items: center;
.about-links {
display: flex;
align-items: center;
& > * {
margin-right: 0.5rem;
}
& > * {
margin-right: 0.5rem;
}
}
$stackoverflow: #f48024;
.button.is-stackoverflow.is-outlined {
background-color: transparent;
border-color: $stackoverflow;
color: $stackoverflow;
$stackoverflow: #f48024;
.button.is-stackoverflow.is-outlined {
background-color: transparent;
border-color: $stackoverflow;
color: $stackoverflow;
&:hover,
&:focus {
background-color: $stackoverflow;
border-color: $stackoverflow;
color: white;
}
&:hover,
&:focus {
background-color: $stackoverflow;
border-color: $stackoverflow;
color: white;
}
}
$gitter: #ed1965;
.button.is-gitter.is-outlined {
background-color: transparent;
border-color: $gitter;
color: $gitter;
$gitter: #ed1965;
.button.is-gitter.is-outlined {
background-color: transparent;
border-color: $gitter;
color: $gitter;
&:hover,
&:focus {
background-color: $gitter;
border-color: $gitter;
color: white;
}
&:hover,
&:focus {
background-color: $gitter;
border-color: $gitter;
color: white;
}
}
</style>
......@@ -26,39 +26,43 @@
<p v-text="error.message"/>
</div>
</div>
<sba-panel v-for="(report, name) in reports" :key="name" :title="name" class="migration">
<table class="table">
<thead>
<tr>
<th>Type</th>
<th>Checksum</th>
<th>Version</th>
<th>Description</th>
<th>Script</th>
<th>State</th>
<th>Installed by</th>
<th>Installed on</th>
<th>Installed rank</th>
<th>Execution Time</th>
</tr>
</thead>
<tbody>
<tr v-for="migration in report.migrations" :key="migration.checksum">
<td v-text="migration.type"/>
<td v-text="migration.checksum"/>
<td v-text="migration.version"/>
<td v-text="migration.description"/>
<td v-text="migration.script"/>
<td><span v-text="migration.state" class="tag"
:class="stateClass(migration.state)"/></td>
<td v-text="migration.installedBy"/>
<td v-text="migration.installedOn"/>
<td v-text="migration.installedRank"/>
<td v-text="`${migration.executionTime}ms`"/>
</tr>
</tbody>
</table>
</sba-panel>
<template v-for="(context, ctxName) in contexts">
<h3 class="title" v-text="ctxName" :key="ctxName"/>
<sba-panel v-for="(report, name) in context.flywayBeans" :key="`${ctxName}-${name}`" :title="name"
class="migration">
<table class="table">
<thead>
<tr>
<th>Type</th>
<th>Checksum</th>
<th>Version</th>
<th>Description</th>
<th>Script</th>
<th>State</th>
<th>Installed by</th>
<th>Installed on</th>
<th>Installed rank</th>
<th>Execution Time</th>
</tr>
</thead>
<tbody>
<tr v-for="migration in report.migrations" :key="migration.checksum">
<td v-text="migration.type"/>
<td v-text="migration.checksum"/>
<td v-text="migration.version"/>
<td v-text="migration.description"/>
<td v-text="migration.script"/>
<td><span v-text="migration.state" class="tag"
:class="stateClass(migration.state)"/></td>
<td v-text="migration.installedBy"/>
<td v-text="migration.installedOn"/>
<td v-text="migration.installedRank"/>
<td v-text="`${migration.executionTime}ms`"/>
</tr>
</tbody>
</table>
</sba-panel>
</template>
</div>
</section>
</template>
......@@ -76,7 +80,7 @@
data: () => ({
hasLoaded: false,
error: null,
reports: []
contexts: null
}),
computed: {},
created() {
......@@ -88,7 +92,7 @@
this.error = null;
try {
const res = await this.instance.fetchFlyway();
this.reports = res.data;
this.contexts = res.data.contexts;
} catch (error) {
console.warn('Fetching flyway reports failed:', 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 @@
<p v-text="error.message"/>
</div>
</div>
<template v-for="(report, name) in reports">
<h4 class="title" v-text="name" :key="name"/>
<sba-panel v-for="changeSet in report.changeSets" :key="`${name}-${changeSet.id}`"
:title="`${changeSet.id}: ${changeSet.description}`" class="change-set">
<change-set :change-set="changeSet"/>
</sba-panel>
<template v-for="(context, ctxName) in contexts">
<h3 class="title" v-text="ctxName" :key="ctxName"/>
<template v-for="(report, name) in context.liquibaseBeans">
<sba-panel :key="`${ctxName}-${name}`" :title="`name`" class="change-set">
<table class="table is-hoverable is-fullwidth">
<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>
</div>
</section>
......@@ -39,7 +95,6 @@
<script>
import Instance from '@/services/instance';
import changeSet from './change-set';
export default {
props: {
......@@ -48,13 +103,11 @@
required: true
}
},
components: {
changeSet
},
data: () => ({
hasLoaded: false,
error: null,
reports: []
contexts: null,
showDetails: {}
}),
computed: {},
created() {
......@@ -66,13 +119,28 @@
this.error = null;
try {
const res = await this.instance.fetchLiquibase();
this.reports = res.data;
this.contexts = res.data.contexts;
} catch (error) {
console.warn('Fetching Liquibase migrations failed:', error);
console.warn('Fetching Liquibase changeSets failed:', error);
this.error = error;
}
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