@mongoosejs/studio 0.0.17 → 0.0.19
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/frontend/dist/app.js +160 -0
- package/frontend/dist/tw.css +595 -0
- package/frontend/public/app.js +9446 -0
- package/frontend/public/tw.css +827 -0
- package/frontend/src/document/document.html +14 -0
- package/frontend/src/document/document.js +13 -3
- package/frontend/src/models/models.css +0 -4
- package/frontend/src/models/models.html +27 -9
- package/frontend/src/models/models.js +11 -45
- package/logs/COUNT_20230524-154120-151469/operation.log +8 -0
- package/logs/COUNT_20230524-154408-077670/operation.log +22 -0
- package/logs/COUNT_20230524-154414-431706/operation.log +8 -0
- package/logs/COUNT_20230524-155000-297076/operation.log +8 -0
- package/logs/LOAD_20230524-155832-351763/checkpoint.csv +1 -0
- package/logs/LOAD_20230524-155832-351763/operation.log +23 -0
- package/package.json +1 -1
|
@@ -56,5 +56,19 @@
|
|
|
56
56
|
<component :is="getComponentForPath(path)" :value="getValueForPath(path.path)"></component>
|
|
57
57
|
</div>
|
|
58
58
|
</div>
|
|
59
|
+
<div v-for="path in virtuals" class="mb-2">
|
|
60
|
+
<div class="p-1 mb-1 bg-slate-100">
|
|
61
|
+
{{path.name}}
|
|
62
|
+
<span class="path-type">
|
|
63
|
+
(virtual)
|
|
64
|
+
</span>
|
|
65
|
+
</div>
|
|
66
|
+
<div v-if="path.value == null" class="text-sky-800">
|
|
67
|
+
{{'' + path.value}}
|
|
68
|
+
</div>
|
|
69
|
+
<div v-else>
|
|
70
|
+
{{path.value}}
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
59
73
|
</div>
|
|
60
74
|
</div>
|
|
@@ -17,12 +17,13 @@ module.exports = app => app.component('document', {
|
|
|
17
17
|
status: 'init',
|
|
18
18
|
document: null,
|
|
19
19
|
changes: {},
|
|
20
|
-
editting: false
|
|
20
|
+
editting: false,
|
|
21
|
+
virtuals: []
|
|
21
22
|
}),
|
|
22
23
|
async mounted() {
|
|
23
24
|
const { doc, schemaPaths } = await api.Model.getDocument({ model: this.model, documentId: this.documentId });
|
|
24
25
|
this.document = doc;
|
|
25
|
-
this.schemaPaths = Object.keys(schemaPaths).sort((k1, k2) => {
|
|
26
|
+
this.schemaPaths = await Object.keys(schemaPaths).sort((k1, k2) => {
|
|
26
27
|
if (k1 === '_id' && k2 !== '_id') {
|
|
27
28
|
return -1;
|
|
28
29
|
}
|
|
@@ -31,7 +32,7 @@ module.exports = app => app.component('document', {
|
|
|
31
32
|
}
|
|
32
33
|
return 0;
|
|
33
34
|
}).map(key => schemaPaths[key]);
|
|
34
|
-
|
|
35
|
+
this.getVirtuals();
|
|
35
36
|
this.status = 'loaded';
|
|
36
37
|
},
|
|
37
38
|
methods: {
|
|
@@ -59,6 +60,15 @@ module.exports = app => app.component('document', {
|
|
|
59
60
|
getEditValueForPath({ path }) {
|
|
60
61
|
return path in this.changes ? this.changes[path] : mpath.get(path, this.document);
|
|
61
62
|
},
|
|
63
|
+
getVirtuals() {
|
|
64
|
+
const exists = this.schemaPaths.map(x => x.path);
|
|
65
|
+
const docKeys = Object.keys(this.document);
|
|
66
|
+
for (let i = 0; i < docKeys.length; i++) {
|
|
67
|
+
if (!exists.includes(docKeys[i])) {
|
|
68
|
+
this.virtuals.push({ name: docKeys[i], value: this.document[docKeys[i]] });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
62
72
|
cancelEdit() {
|
|
63
73
|
this.changes = {};
|
|
64
74
|
this.editting = false;
|
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
<div class="models">
|
|
2
|
-
<div
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<div class="flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-2 h-[calc(100vh-55px)]">
|
|
4
|
+
<div class="flex font-bold font-xl mt-4 pl-2">
|
|
5
|
+
Models
|
|
6
|
+
</div>
|
|
7
|
+
<nav class="flex flex-1 flex-col">
|
|
8
|
+
<ul role="list" class="flex flex-1 flex-col gap-y-7">
|
|
9
|
+
<li>
|
|
10
|
+
<ul role="list">
|
|
11
|
+
<li v-for="model in models">
|
|
12
|
+
<router-link
|
|
13
|
+
:to="'/model/' + model"
|
|
14
|
+
class="block rounded-md py-2 pr-2 pl-2 text-sm font-semibold text-gray-700"
|
|
15
|
+
:class="model === currentModel ? 'bg-puerto-rico-100 font-bold' : 'hover:bg-puerto-rico-100'">
|
|
16
|
+
{{model}}
|
|
17
|
+
</router-link>
|
|
18
|
+
</li>
|
|
19
|
+
</ul>
|
|
20
|
+
</li>
|
|
21
|
+
</ul>
|
|
22
|
+
</nav>
|
|
8
23
|
</div>
|
|
24
|
+
|
|
9
25
|
</div>
|
|
10
26
|
<div class="documents" ref="documentsList">
|
|
11
27
|
<div>
|
|
@@ -13,15 +29,17 @@
|
|
|
13
29
|
<div class="search-input">
|
|
14
30
|
<form @submit.prevent="search">
|
|
15
31
|
<input class="search-text" type="text" placeholder="Filter or text" v-model="searchText" />
|
|
16
|
-
<div>Number of Documents: {{numDocuments}}</div>
|
|
17
32
|
</form>
|
|
18
|
-
|
|
19
33
|
</div>
|
|
20
34
|
<div class="buttons">
|
|
35
|
+
<div class="mr-2">
|
|
36
|
+
<span v-if="status === 'loading'">Loading ...</span>
|
|
37
|
+
<span v-if="status === 'loaded'">{{numDocuments === 1 ? numDocuments+ ' document' : numDocuments + ' documents'}}</span>
|
|
38
|
+
</div>
|
|
21
39
|
<button
|
|
22
40
|
@click="shouldShowExportModal = true"
|
|
23
41
|
type="button"
|
|
24
|
-
class="rounded bg-puerto-rico-600 px-2 py-1 text-sm font-semibold text-white shadow-sm hover:bg-puerto-rico-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-puerto-rico-600">
|
|
42
|
+
class="mr-2 rounded bg-puerto-rico-600 px-2 py-1 text-sm font-semibold text-white shadow-sm hover:bg-puerto-rico-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-puerto-rico-600">
|
|
25
43
|
Export
|
|
26
44
|
</button>
|
|
27
45
|
<button
|
|
@@ -68,31 +68,18 @@ module.exports = app => app.component('models', {
|
|
|
68
68
|
this.sortDocs(num, path);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
|
|
71
72
|
if (this.currentModel != null) {
|
|
72
73
|
await this.getDocuments();
|
|
73
74
|
}
|
|
74
|
-
this.
|
|
75
|
+
if (this.$route.query?.fields) {
|
|
76
|
+
const filter = this.$route.query.fields.split(',');
|
|
77
|
+
this.filteredPaths = this.filteredPaths.filter(x => filter.includes(x.path))
|
|
78
|
+
}
|
|
75
79
|
|
|
76
80
|
this.status = 'loaded';
|
|
77
81
|
},
|
|
78
82
|
methods: {
|
|
79
|
-
applyQueryParams() {
|
|
80
|
-
const hashUrl = window.location.hash.replace(/^#/, '');
|
|
81
|
-
if (hashUrl.indexOf('?') !== -1) {
|
|
82
|
-
const searchParams = new URLSearchParams(
|
|
83
|
-
hashUrl.slice(hashUrl.indexOf('?') + 1)
|
|
84
|
-
);
|
|
85
|
-
if (searchParams.has('fields')) {
|
|
86
|
-
const filter = searchParams.get('fields').split(',');
|
|
87
|
-
this.filteredPaths = this.filteredPaths.filter(x => filter.includes(x.path))
|
|
88
|
-
}
|
|
89
|
-
if (searchParams.has('search')) {
|
|
90
|
-
this.searchText = searchParams.get('search');
|
|
91
|
-
this.filter = eval(`(${this.searchText})`);
|
|
92
|
-
this.filter = EJSON.stringify(this.filter);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
83
|
async onScroll() {
|
|
97
84
|
if (this.status === 'loading' || this.loadedAllDocs) {
|
|
98
85
|
return;
|
|
@@ -136,22 +123,11 @@ module.exports = app => app.component('models', {
|
|
|
136
123
|
this.filter = eval(`(${this.searchText})`);
|
|
137
124
|
this.filter = EJSON.stringify(this.filter);
|
|
138
125
|
this.query.search = this.searchText;
|
|
126
|
+
this.$router.push({ query: this.query });
|
|
139
127
|
} else {
|
|
140
128
|
this.filter = {};
|
|
141
129
|
delete this.query.search;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const hashUrl = window.location.hash.replace(/^#/, '');
|
|
145
|
-
if (hashUrl.indexOf('?') === -1) {
|
|
146
|
-
window.history.pushState({}, '', window.location.pathname + '#' + hashUrl + '?search=' + this.query.search);
|
|
147
|
-
} else {
|
|
148
|
-
const searchParams = new URLSearchParams(
|
|
149
|
-
hashUrl.indexOf('?') === -1 ? '' : hashUrl.slice(hashUrl.indexOf('?') + 1)
|
|
150
|
-
);
|
|
151
|
-
const hashUrlWithoutSearchParams = hashUrl.slice(0, hashUrl.indexOf('?'));
|
|
152
|
-
|
|
153
|
-
searchParams.set('search', this.query.search);
|
|
154
|
-
window.history.pushState({}, '', window.location.pathname + '#' + hashUrlWithoutSearchParams + '?' + searchParams);
|
|
130
|
+
this.$router.push({ query: this.query });
|
|
155
131
|
}
|
|
156
132
|
await this.loadMoreDocuments();
|
|
157
133
|
},
|
|
@@ -218,23 +194,13 @@ module.exports = app => app.component('models', {
|
|
|
218
194
|
this.filteredPaths = [...this.selectedPaths];
|
|
219
195
|
this.shouldShowFieldModal = false;
|
|
220
196
|
const selectedParams = this.filteredPaths.map(x => x.path).join(',');
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
if (hashUrl.indexOf('?') === -1) {
|
|
224
|
-
window.history.pushState({}, '', window.location.pathname + '#' + hashUrl + '?fields=' + selectedParams);
|
|
225
|
-
} else {
|
|
226
|
-
const searchParams = new URLSearchParams(
|
|
227
|
-
hashUrl.indexOf('?') === -1 ? '' : hashUrl.slice(hashUrl.indexOf('?') + 1)
|
|
228
|
-
);
|
|
229
|
-
const hashUrlWithoutSearchParams = hashUrl.slice(0, hashUrl.indexOf('?'));
|
|
230
|
-
|
|
231
|
-
searchParams.set('fields', selectedParams);
|
|
232
|
-
window.history.pushState({}, '', window.location.pathname + '#' + hashUrlWithoutSearchParams + '?' + searchParams);
|
|
233
|
-
}
|
|
234
|
-
|
|
197
|
+
this.query.fields = selectedParams;
|
|
198
|
+
this.$router.push({ query: this.query });
|
|
235
199
|
},
|
|
236
200
|
resetDocuments() {
|
|
237
201
|
this.selectedPaths = [...this.filteredPaths];
|
|
202
|
+
this.query.fields = {};
|
|
203
|
+
this.$router.push({ query: this.query });
|
|
238
204
|
this.shouldShowFieldModal = false;
|
|
239
205
|
},
|
|
240
206
|
deselectAll() {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
2023-05-24 15:41:20 INFO Username and password provided but auth provider not specified, inferring PlainTextAuthProvider
|
|
2
|
+
2023-05-24 15:41:20 INFO A cloud secure connect bundle was provided: ignoring all explicit contact points.
|
|
3
|
+
2023-05-24 15:41:20 INFO Operation directory: /home/val/Workspace/meanIT/admin/logs/COUNT_20230524-154120-151469
|
|
4
|
+
2023-05-24 15:41:25 ERROR Operation COUNT_20230524-154120-151469 failed: When schema.query is not defined, then either schema.keyspace or schema.graph must be defined, and either schema.table, schema.vertex or schema.edge must be defined.
|
|
5
|
+
java.lang.IllegalArgumentException: When schema.query is not defined, then either schema.keyspace or schema.graph must be defined, and either schema.table, schema.vertex or schema.edge must be defined
|
|
6
|
+
at com.datastax.oss.dsbulk.workflow.commons.settings.SchemaSettings.init(SchemaSettings.java:329)
|
|
7
|
+
at com.datastax.oss.dsbulk.workflow.count.CountWorkflow.init(CountWorkflow.java:120)
|
|
8
|
+
at com.datastax.oss.dsbulk.runner.WorkflowThread.run(WorkflowThread.java:52)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
2023-05-24 15:44:08 INFO Username and password provided but auth provider not specified, inferring PlainTextAuthProvider
|
|
2
|
+
2023-05-24 15:44:08 INFO A cloud secure connect bundle was provided: ignoring all explicit contact points.
|
|
3
|
+
2023-05-24 15:44:08 INFO Operation directory: /home/val/Workspace/meanIT/admin/logs/COUNT_20230524-154408-077670
|
|
4
|
+
2023-05-24 15:44:08 ERROR Operation COUNT_20230524-154408-077670 failed: DriverExecutionException (no message).
|
|
5
|
+
Caused by: Server returned HTTP response code: 401 for URL: https://54be87f5-14f5-4bf1-a5be-155e78347c97-us-east1.db.astra.datastax.com:29080/metadata.
|
|
6
|
+
com.datastax.oss.driver.api.core.DriverExecutionException: null
|
|
7
|
+
at com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures.getUninterruptibly(CompletableFutures.java:152)
|
|
8
|
+
at com.datastax.oss.driver.api.core.session.SessionBuilder.build(SessionBuilder.java:835)
|
|
9
|
+
at com.datastax.oss.dsbulk.workflow.commons.settings.DriverSettings.newSession(DriverSettings.java:560)
|
|
10
|
+
at com.datastax.oss.dsbulk.workflow.count.CountWorkflow.init(CountWorkflow.java:117)
|
|
11
|
+
at com.datastax.oss.dsbulk.runner.WorkflowThread.run(WorkflowThread.java:52)
|
|
12
|
+
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://54be87f5-14f5-4bf1-a5be-155e78347c97-us-east1.db.astra.datastax.com:29080/metadata
|
|
13
|
+
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2000)
|
|
14
|
+
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)
|
|
15
|
+
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
|
|
16
|
+
at com.datastax.oss.driver.internal.core.config.cloud.CloudConfigFactory.fetchProxyMetadata(CloudConfigFactory.java:232)
|
|
17
|
+
at com.datastax.oss.driver.internal.core.config.cloud.CloudConfigFactory.createCloudConfig(CloudConfigFactory.java:133)
|
|
18
|
+
at com.datastax.oss.driver.api.core.session.SessionBuilder.buildDefaultSessionAsync(SessionBuilder.java:876)
|
|
19
|
+
at com.datastax.oss.driver.api.core.session.SessionBuilder.buildAsync(SessionBuilder.java:817)
|
|
20
|
+
at com.datastax.oss.driver.api.core.session.SessionBuilder.build(SessionBuilder.java:835)
|
|
21
|
+
at com.datastax.oss.dsbulk.workflow.commons.settings.DriverSettings.newSession(DriverSettings.java:560)
|
|
22
|
+
at com.datastax.oss.dsbulk.workflow.count.CountWorkflow.init(CountWorkflow.java:117)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
2023-05-24 15:44:14 INFO Username and password provided but auth provider not specified, inferring PlainTextAuthProvider
|
|
2
|
+
2023-05-24 15:44:14 INFO A cloud secure connect bundle was provided: ignoring all explicit contact points.
|
|
3
|
+
2023-05-24 15:44:14 INFO Operation directory: /home/val/Workspace/meanIT/admin/logs/COUNT_20230524-154414-431706
|
|
4
|
+
2023-05-24 15:44:19 ERROR Operation COUNT_20230524-154414-431706 failed: When schema.query is not defined, then either schema.keyspace or schema.graph must be defined, and either schema.table, schema.vertex or schema.edge must be defined.
|
|
5
|
+
java.lang.IllegalArgumentException: When schema.query is not defined, then either schema.keyspace or schema.graph must be defined, and either schema.table, schema.vertex or schema.edge must be defined
|
|
6
|
+
at com.datastax.oss.dsbulk.workflow.commons.settings.SchemaSettings.init(SchemaSettings.java:329)
|
|
7
|
+
at com.datastax.oss.dsbulk.workflow.count.CountWorkflow.init(CountWorkflow.java:120)
|
|
8
|
+
at com.datastax.oss.dsbulk.runner.WorkflowThread.run(WorkflowThread.java:52)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
2023-05-24 15:50:00 INFO Username and password provided but auth provider not specified, inferring PlainTextAuthProvider
|
|
2
|
+
2023-05-24 15:50:00 INFO A cloud secure connect bundle was provided: ignoring all explicit contact points.
|
|
3
|
+
2023-05-24 15:50:00 INFO Operation directory: /home/val/Workspace/meanIT/admin/logs/COUNT_20230524-155000-297076
|
|
4
|
+
2023-05-24 15:50:02 ERROR Operation COUNT_20230524-155000-297076 failed: When schema.query is not defined, then either schema.keyspace or schema.graph must be defined, and either schema.table, schema.vertex or schema.edge must be defined.
|
|
5
|
+
java.lang.IllegalArgumentException: When schema.query is not defined, then either schema.keyspace or schema.graph must be defined, and either schema.table, schema.vertex or schema.edge must be defined
|
|
6
|
+
at com.datastax.oss.dsbulk.workflow.commons.settings.SchemaSettings.init(SchemaSettings.java:329)
|
|
7
|
+
at com.datastax.oss.dsbulk.workflow.count.CountWorkflow.init(CountWorkflow.java:120)
|
|
8
|
+
at com.datastax.oss.dsbulk.runner.WorkflowThread.run(WorkflowThread.java:52)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
https://raw.githubusercontent.com/awesome-astra/docs/main/docs/assets/cities.csv;1;148266;1:148266;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
2023-05-24 15:58:32 INFO Username and password provided but auth provider not specified, inferring PlainTextAuthProvider
|
|
2
|
+
2023-05-24 15:58:32 INFO A cloud secure connect bundle was provided: ignoring all explicit contact points.
|
|
3
|
+
2023-05-24 15:58:32 INFO A cloud secure connect bundle was provided and selected operation performs writes: changing default consistency level to LOCAL_QUORUM.
|
|
4
|
+
2023-05-24 15:58:32 INFO Operation directory: /home/val/Workspace/meanIT/admin/logs/LOAD_20230524-155832-351763
|
|
5
|
+
2023-05-24 15:58:35 INFO Setting executor.maxPerSecond not set when connecting to DataStax Astra: applying a limit of 9,000 ops/second based on the number of coordinators (3).
|
|
6
|
+
2023-05-24 15:58:35 INFO If your Astra database has higher limits, please define executor.maxPerSecond explicitly.
|
|
7
|
+
2023-05-24 15:58:52 INFO Operation LOAD_20230524-155832-351763 completed successfully in 15 seconds.
|
|
8
|
+
2023-05-24 15:58:52 INFO Records: total: 148,266, successful: 148,266, failed: 0
|
|
9
|
+
2023-05-24 15:58:52 INFO Batches: total: 4,801, size: 31.02 mean, 1 min, 32 max
|
|
10
|
+
2023-05-24 15:58:52 INFO Memory usage: used: 245 MB, free: 138 MB, allocated: 384 MB, available: 3,946 MB, total gc count: 25, total gc time: 59 ms
|
|
11
|
+
2023-05-24 15:58:52 INFO Writes: total: 148,266, successful: 148,266, failed: 0, in-flight: 0
|
|
12
|
+
2023-05-24 15:58:52 INFO Throughput: 8,972 writes/second
|
|
13
|
+
2023-05-24 15:58:52 INFO Latencies: mean 61.26, 75p 74.97, 99p 297.80, 999p 557.84 milliseconds
|
|
14
|
+
2023-05-24 15:58:54 INFO Final stats:
|
|
15
|
+
2023-05-24 15:58:54 INFO Records: total: 148,266, successful: 148,266, failed: 0
|
|
16
|
+
2023-05-24 15:58:54 INFO Batches: total: 4,801, size: 31.02 mean, 1 min, 32 max
|
|
17
|
+
2023-05-24 15:58:54 INFO Memory usage: used: 248 MB, free: 135 MB, allocated: 384 MB, available: 3,946 MB, total gc count: 25, total gc time: 59 ms
|
|
18
|
+
2023-05-24 15:58:54 INFO Writes: total: 148,266, successful: 148,266, failed: 0, in-flight: 0
|
|
19
|
+
2023-05-24 15:58:54 INFO Throughput: 7,998 writes/second
|
|
20
|
+
2023-05-24 15:58:54 INFO Latencies: mean 61.26, 75p 74.97, 99p 297.80, 999p 557.84 milliseconds
|
|
21
|
+
2023-05-24 15:58:54 INFO Checkpoints for the current operation were written to checkpoint.csv.
|
|
22
|
+
2023-05-24 15:58:54 INFO To resume the current operation, re-run it with the same settings, and add the following command line flag:
|
|
23
|
+
2023-05-24 15:58:54 INFO --dsbulk.log.checkpoint.file=/home/val/Workspace/meanIT/admin/logs/LOAD_20230524-155832-351763/checkpoint.csv
|