@hostlink/nuxt-light 1.26.7 → 1.26.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.26.7",
4
+ "version": "1.26.8",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -135,6 +135,11 @@ const routes = [
135
135
  path: "/SystemValue/add",
136
136
  file: resolver.resolve("./runtime/pages/SystemValue/add.vue")
137
137
  },
138
+ {
139
+ name: "System-database-process",
140
+ path: "/System/database/process",
141
+ file: resolver.resolve("./runtime/pages/System/database/process.vue")
142
+ },
138
143
  {
139
144
  name: "System-database-backup",
140
145
  path: "/System/database/backup",
@@ -15,19 +15,21 @@ const minimized = defineModel<boolean>("minimized", { default: false })
15
15
  const maximized = defineModel<boolean>("maximized", { default: false })
16
16
 
17
17
  // extends QTableColumn
18
- export type LTableColumn = QTableColumn & {
18
+ export interface LTableColumn extends QTableColumn {
19
19
  searchable?: boolean,
20
20
  searchType?: string,
21
21
  searchOptions?: Array<any> | Function,
22
22
  searchMultiple?: boolean,
23
23
  gqlField?: string | Array<string> | Object,
24
- backgroundColor?: string | Function
24
+ backgroundColor?: string | Function,
25
+ searchMethod?: string
25
26
  }
26
27
 
27
28
 
28
29
  const errors = ref<InstanceType<any>>([
29
30
  ]);
30
31
 
32
+
31
33
  export type LTableProps = QTableProps & {
32
34
  columns?: Array<LTableColumn>,
33
35
  actions?: Array<string>,
@@ -38,10 +40,10 @@ export type LTableProps = QTableProps & {
38
40
  selected?: Array<any>,
39
41
  maximizable?: boolean,
40
42
  minimizable?: boolean,
41
- rows?: Array<any>,
42
43
  onRequestData?: (request: LTableRequest) => void
43
44
  addComponent?: Dialog
44
- addComponentProps?: any
45
+ addComponentProps?: any,
46
+ rows?: Array<any>,
45
47
  }
46
48
 
47
49
 
@@ -385,8 +387,13 @@ const getFilterValue = () => {
385
387
  f[col.name] = filters.value[col.name]
386
388
 
387
389
  } else {
388
- f[col.name] = {
389
- contains: filters.value[col.name]
390
+
391
+ if (col.searchMethod == "equals") {
392
+ f[col.name] = filters.value[col.name]
393
+ } else {
394
+ f[col.name] = {
395
+ contains: filters.value[col.name]
396
+ }
390
397
  }
391
398
  }
392
399
  }
@@ -35,6 +35,7 @@ const light = reactive({
35
35
  devMode: false,
36
36
  styles: {
37
37
  table: {
38
+ color: "primary",
38
39
  dense: true,
39
40
  flat: true,
40
41
  bordered: true,
@@ -209,6 +210,7 @@ const light = reactive({
209
210
  light.styles.card = { ...light.styles.card, ...styles.card || {} };
210
211
  light.styles.button = { ...light.styles.button, ...styles.button || {} };
211
212
  light.styles.table = { ...light.styles.table, ...styles.table || {} };
213
+ light.styles.table.color = light.color;
212
214
  watch(() => light.theme, async () => {
213
215
  await light.setStyle("theme", light.theme);
214
216
  });
@@ -0,0 +1,68 @@
1
+ <script setup>
2
+ import { q, useAsyncData } from "#imports"
3
+ import { ref, watch, onUnmounted } from "vue"
4
+
5
+ const loading = ref(false)
6
+ const { data, refresh } = await useAsyncData(async () => {
7
+ loading.value = true
8
+ const { system } = await q({
9
+ system: {
10
+ database: {
11
+ processList: true
12
+ }
13
+ }
14
+ })
15
+
16
+ loading.value = false
17
+ return system;
18
+ })
19
+
20
+ const autoRefresh = ref(0)
21
+
22
+
23
+ let interval = null
24
+
25
+ watch(autoRefresh, (value) => {
26
+
27
+ if (interval)
28
+ clearInterval(interval)
29
+
30
+ if (value) {
31
+ interval = setInterval(refresh, value)
32
+ }
33
+ })
34
+
35
+ onUnmounted(() => {
36
+ if (interval)
37
+ clearInterval(interval)
38
+ });
39
+
40
+
41
+ </script>
42
+ <template>
43
+ <l-page title="System Database Process">
44
+ <q-table :rows="data.database.processList" hide-bottom v-bind="$light.styles.table" :loading="loading">
45
+ <template #top-left>
46
+ <q-btn label="Reload" outline :color="$light.color" icon="sym_o_refresh" @click="refresh"></q-btn>
47
+
48
+ </template>
49
+
50
+ <template #top-right>
51
+ <q-select label="Auto Refresh" v-model="autoRefresh" :options="[
52
+ { label: 'Off', value: 0 },
53
+ { label: '5s', value: 5000 },
54
+ { label: '10s', value: 10000 },
55
+ { label: '30s', value: 30000 },
56
+ { label: '1m', value: 60000 },
57
+ { label: '5m', value: 300000 },
58
+ { label: '10m', value: 600000 },
59
+ { label: '30m', value: 1800000 },
60
+ { label: '1h', value: 3600000 }
61
+ ]" @input="autoRefresh && refresh" outlined :color="$light.color" dense="" style="min-width: 200px"
62
+ map-options emit-value></q-select>
63
+
64
+ </template>
65
+ </q-table>
66
+
67
+ </l-page>
68
+ </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.26.7",
3
+ "version": "1.26.8",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",