Files
2026-05-25 20:01:37 +07:00

175 lines
6.6 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>One</title>
<link rel="stylesheet" href="../../libs/vendor/css/google-fonts.css">
<link rel="stylesheet" href="../../libs/vendor/css/icomoon-fonts.css">
<link rel="stylesheet" href="../../libs/vendor/css/vuetify.min.css">
</head>
<body>
<div v-cloak id="app">
<v-app id="smartApp" >
<v-card tile elevation="5" color="#85352e" class="pt-2 pb-2 mb-1">
<v-flex class="text-xs-center" xs12>
<h3 style="font-family: 'Days One', sans-serif;color:#FFFFFF">BISONE</h3>
</v-flex>
</v-card>
<v-content
style="max-height: 1000px;background:#fcfcfc!important" >
<v-layout class="align-center pr-2" row>
<v-flex class="text-xs-left mt-2" xs6>
<p class="pl-2 mb-0 font-weight-black">Replication Status</p>
</v-flex>
<v-flex class="text-xs-right mt-2" xs6>
<v-icon @click="reload">autorenew</v-icon>
</v-flex>
</v-layout>
<v-progress-linear v-if="is_loading" :indeterminate="true" :active="is_loading"></v-progress-linear>
<v-container fluid fill-height class="pl-1 pr-1 pt-1 pb-2">
<v-layout row wrap >
<v-flex xs12 fill-height pa-1>
<v-layout row>
<v-flex sm12 and-down>
<v-card tile color="#C8DFC3">
<v-card-title class="pa-1" style="background:#3F848F" >
</v-card-title>
<v-card-text class="pt-1">
<v-layout row>
<v-flex class="text-xs-left" sm6 and-down>
<p class="mb-0 caption mono" style="color:#616161">Master</p>
</v-flex>
<v-flex class="text-xs-right" sm6 and-down>
<p class="mb-0 caption mono" style="color:#616161">Status</p>
<p class="mb-1 text--primary">
<span class="font-weight-black">{{master.status}}</span>
</p>
</v-flex>
</v-layout>
<v-divider style="border-color:#0D7F8B"></v-divider>
<v-layout mt-2 align-center row>
<v-flex sm6 d-flex>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
</v-flex>
</v-layout>
<v-layout class="pb-3" row>
<v-flex sm12 and-down>
<v-card v-for="slave in slaves" tile color="#F0EACF" style="margin-bottom:10px; margin-top:5px;">
<v-card-title class="pa-1 white--text" style="background:#3F848F" >
&nbsp;{{slave.name}}
</v-card-title>
<v-card-text class="pt-1">
<v-layout row>
<v-flex class="text-xs-left pr-2" sm6 and-down>
Status
</v-flex>
<v-flex class="text-xs-left" sm6 and-down>
{{slave.status}}
</v-flex>
</v-layout>
<v-layout v-if="slave.status=='Running'" row>
<v-flex class="text-xs-left pr-2" sm6 and-down>
Behind
</v-flex>
<v-flex class="text-xs-left" sm6 and-down>
{{slave.Behind}}
</v-flex>
</v-layout>
<v-layout v-if="slave.status=='Running'" row>
<v-flex class="text-xs-left pr-2" sm6 and-down>
Tables
</v-flex>
<v-flex class="text-xs-left" sm6 and-down>
<br/>
<span style="block" v-for="(tb,idx) in slave.Table">
<span v-if="idx > 0">,</span>&nbsp;{{tb}}
</span>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-container>
</v-content>
</v-app>
</div>
<!-- Vendor -->
<script src="../../libs/vendor/moment.min.js"></script>
<script src="../../libs/vendor/numeral.min.js"></script>
<script src="../../libs/vendor/moment-locale-id.js"></script>
<script src="../../libs/vendor/lodash.js"></script>
<script src="../../libs/vendor/axios.min.js"></script>
<script src="../../libs/vendor/vue.js"></script>
<script src="../../libs/vendor/vuex.js"></script>
<script src="../../libs/vendor/vuetify.js"></script>
<script src="../../libs/vendor/httpVueLoader.js"></script>
<script src="../../libs/one_global.js"></script>
<script> </script>
<!-- App Script -->
<?php
$ts = "?ts=" . Date("ymdhis");
?>
<script type="module">
import { store } from './store.js<?php echo $ts ?>';
window.store = store;
new Vue({
store,
el: '#app',
methods: {
reload: function(event){
this.$store.dispatch('replication/load')
}
},
mounted() {
let self = this
self.$store.dispatch('replication/load')
},
computed: {
is_loading() {
return this.$store.state.replication.loading
},
master() {
let master = this.$store.state.replication.master;
return master
},
slaves() {
let slaves = this.$store.state.replication.slave
return slaves
}
},
})
</script>
<style>
[v-cloak] {
display: none
}
.left {
}
.right {
}
.v-toolbar__content, .v-toolbar__extension {
align-items: center;
display: flex;
padding: 0 ;
}
</style>
</body>
</html>