Web: add Tabulator vue component
This commit is contained in:
parent
528dec9c50
commit
888d93147e
1578
web/app/package-lock.json
generated
1578
web/app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,13 +3,16 @@
|
|||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sybren Stüvel"
|
"name": "Sybren A. Stüvel"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap-vue": "^2.21.2",
|
"bootstrap-vue": "^2.21.2",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
|
"sass": "^1.50.0",
|
||||||
|
"sass-loader": "^10",
|
||||||
"socket.io-client": "2.4.0",
|
"socket.io-client": "2.4.0",
|
||||||
"vue": "^2.6.11"
|
"vue": "^2.6.11",
|
||||||
|
"vue-tabulator": "^1.3.0"
|
||||||
},
|
},
|
||||||
"licenses": [
|
"licenses": [
|
||||||
{
|
{
|
||||||
@ -43,10 +46,7 @@
|
|||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"parser": "babel-eslint"
|
"parser": "babel-eslint"
|
||||||
},
|
},
|
||||||
"rules": {},
|
"rules": {}
|
||||||
"ignorePatterns": [
|
|
||||||
"../manager-api/src/**"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"> 1%",
|
"> 1%",
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<chat-navbar></chat-navbar>
|
<flamenco-navbar></flamenco-navbar>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
<flamenco-jobs-table :apiClient="apiClient" />
|
||||||
|
|
||||||
<chat-chatbox
|
<chat-chatbox
|
||||||
@sendMessage="sendMessage"
|
@sendMessage="sendMessage"
|
||||||
:chatHistory="messages"
|
:chatHistory="messages"
|
||||||
@ -16,17 +19,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ChatNavbar from "./components/ChatNavbar.vue";
|
import FlamencoNavbar from "./components/FlamencoNavbar.vue";
|
||||||
|
import FlamencoJobsTable from "./components/FlamencoJobsTable.vue";
|
||||||
import ChatChatbox from "./components/ChatChatbox.vue";
|
import ChatChatbox from "./components/ChatChatbox.vue";
|
||||||
import JobsListener from "./components/JobsListener.vue";
|
import JobsListener from "./components/JobsListener.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "FlamencoWebApp",
|
name: "FlamencoWebApp",
|
||||||
components: {
|
components: {
|
||||||
ChatNavbar,
|
FlamencoNavbar,
|
||||||
|
FlamencoJobsTable,
|
||||||
ChatChatbox,
|
ChatChatbox,
|
||||||
JobsListener,
|
JobsListener,
|
||||||
},
|
},
|
||||||
|
props: ["apiClient"],
|
||||||
data: () => {
|
data: () => {
|
||||||
return {
|
return {
|
||||||
websocketURL: "ws://localhost:8080",
|
websocketURL: "ws://localhost:8080",
|
||||||
|
@ -33,7 +33,7 @@ export default {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.container {
|
.container {
|
||||||
height: calc(100% - 100px);
|
height: 25ex;
|
||||||
}
|
}
|
||||||
.chatbox {
|
.chatbox {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
41
web/app/src/components/FlamencoJobsTable.vue
Normal file
41
web/app/src/components/FlamencoJobsTable.vue
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<template>
|
||||||
|
<div class="flamenco-jobs-table">
|
||||||
|
<JobsTabulator v-model="jobs" :options="options" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { TabulatorComponent } from "vue-tabulator";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: ["apiClient"],
|
||||||
|
components: {
|
||||||
|
JobsTabulator: TabulatorComponent,
|
||||||
|
},
|
||||||
|
data: () => {
|
||||||
|
const options = {
|
||||||
|
columns: [
|
||||||
|
{ title: 'Name', field: 'name', sorter: 'string', width: 200, editor: true },
|
||||||
|
{ title: 'Age', field: 'age', sorter: 'int', width: 200, editor: true }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
jobs: [
|
||||||
|
// To be loaded from an API call instead.
|
||||||
|
{ name: 'Teste', age: 13 }
|
||||||
|
],
|
||||||
|
options: options,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
@import "~vue-tabulator/dist/scss/bootstrap/tabulator_bootstrap4";
|
||||||
|
|
||||||
|
.flamenco-jobs-table {
|
||||||
|
min-height: 50%;
|
||||||
|
border: thick solid fuchsia;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<b-navbar toggleable type="dark" variant="dark">
|
<b-navbar toggleable type="dark" variant="dark">
|
||||||
<b-navbar-brand href="#">Chat Application</b-navbar-brand>
|
<b-navbar-brand href="#">Flamenco</b-navbar-brand>
|
||||||
</b-navbar>
|
</b-navbar>
|
||||||
</template>
|
</template>
|
@ -15,8 +15,8 @@ import URLs from './urls'
|
|||||||
import "bootstrap/dist/css/bootstrap.css";
|
import "bootstrap/dist/css/bootstrap.css";
|
||||||
import "bootstrap-vue/dist/bootstrap-vue.css";
|
import "bootstrap-vue/dist/bootstrap-vue.css";
|
||||||
|
|
||||||
// let flamencoManager = require('flamenco-manager');
|
let flamencoManager = require('flamenco-manager');
|
||||||
// let apiClient = new flamencoManager.ApiClient(URLs.api);
|
let apiClient = new flamencoManager.ApiClient(URLs.api);
|
||||||
|
|
||||||
// let query = new flamencoManager.JobsQuery();
|
// let query = new flamencoManager.JobsQuery();
|
||||||
// // query.status_in = ["active"];
|
// // query.status_in = ["active"];
|
||||||
@ -42,5 +42,6 @@ Vue.use(IconsPlugin);
|
|||||||
|
|
||||||
var vueApp = new Vue(App);
|
var vueApp = new Vue(App);
|
||||||
vueApp.websocketURL = URLs.ws;
|
vueApp.websocketURL = URLs.ws;
|
||||||
|
vueApp.apiClient = apiClient;
|
||||||
|
|
||||||
vueApp.$mount("#app");
|
vueApp.$mount("#app");
|
||||||
|
8926
web/app/yarn.lock
8926
web/app/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user