@mongoosejs/studio 0.3.3 → 0.3.5
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/backend/actions/Model/getDocuments.js +16 -7
- package/backend/actions/Model/getDocumentsStream.js +16 -9
- package/backend/actions/Model/getSuggestedProjection.js +33 -0
- package/backend/actions/Model/index.js +1 -0
- package/backend/authorize.js +1 -0
- package/backend/helpers/getSuggestedProjection.js +37 -0
- package/backend/helpers/parseFieldsParam.js +36 -0
- package/frontend/public/app.js +636 -172
- package/frontend/public/dark-theme.css +166 -0
- package/frontend/public/theme-variables.css +30 -0
- package/frontend/public/tw.css +110 -46
- package/frontend/src/api.js +7 -1
- package/frontend/src/dashboard/dashboard.js +1 -1
- package/frontend/src/list-mixed/list-mixed.html +0 -1
- package/frontend/src/list-string/list-string.html +0 -1
- package/frontend/src/models/models.css +25 -90
- package/frontend/src/models/models.html +213 -53
- package/frontend/src/models/models.js +557 -132
- package/frontend/src/navbar/navbar.js +1 -1
- package/frontend/src/task-by-name/task-by-name.html +11 -11
- package/frontend/src/task-single/task-single.html +4 -4
- package/frontend/src/tasks/task-details/task-details.html +6 -6
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ module.exports = app => app.component('navbar', {
|
|
|
17
17
|
showFlyout: false,
|
|
18
18
|
darkMode: typeof localStorage !== 'undefined' && localStorage.getItem('studio-theme') === 'dark'
|
|
19
19
|
}),
|
|
20
|
-
mounted: function
|
|
20
|
+
mounted: function() {
|
|
21
21
|
window.navbar = this;
|
|
22
22
|
const mobileMenuMask = document.querySelector('#mobile-menu-mask');
|
|
23
23
|
const mobileMenu = document.querySelector('#mobile-menu');
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
</div>
|
|
32
32
|
<div
|
|
33
33
|
v-if="numDocs > 0"
|
|
34
|
-
class="fixed bottom-0 left-0 right-0 z-10 px-4 py-4 bg-
|
|
34
|
+
class="fixed bottom-0 left-0 right-0 z-10 px-4 py-4 bg-surface border-t border-edge shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]"
|
|
35
35
|
>
|
|
36
36
|
<div class="flex flex-wrap items-center justify-between gap-4 max-w-6xl mx-auto">
|
|
37
37
|
<div class="flex items-center gap-6">
|
|
38
|
-
<p class="text-sm text-
|
|
39
|
-
<span class="font-medium text-
|
|
38
|
+
<p class="text-sm text-content-tertiary">
|
|
39
|
+
<span class="font-medium text-content">{{ Math.min((page - 1) * pageSize + 1, numDocs) }}–{{ Math.min(page * pageSize, numDocs) }}</span>
|
|
40
40
|
<span class="mx-1">of</span>
|
|
41
|
-
<span class="font-medium text-
|
|
42
|
-
<span class="ml-1 text-
|
|
41
|
+
<span class="font-medium text-content">{{ numDocs }}</span>
|
|
42
|
+
<span class="ml-1 text-content-tertiary">tasks</span>
|
|
43
43
|
</p>
|
|
44
44
|
<div class="flex items-center gap-2">
|
|
45
|
-
<label class="text-sm font-medium text-
|
|
45
|
+
<label class="text-sm font-medium text-content-secondary">Per page</label>
|
|
46
46
|
<select
|
|
47
47
|
v-model.number="pageSize"
|
|
48
48
|
@change="onPageSizeChange"
|
|
49
|
-
class="border border-
|
|
49
|
+
class="border border-edge rounded-md shadow-sm px-3 py-2 text-sm text-content-secondary bg-surface hover:border-edge-strong focus:outline-none focus:ring-2 focus:ring-primary focus:border-primary"
|
|
50
50
|
>
|
|
51
51
|
<option v-for="n in pageSizeOptions" :key="n" :value="n">{{ n }}</option>
|
|
52
52
|
</select>
|
|
@@ -57,21 +57,21 @@
|
|
|
57
57
|
type="button"
|
|
58
58
|
:disabled="page <= 1"
|
|
59
59
|
@click="goToPage(page - 1)"
|
|
60
|
-
class="inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-md border transition-colors disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-
|
|
60
|
+
class="inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-md border transition-colors disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-surface bg-surface text-content-secondary border-edge hover:bg-page hover:border-edge-strong"
|
|
61
61
|
>
|
|
62
62
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
63
63
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path>
|
|
64
64
|
</svg>
|
|
65
65
|
Previous
|
|
66
66
|
</button>
|
|
67
|
-
<span class="px-4 py-2 text-sm text-
|
|
68
|
-
Page <span class="font-semibold text-
|
|
67
|
+
<span class="px-4 py-2 text-sm text-content-tertiary min-w-[7rem] text-center">
|
|
68
|
+
Page <span class="font-semibold text-content">{{ page }}</span> of <span class="font-semibold text-content">{{ Math.max(1, Math.ceil(numDocs / pageSize)) }}</span>
|
|
69
69
|
</span>
|
|
70
70
|
<button
|
|
71
71
|
type="button"
|
|
72
72
|
:disabled="page >= Math.ceil(numDocs / pageSize)"
|
|
73
73
|
@click="goToPage(page + 1)"
|
|
74
|
-
class="inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-md border transition-colors disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-
|
|
74
|
+
class="inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-md border transition-colors disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-surface bg-surface text-content-secondary border-edge hover:bg-page hover:border-edge-strong"
|
|
75
75
|
>
|
|
76
76
|
Next
|
|
77
77
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
class="w-full px-3 py-2 border border-edge-strong rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 mb-4"
|
|
117
117
|
/>
|
|
118
118
|
<div class="flex gap-3">
|
|
119
|
-
<button @click="confirmRescheduleTask" class="flex-1 bg-blue-600 text-white px-4 py-2 rounded-md hover:
|
|
119
|
+
<button @click="confirmRescheduleTask" class="flex-1 bg-gradient-to-r from-blue-500 to-blue-600 text-white px-4 py-2 rounded-md hover:from-blue-600 hover:to-blue-700 font-medium">Reschedule</button>
|
|
120
120
|
<button @click="showRescheduleModal = false" class="flex-1 bg-gray-300 text-content-secondary px-4 py-2 rounded-md hover:bg-gray-400 font-medium">Cancel</button>
|
|
121
121
|
</div>
|
|
122
122
|
</div>
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
<p class="text-sm text-gray-600 mb-2">Run task <strong>{{ selectedTask?.id }}</strong> immediately?</p>
|
|
133
133
|
<p class="text-sm text-content-tertiary mb-4">This will execute the task right away, bypassing its scheduled time.</p>
|
|
134
134
|
<div class="flex gap-3">
|
|
135
|
-
<button @click="confirmRunTask" class="flex-1 bg-green-600 text-white px-4 py-2 rounded-md hover:
|
|
135
|
+
<button @click="confirmRunTask" class="flex-1 bg-gradient-to-r from-green-500 to-green-600 text-white px-4 py-2 rounded-md hover:from-green-600 hover:to-green-700 font-medium">Run Now</button>
|
|
136
136
|
<button @click="showRunModal = false" class="flex-1 bg-gray-300 text-content-secondary px-4 py-2 rounded-md hover:bg-gray-400 font-medium">Cancel</button>
|
|
137
137
|
</div>
|
|
138
138
|
</div>
|
|
@@ -148,8 +148,8 @@
|
|
|
148
148
|
<p class="text-sm text-gray-600 mb-2">Cancel task <strong>{{ selectedTask?.id }}</strong>?</p>
|
|
149
149
|
<p class="text-sm text-content-tertiary mb-4">This will permanently cancel the task and it cannot be undone.</p>
|
|
150
150
|
<div class="flex gap-3">
|
|
151
|
-
<button @click="confirmCancelTask" class="flex-1 bg-red-600 text-white px-4 py-2 rounded-md hover:
|
|
152
|
-
<button @click="showCancelModal = false" class="flex-1 bg-
|
|
151
|
+
<button @click="confirmCancelTask" class="flex-1 bg-gradient-to-r from-red-500 to-red-600 text-white px-4 py-2 rounded-md hover:from-red-600 hover:to-red-700 font-medium">Cancel Task</button>
|
|
152
|
+
<button @click="showCancelModal = false" class="flex-1 bg-muted hover:bg-page text-content-secondary px-4 py-2 rounded-md border border-edge-strong font-medium">Keep Task</button>
|
|
153
153
|
</div>
|
|
154
154
|
</div>
|
|
155
155
|
</template>
|
|
@@ -235,13 +235,13 @@
|
|
|
235
235
|
<div class="flex gap-3">
|
|
236
236
|
<button
|
|
237
237
|
@click="confirmRescheduleTask"
|
|
238
|
-
class="flex-1 bg-blue-600 text-white px-4 py-2 rounded-md hover:
|
|
238
|
+
class="flex-1 bg-gradient-to-r from-blue-500 to-blue-600 text-white px-4 py-2 rounded-md hover:from-blue-600 hover:to-blue-700 font-medium"
|
|
239
239
|
>
|
|
240
240
|
Reschedule
|
|
241
241
|
</button>
|
|
242
242
|
<button
|
|
243
243
|
@click="showRescheduleModal = false"
|
|
244
|
-
class="flex-1 bg-
|
|
244
|
+
class="flex-1 bg-muted hover:bg-page text-content-secondary px-4 py-2 rounded-md border border-edge-strong font-medium"
|
|
245
245
|
>
|
|
246
246
|
Cancel
|
|
247
247
|
</button>
|
|
@@ -276,13 +276,13 @@
|
|
|
276
276
|
<div class="flex gap-3">
|
|
277
277
|
<button
|
|
278
278
|
@click="confirmRunTask"
|
|
279
|
-
class="flex-1 bg-green-600 text-white px-4 py-2 rounded-md hover:
|
|
279
|
+
class="flex-1 bg-gradient-to-r from-green-500 to-green-600 text-white px-4 py-2 rounded-md hover:from-green-600 hover:to-green-700 font-medium"
|
|
280
280
|
>
|
|
281
281
|
Run Now
|
|
282
282
|
</button>
|
|
283
283
|
<button
|
|
284
284
|
@click="showRunModal = false"
|
|
285
|
-
class="flex-1 bg-
|
|
285
|
+
class="flex-1 bg-muted hover:bg-page text-content-secondary px-4 py-2 rounded-md border border-edge-strong font-medium"
|
|
286
286
|
>
|
|
287
287
|
Cancel
|
|
288
288
|
</button>
|
|
@@ -317,13 +317,13 @@
|
|
|
317
317
|
<div class="flex gap-3">
|
|
318
318
|
<button
|
|
319
319
|
@click="confirmCancelTask"
|
|
320
|
-
class="flex-1 bg-red-600 text-white px-4 py-2 rounded-md hover:
|
|
320
|
+
class="flex-1 bg-gradient-to-r from-red-500 to-red-600 text-white px-4 py-2 rounded-md hover:from-red-600 hover:to-red-700 font-medium"
|
|
321
321
|
>
|
|
322
322
|
Cancel Task
|
|
323
323
|
</button>
|
|
324
324
|
<button
|
|
325
325
|
@click="showCancelModal = false"
|
|
326
|
-
class="flex-1 bg-
|
|
326
|
+
class="flex-1 bg-muted hover:bg-page text-content-secondary px-4 py-2 rounded-md border border-edge-strong font-medium"
|
|
327
327
|
>
|
|
328
328
|
Keep Task
|
|
329
329
|
</button>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongoosejs/studio",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "A Mongoose-native MongoDB UI with schema-aware autocomplete, AI-assisted queries, and dashboards that understand your models - not just your data.",
|
|
5
5
|
"homepage": "https://mongoosestudio.app/",
|
|
6
6
|
"repository": {
|