@live-change/db-admin 0.9.97 → 0.9.98
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/front/src/Data.vue +46 -1
- package/package.json +11 -11
package/front/src/Data.vue
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
|
|
3
3
|
<ConfirmPopup v-if="isMounted" />
|
|
4
|
+
|
|
4
5
|
|
|
5
6
|
<PathEditor v-model="path"
|
|
6
7
|
@update:read="v => { read = v; version++ }"
|
|
7
8
|
@update:write="v => write = v"
|
|
8
9
|
@update:remove="v => remove = v" />
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
<div v-if="isIndex">
|
|
12
|
+
<h4>Index code:</h4>
|
|
13
|
+
<pre style="white-space: pre-wrap;">{{ indexCode }}</pre>
|
|
14
|
+
<h4>Index config:</h4>
|
|
15
|
+
<pre style="white-space: pre-wrap;">{{ indexConfigWithoutCode }}</pre>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
11
18
|
|
|
12
19
|
<working-zone>
|
|
13
20
|
|
|
@@ -44,6 +51,9 @@
|
|
|
44
51
|
import DataRangeView from "./DataRangeView.vue"
|
|
45
52
|
import DataView from "./DataView.vue"
|
|
46
53
|
import CreateObject from "./CreateObject.vue"
|
|
54
|
+
import CodeEditor from "./CodeEditor.vue"
|
|
55
|
+
|
|
56
|
+
import { dbViewSugar } from "./dbSugar.js"
|
|
47
57
|
|
|
48
58
|
const props = defineProps({
|
|
49
59
|
dbApi: {
|
|
@@ -106,4 +116,39 @@
|
|
|
106
116
|
const write = ref()
|
|
107
117
|
const remove = ref()
|
|
108
118
|
|
|
119
|
+
const { dbApi } = props
|
|
120
|
+
|
|
121
|
+
import { useApi } from "@live-change/vue3-ssr"
|
|
122
|
+
const dao = useApi().source
|
|
123
|
+
import { live } from "@live-change/dao-vue3"
|
|
124
|
+
|
|
125
|
+
const readResult = computed(() => read.value && eval(read.value.result)({}, dbViewSugar))
|
|
126
|
+
|
|
127
|
+
const isIndex = computed(() => readResult.value?.[0] === 'indexRange')
|
|
128
|
+
const dbName = computed(() => readResult.value?.[1])
|
|
129
|
+
const indexName = computed(() => readResult.value?.[2])
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
const indexCodePath = computed(() => isIndex.value ? {
|
|
133
|
+
what: [dbApi, 'indexCode', dbName.value, indexName.value],
|
|
134
|
+
} : null)
|
|
135
|
+
const indexConfigPath = computed(() => isIndex.value ? {
|
|
136
|
+
what: [dbApi, 'indexConfig', dbName.value, indexName.value],
|
|
137
|
+
} : null)
|
|
138
|
+
|
|
139
|
+
const [indexCode, indexConfig] = await Promise.all([
|
|
140
|
+
live(dao, indexCodePath),
|
|
141
|
+
live(dao, indexConfigPath)
|
|
142
|
+
])
|
|
143
|
+
|
|
144
|
+
const indexConfigWithoutCode = computed(() => {
|
|
145
|
+
const config = indexConfig.value
|
|
146
|
+
if(!config) return null
|
|
147
|
+
return {
|
|
148
|
+
...config,
|
|
149
|
+
code: undefined
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
|
|
153
|
+
|
|
109
154
|
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/db-admin",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.98",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "node server/start.js memDev --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --initScript ./init.js --dbAccess",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"type": "module",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@fortawesome/fontawesome-free": "^6.7.2",
|
|
22
|
-
"@live-change/dao": "^0.9.
|
|
23
|
-
"@live-change/dao-message": "^0.9.
|
|
24
|
-
"@live-change/dao-sockjs": "^0.9.
|
|
25
|
-
"@live-change/dao-vue3": "^0.9.
|
|
26
|
-
"@live-change/dao-websocket": "^0.9.
|
|
27
|
-
"@live-change/framework": "^0.9.
|
|
28
|
-
"@live-change/vue3-components": "^0.9.
|
|
29
|
-
"@live-change/vue3-ssr": "^0.9.
|
|
22
|
+
"@live-change/dao": "^0.9.98",
|
|
23
|
+
"@live-change/dao-message": "^0.9.98",
|
|
24
|
+
"@live-change/dao-sockjs": "^0.9.98",
|
|
25
|
+
"@live-change/dao-vue3": "^0.9.98",
|
|
26
|
+
"@live-change/dao-websocket": "^0.9.98",
|
|
27
|
+
"@live-change/framework": "^0.9.98",
|
|
28
|
+
"@live-change/vue3-components": "^0.9.98",
|
|
29
|
+
"@live-change/vue3-ssr": "^0.9.98",
|
|
30
30
|
"@primeuix/themes": "^1.0.0",
|
|
31
31
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
32
32
|
"@vueuse/core": "^12.3.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"vue3-scroll-border": "0.1.7"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@live-change/codeceptjs-helper": "^0.9.
|
|
58
|
+
"@live-change/codeceptjs-helper": "^0.9.98",
|
|
59
59
|
"@wdio/selenium-standalone-service": "^8.15.0",
|
|
60
60
|
"codeceptjs": "^3.6.10",
|
|
61
61
|
"generate-password": "1.7.1",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
69
69
|
"license": "ISC",
|
|
70
70
|
"description": "",
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "a0e25c0ac835707d27763e56a2c20bd75d978583"
|
|
72
72
|
}
|