|
3 | 3 | <v-toolbar> |
4 | 4 | <v-toolbar-title class="text" v-if="meta.properties">{{ meta.properties.title }}</v-toolbar-title> |
5 | 5 | <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"/> |
98 | 9 | <v-btn @click="call()" icon> |
99 | 10 | <v-icon>refresh</v-icon> |
100 | 11 | </v-btn> |
101 | | - |
102 | 12 | </v-toolbar> |
103 | 13 |
|
104 | 14 | <v-data-table |
|
136 | 46 | </template> |
137 | 47 | <script> |
138 | 48 | import CustomComponent from './CustomComponent' |
| 49 | +import FilterComponent from './FilterComponent' |
| 50 | +import ColumnsComponent from './ColumnsComponent' |
| 51 | +import CodeViewComponent from './CodeViewComponent' |
139 | 52 |
|
140 | 53 | export default { |
141 | 54 | name: 'ObjectsTablePanel', |
142 | | - components: {CustomComponent}, |
| 55 | + components: {CodeViewComponent, ColumnsComponent, FilterComponent, CustomComponent}, |
143 | 56 | data () { |
144 | 57 | return { |
145 | 58 | meta: [], |
146 | 59 | items: [], |
147 | | - dialog: false, |
148 | | - dialog2: false, |
149 | | - dialog3: false, |
150 | | - isLoading: false, |
151 | | - selected: {} |
| 60 | + isLoading: false |
152 | 61 | } |
153 | 62 | }, |
154 | 63 | computed: { |
|
0 commit comments