@mongoosejs/studio 0.0.22 → 0.0.24

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.
Files changed (36) hide show
  1. package/backend/actions/Dashboard/getDashboard.js +18 -0
  2. package/backend/actions/Dashboard/index.js +3 -1
  3. package/backend/actions/Dashboard/updateDashboard.js +25 -0
  4. package/backend/index.js +6 -2
  5. package/frontend/public/app.js +405 -29759
  6. package/frontend/public/index.html +3 -0
  7. package/frontend/public/tw.css +119 -0
  8. package/frontend/src/api.js +12 -0
  9. package/frontend/src/create-document/create-document.html +20 -1
  10. package/frontend/src/create-document/create-document.js +13 -27
  11. package/frontend/src/dashboard/dashboard.html +13 -4
  12. package/frontend/src/dashboard/dashboard.js +25 -11
  13. package/frontend/src/dashboard/edit-dashboard/edit-dashboard.html +5 -0
  14. package/frontend/src/dashboard/edit-dashboard/edit-dashboard.js +48 -0
  15. package/frontend/src/dashboards/dashboards.html +5 -0
  16. package/frontend/src/dashboards/dashboards.js +20 -0
  17. package/frontend/src/document/confirm-changes/confirm-changes.html +18 -0
  18. package/frontend/src/document/confirm-changes/confirm-changes.js +24 -0
  19. package/frontend/src/document/document.html +11 -5
  20. package/frontend/src/document/document.js +7 -1
  21. package/frontend/src/edit-array/edit-array.html +1 -7
  22. package/frontend/src/edit-array/edit-array.js +27 -9
  23. package/frontend/src/edit-default/edit-default.html +1 -1
  24. package/frontend/src/index.js +3 -1
  25. package/frontend/src/models/models.css +0 -2
  26. package/frontend/src/models/models.js +0 -4
  27. package/frontend/src/routes.js +5 -0
  28. package/package.json +1 -6
  29. package/frontend/src/dashboard-details/dashboard-details.html +0 -8
  30. package/frontend/src/dashboard-details/dashboard-details.js +0 -10
  31. package/logs/COUNT_20230524-154120-151469/operation.log +0 -8
  32. package/logs/COUNT_20230524-154408-077670/operation.log +0 -22
  33. package/logs/COUNT_20230524-154414-431706/operation.log +0 -8
  34. package/logs/COUNT_20230524-155000-297076/operation.log +0 -8
  35. package/logs/LOAD_20230524-155832-351763/checkpoint.csv +0 -1
  36. package/logs/LOAD_20230524-155832-351763/operation.log +0 -23
@@ -2,6 +2,14 @@
2
2
 
3
3
  const template = require('./edit-array.html');
4
4
 
5
+ const { BSON, EJSON } = require('bson');
6
+
7
+ const ObjectId = new Proxy(BSON.ObjectId, {
8
+ apply (target, thisArg, argumentsList) {
9
+ return new target(...argumentsList);
10
+ }
11
+ });
12
+
5
13
  const appendCSS = require('../appendCSS');
6
14
  appendCSS(require('./edit-array.css'));
7
15
 
@@ -10,16 +18,26 @@ module.exports = app => app.component('edit-array', {
10
18
  props: ['value'],
11
19
  data: () => ({ currentValue: null }),
12
20
  mounted() {
13
- this.currentValue = this.value;
21
+ this.currentValue = JSON.stringify(this.value, null, ' ').trim();
22
+ this.$refs.arrayEditor.value = this.currentValue;
23
+ this.editor = CodeMirror.fromTextArea(this.$refs.arrayEditor, {
24
+ mode: 'javascript',
25
+ lineNumbers: true
26
+ });
27
+ },
28
+ watch: {
29
+ currentValue() {
30
+ try {
31
+ this.$emit('input', eval(this.currentValue));
32
+ } catch (err) {
33
+ this.$emit('error', err);
34
+ }
35
+ }
14
36
  },
15
- methods: {
16
- onUpdate() {
17
- this.$emit('input', this.currentValue);
18
- },
19
- removeValue(i) {
20
- this.currentValue.splice(i, 1);
21
- this.$emit('input', this.currentValue);
37
+ beforeDestroy() {
38
+ if (this.editor) {
39
+ this.editor.toTextArea();
22
40
  }
23
41
  },
24
- emits: ['input']
42
+ emits: ['input', 'error']
25
43
  });
@@ -1,3 +1,3 @@
1
1
  <div>
2
- <input type="text" :value="value" @input="$emit('input', $event.target.value)">
2
+ <input type="text" :value="value" @input="$emit('input', $event.target.value)" class="w-full p-1 border border-gray-300 outline-0">
3
3
  </div>
@@ -9,11 +9,13 @@ const app = Vue.createApp({
9
9
  require('./async-button/async-button')(app);
10
10
  require('./charts/charts')(app);
11
11
  require('./create-document/create-document')(app);
12
+ require('./dashboards/dashboards')(app);
12
13
  require('./dashboard/dashboard')(app);
13
- require('./dashboard-details/dashboard-details')(app);
14
+ require('./dashboard/edit-dashboard/edit-dashboard')(app)
14
15
  require('./detail-array/detail-array')(app);
15
16
  require('./detail-default/detail-default')(app);
16
17
  require('./document/document')(app);
18
+ require('./document/confirm-changes/confirm-changes')(app);
17
19
  require('./edit-array/edit-array')(app);
18
20
  require('./edit-default/edit-default')(app);
19
21
  require('./edit-number/edit-number')(app);
@@ -80,8 +80,6 @@
80
80
  }
81
81
 
82
82
  .models textarea {
83
- width: 100%;
84
- height: 600px;
85
83
  font-size: 1.2em;
86
84
  }
87
85
 
@@ -5,10 +5,6 @@ const template = require('./models.html');
5
5
  const mpath = require('mpath');
6
6
  const { BSON, EJSON } = require('bson');
7
7
 
8
- const { EditorState } = require('@codemirror/state');
9
- const { lineNumbers } = require('@codemirror/view')
10
- const { EditorView, basicSetup } = require('codemirror');
11
- const { javascript } = require('@codemirror/lang-javascript');
12
8
 
13
9
 
14
10
  const ObjectId = new Proxy(BSON.ObjectId, {
@@ -24,6 +24,11 @@ module.exports = [
24
24
  {
25
25
  path: '/dashboards',
26
26
  name: 'dashboards',
27
+ component: 'dashboards'
28
+ },
29
+ {
30
+ path: '/dashboard',
31
+ name: 'dashboard',
27
32
  component: 'dashboard'
28
33
  }
29
34
  ];
package/package.json CHANGED
@@ -1,13 +1,8 @@
1
1
  {
2
2
  "name": "@mongoosejs/studio",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "dependencies": {
5
- "@codemirror/commands": "^6.5.0",
6
- "@codemirror/lang-javascript": "^6.2.2",
7
- "@codemirror/state": "^6.4.1",
8
- "@codemirror/view": "^6.26.3",
9
5
  "archetype": "0.13.0",
10
- "codemirror": "^6.0.1",
11
6
  "csv-stringify": "6.3.0",
12
7
  "ejson": "^2.2.3",
13
8
  "extrovert": "0.0.24",
@@ -1,8 +0,0 @@
1
- <div class="dashboard-details">
2
- <div v-if="dashboard">
3
- {{dashboard.name}}
4
- </div>
5
- <div v-if="!dashboard">
6
- No dashboard with the given id could be found.
7
- </div>
8
- </div>
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- const api = require('../api');
4
- const template = require('./dashboard-details.html');
5
-
6
-
7
- module.exports = app => app.component('dashboard-details', {
8
- template: template,
9
- props: ['dashboard']
10
- });
@@ -1,8 +0,0 @@
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)
@@ -1,22 +0,0 @@
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)
@@ -1,8 +0,0 @@
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)
@@ -1,8 +0,0 @@
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)
@@ -1 +0,0 @@
1
- https://raw.githubusercontent.com/awesome-astra/docs/main/docs/assets/cities.csv;1;148266;1:148266;
@@ -1,23 +0,0 @@
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