Skip to content

Commit de5d917

Browse files
committed
1 parent 421899c commit de5d917

File tree

5 files changed

+147
-101
lines changed

5 files changed

+147
-101
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
2+
<v-dialog v-model="show" width="1200">
3+
<template v-slot:activator="{ on }">
4+
<v-btn icon v-on="on">
5+
<v-icon>build</v-icon>
6+
</v-btn>
7+
</template>
8+
<v-card>
9+
<v-card-title class="headline grey lighten-2" primary-title>SQL-query</v-card-title>
10+
<v-card-text>
11+
<pre v-highlightjs="meta.query" class="text-sm-left"><code class="sql"></code></pre>
12+
</v-card-text>
13+
<v-divider></v-divider>
14+
<v-card-actions>
15+
<v-spacer></v-spacer>
16+
<v-btn color="primary" flat @click="show = false">Close</v-btn>
17+
</v-card-actions>
18+
</v-card>
19+
</v-dialog>
20+
</template>
21+
<script>
22+
export default {
23+
name: 'CodeViewComponent',
24+
props: {
25+
show: {},
26+
meta: {}
27+
}
28+
}
29+
</script>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
2+
<v-dialog v-model="show" width="1000">
3+
<template v-slot:activator="{ on }">
4+
<v-btn icon v-on="on">
5+
<v-icon>settings</v-icon>
6+
</v-btn>
7+
</template>
8+
<v-card>
9+
<v-card-title class="headline grey lighten-2" primary-title>Columns</v-card-title>
10+
<v-card-text>
11+
<template>
12+
<v-data-table :items="meta.metadata" class="elevation-1" hide-actions>
13+
<template v-slot:headers="props">
14+
<tr>
15+
<th>Visible</th>
16+
<th>Name</th>
17+
<th>Description</th>
18+
</tr>
19+
</template>
20+
<template v-slot:items="props">
21+
<td>
22+
<v-checkbox v-model="props.item.properties.visible"/>
23+
</td>
24+
<td>{{ props.item.properties.label }}</td>
25+
<td>{{ props.item.properties.description }}</td>
26+
</template>
27+
</v-data-table>
28+
</template>
29+
</v-card-text>
30+
<v-divider></v-divider>
31+
<v-card-actions>
32+
<v-spacer></v-spacer>
33+
<v-btn color="primary" flat @click="show = false">Close</v-btn>
34+
</v-card-actions>
35+
</v-card>
36+
</v-dialog>
37+
</template>
38+
<script>
39+
export default {
40+
name: 'ColumnsComponent',
41+
data () {
42+
return {
43+
show: false
44+
}
45+
},
46+
props: {
47+
meta: {}
48+
}
49+
}
50+
</script>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
2+
<v-dialog v-model="show" width="600">
3+
<template v-slot:activator="{ on }">
4+
<v-btn icon v-on="on">
5+
<v-icon>search</v-icon>
6+
</v-btn>
7+
</template>
8+
<v-card>
9+
<v-card-title class="headline grey lighten-2" primary-title>Search</v-card-title>
10+
<v-card-text>
11+
<template>
12+
<v-form ref="form">
13+
<span v-for="item in meta.metadata" v-bind:key="item.name">
14+
<span v-if="item.properties.datatype === 'time'"></span>
15+
<v-combobox v-if="item.properties.values"
16+
v-model='selected[item.name]'
17+
:label="item.properties.label"
18+
:items="item.properties.values"
19+
clearable>
20+
</v-combobox>
21+
<v-text-field v-else
22+
v-model='selected[item.name]'
23+
:label="item.properties.label"
24+
clearable
25+
filled>
26+
</v-text-field>
27+
</span>
28+
</v-form>
29+
</template>
30+
</v-card-text>
31+
<v-divider></v-divider>
32+
<v-card-actions>
33+
<v-spacer></v-spacer>
34+
<v-btn color="primary" flat @click="setFilter">Search</v-btn>
35+
<v-btn color="primary" flat @click="show = false">Close</v-btn>
36+
</v-card-actions>
37+
</v-card>
38+
</v-dialog>
39+
</template>
40+
<script>
41+
export default {
42+
name: 'FilterComponent',
43+
data () {
44+
return {
45+
show: false,
46+
selected: {}
47+
}
48+
},
49+
props: {
50+
meta: {}
51+
},
52+
methods: {
53+
setFilter () {
54+
this.$store.commit('setFilter', this.selected)
55+
}
56+
}
57+
}
58+
</script>

src/main/malewicz/src/components/ObjectsTablePanel.vue

Lines changed: 8 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -3,102 +3,12 @@
33
<v-toolbar>
44
<v-toolbar-title class="text" v-if="meta.properties">{{ meta.properties.title }}</v-toolbar-title>
55
<v-spacer></v-spacer>
6-
<v-dialog v-model="dialog" width="1000">
7-
<template v-slot:activator="{ on }">
8-
<v-btn icon v-on="on">
9-
<v-icon>settings</v-icon>
10-
</v-btn>
11-
</template>
12-
<v-card>
13-
<v-card-title class="headline grey lighten-2" primary-title>Columns</v-card-title>
14-
<v-card-text>
15-
<template>
16-
<v-data-table :items="meta.metadata" class="elevation-1" hide-actions>
17-
<template v-slot:headers="props">
18-
<tr>
19-
<th>Visible</th>
20-
<th>Name</th>
21-
<th>Description</th>
22-
</tr>
23-
</template>
24-
<template v-slot:items="props">
25-
<td>
26-
<v-checkbox v-model="props.item.properties.visible"/>
27-
</td>
28-
<td>{{ props.item.properties.label }}</td>
29-
<td>{{ props.item.properties.description }}</td>
30-
</template>
31-
</v-data-table>
32-
</template>
33-
</v-card-text>
34-
<v-divider></v-divider>
35-
<v-card-actions>
36-
<v-spacer></v-spacer>
37-
<v-btn color="primary" flat @click="dialog = false">Close</v-btn>
38-
</v-card-actions>
39-
</v-card>
40-
</v-dialog>
41-
42-
<v-dialog v-model="dialog2" width="1200">
43-
<template v-slot:activator="{ on }">
44-
<v-btn icon v-on="on">
45-
<v-icon>build</v-icon>
46-
</v-btn>
47-
</template>
48-
<v-card>
49-
<v-card-title class="headline grey lighten-2" primary-title>SQL-query</v-card-title>
50-
<v-card-text>
51-
<pre v-highlightjs="meta.query" class="text-sm-left"><code class="sql"></code></pre>
52-
</v-card-text>
53-
<v-divider></v-divider>
54-
<v-card-actions>
55-
<v-spacer></v-spacer>
56-
<v-btn color="primary" flat @click="dialog2 = false">Close</v-btn>
57-
</v-card-actions>
58-
</v-card>
59-
</v-dialog>
60-
61-
<v-dialog v-model="dialog3" width="600">
62-
<template v-slot:activator="{ on }">
63-
<v-btn icon v-on="on">
64-
<v-icon>search</v-icon>
65-
</v-btn>
66-
</template>
67-
<v-card>
68-
<v-card-title class="headline grey lighten-2" primary-title>Search</v-card-title>
69-
<v-card-text>
70-
<template>
71-
<v-form ref="form">
72-
<span v-for="item in meta.metadata" v-bind:key="item.name">
73-
<span v-if="item.properties.datatype === 'time'"></span>
74-
<v-combobox v-if="item.properties.values"
75-
:label="item.properties.label"
76-
v-model='selected[item.name]'
77-
:items="item.properties.values"
78-
clearable>
79-
</v-combobox>
80-
<v-text-field v-else
81-
:label="item.properties.label"
82-
v-model='selected[item.name]'
83-
clearable filled>
84-
</v-text-field>
85-
</span>
86-
</v-form>
87-
</template>
88-
</v-card-text>
89-
<v-divider></v-divider>
90-
<v-card-actions>
91-
<v-spacer></v-spacer>
92-
<v-btn color="primary" flat @click="setFilter">Search</v-btn>
93-
<v-btn color="primary" flat @click="dialog3 = false">Close</v-btn>
94-
</v-card-actions>
95-
</v-card>
96-
</v-dialog>
97-
6+
<ColumnsComponent :meta="meta"/>
7+
<CodeViewComponent :meta="meta"/>
8+
<FilterComponent :meta="meta"/>
989
<v-btn @click="call()" icon>
9910
<v-icon>refresh</v-icon>
10011
</v-btn>
101-
10212
</v-toolbar>
10313

10414
<v-data-table
@@ -136,19 +46,18 @@
13646
</template>
13747
<script>
13848
import CustomComponent from './CustomComponent'
49+
import FilterComponent from './FilterComponent'
50+
import ColumnsComponent from './ColumnsComponent'
51+
import CodeViewComponent from './CodeViewComponent'
13952
14053
export default {
14154
name: 'ObjectsTablePanel',
142-
components: {CustomComponent},
55+
components: {CodeViewComponent, ColumnsComponent, FilterComponent, CustomComponent},
14356
data () {
14457
return {
14558
meta: [],
14659
items: [],
147-
dialog: false,
148-
dialog2: false,
149-
dialog3: false,
150-
isLoading: false,
151-
selected: {}
60+
isLoading: false
15261
}
15362
},
15463
computed: {

src/main/malewicz/src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ Vue.config.productionTip = false
5858

5959
const store = new Vuex.Store({
6060
state: {
61-
// host: '',
62-
host: 'http://localhost:8007/',
61+
host: '',
62+
// host: 'http://localhost:8007/',
6363
pageCount: 1,
6464
allConnections: [],
6565
types: [],

0 commit comments

Comments
 (0)