mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
134 lines
3.3 KiB
134 lines
3.3 KiB
3 years ago
|
<template>
|
||
|
<v-responsive @contextmenu="showMenuFn">
|
||
|
<!-- <v-layout flex class="project-logs" @contextmenu="showMenuFn">
|
||
|
<v-flex xs12
|
||
|
> -->
|
||
|
<v-data-table
|
||
|
dense
|
||
|
:headers="headers"
|
||
|
:items="logs"
|
||
|
class="elevation-1 project-logs small-footer"
|
||
|
flex
|
||
|
footer-props.items-per-page-options="100"
|
||
|
>
|
||
3 years ago
|
<template #item="props">
|
||
2 years ago
|
<tr class="" style="height: 19px !important">
|
||
3 years ago
|
<td class="py-0">
|
||
2 years ago
|
<v-icon v-if="props.item.status === 0" color="green lighten-1" size="10"> mdi-circle </v-icon>
|
||
|
<v-icon v-else-if="props.item.status === 1" size="10" color="orange lighten-1"> mdi-circle </v-icon>
|
||
|
<v-icon v-else size="10" color="red lighten-1"> mdi-circle </v-icon>
|
||
3 years ago
|
</td>
|
||
3 years ago
|
<td class="caption grey--text py-0">
|
||
|
{{ props.item.time }}
|
||
|
</td>
|
||
|
<td class="caption py-0">
|
||
3 years ago
|
{{ props.item.action }}
|
||
|
</td>
|
||
|
</tr>
|
||
|
</template>
|
||
|
</v-data-table>
|
||
|
<!-- </v-flex
|
||
|
> -->
|
||
2 years ago
|
<v-menu v-if="showMenu" v-model="showMenu" absolute :position-x="x" :position-y="y" offset-y>
|
||
3 years ago
|
<v-list>
|
||
|
<v-list-item @click="clearLogs">
|
||
|
<v-list-item-title>Clear Logs</v-list-item-title>
|
||
|
</v-list-item>
|
||
|
</v-list>
|
||
|
</v-menu>
|
||
|
<!-- </v-layout> -->
|
||
|
</v-responsive>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
3 years ago
|
export default {
|
||
|
components: {},
|
||
|
directives: {},
|
||
3 years ago
|
validate({ params }) {
|
||
2 years ago
|
return true;
|
||
3 years ago
|
},
|
||
|
props: {},
|
||
3 years ago
|
data() {
|
||
3 years ago
|
return {
|
||
|
showMenu: false,
|
||
|
x: 0,
|
||
|
y: 0,
|
||
|
headers: [
|
||
|
{
|
||
|
text: '',
|
||
|
sortable: false,
|
||
|
width: '1%',
|
||
2 years ago
|
class: '',
|
||
3 years ago
|
},
|
||
|
{
|
||
|
text: 'Time',
|
||
|
sortable: false,
|
||
|
width: '1%',
|
||
2 years ago
|
class: 'caption',
|
||
3 years ago
|
},
|
||
|
{
|
||
|
text: 'Logs',
|
||
|
sortable: false,
|
||
|
width: '100%',
|
||
2 years ago
|
class: 'caption',
|
||
|
},
|
||
3 years ago
|
],
|
||
|
logs: [],
|
||
2 years ago
|
maxLogs: 100,
|
||
|
};
|
||
3 years ago
|
},
|
||
3 years ago
|
head() {
|
||
2 years ago
|
return {};
|
||
3 years ago
|
},
|
||
|
computed: {},
|
||
|
watch: {},
|
||
2 years ago
|
created() {},
|
||
|
mounted() {},
|
||
|
beforeDestroy() {},
|
||
3 years ago
|
methods: {
|
||
3 years ago
|
showMenuFn(e) {
|
||
3 years ago
|
// console.log("showMenuFn", e);
|
||
2 years ago
|
e.preventDefault();
|
||
|
this.showMenu = false;
|
||
|
this.x = e.clientX;
|
||
|
this.y = e.clientY;
|
||
3 years ago
|
this.$nextTick(() => {
|
||
2 years ago
|
this.showMenu = true;
|
||
|
});
|
||
3 years ago
|
},
|
||
3 years ago
|
clearLogs() {
|
||
2 years ago
|
this.logs = [];
|
||
|
},
|
||
3 years ago
|
},
|
||
3 years ago
|
|
||
2 years ago
|
beforeCreated() {},
|
||
|
destroy() {},
|
||
|
};
|
||
3 years ago
|
</script>
|
||
|
|
||
2 years ago
|
<style scoped></style>
|
||
3 years ago
|
<!--
|
||
|
/**
|
||
|
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
|
||
|
*
|
||
|
* @author Naveen MR <oof1lab@gmail.com>
|
||
|
* @author Pranav C Balan <pranavxc@gmail.com>
|
||
|
*
|
||
|
* @license GNU AGPL version 3 or any later version
|
||
|
*
|
||
|
* This program is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU Affero General Public License as
|
||
|
* published by the Free Software Foundation, either version 3 of the
|
||
|
* License, or (at your option) any later version.
|
||
|
*
|
||
|
* This program is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU Affero General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Affero General Public License
|
||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
*
|
||
|
*/
|
||
|
-->
|