@adminforth/background-jobs 1.2.3 → 1.2.4
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/build.log +2 -2
- package/custom/JobInfoPopup.vue +8 -3
- package/custom/utils.ts +1 -0
- package/dist/custom/JobInfoPopup.vue +8 -3
- package/dist/custom/utils.ts +1 -0
- package/dist/index.js +1 -0
- package/index.ts +1 -0
- package/package.json +1 -1
package/build.log
CHANGED
|
@@ -11,5 +11,5 @@ custom/StateToIcon.vue
|
|
|
11
11
|
custom/tsconfig.json
|
|
12
12
|
custom/utils.ts
|
|
13
13
|
|
|
14
|
-
sent 11,
|
|
15
|
-
total size is
|
|
14
|
+
sent 11,734 bytes received 134 bytes 23,736.00 bytes/sec
|
|
15
|
+
total size is 11,249 speedup is 0.95
|
package/custom/JobInfoPopup.vue
CHANGED
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
<div class="flex flex-col w-full min-w-96">
|
|
3
3
|
<div class="flex items-center mb-1">
|
|
4
4
|
<h2 class="text-lg font-semibold dark:text-white">{{ job.name }}</h2>
|
|
5
|
-
<p class="ml-2 text-xs text-gray-600 dark:text-gray-200 h-full"> {{ getTimeAgoString(new Date(job.createdAt)) }}</p>
|
|
6
|
-
<
|
|
7
|
-
|
|
5
|
+
<p class="ml-2 text-xs text-gray-600 dark:text-gray-200 h-full">{{ t('Created:') }} {{ getTimeAgoString(new Date(job.createdAt)) }}</p>
|
|
6
|
+
<div class="ml-auto flex flex-col items-start">
|
|
7
|
+
<div class="flex items-center">
|
|
8
|
+
<p class=" text-gray-800 dark:text-white h-full"> {{ t('Progress:') }} <span class="font-semibold" >{{ job.progress }}%</span></p>
|
|
9
|
+
<StateToIcon :job="job" />
|
|
10
|
+
</div>
|
|
11
|
+
<p class="text-xs text-gray-600 dark:text-gray-200 h-full" v-if="job.finishedAt"> {{ t('Finished:') }} {{ getTimeAgoString(new Date(job.finishedAt)) }}</p>
|
|
12
|
+
</div>
|
|
8
13
|
</div>
|
|
9
14
|
<div class="flex items-center gap-4 w-full">
|
|
10
15
|
<ProgressBar
|
package/custom/utils.ts
CHANGED
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
<div class="flex flex-col w-full min-w-96">
|
|
3
3
|
<div class="flex items-center mb-1">
|
|
4
4
|
<h2 class="text-lg font-semibold dark:text-white">{{ job.name }}</h2>
|
|
5
|
-
<p class="ml-2 text-xs text-gray-600 dark:text-gray-200 h-full"> {{ getTimeAgoString(new Date(job.createdAt)) }}</p>
|
|
6
|
-
<
|
|
7
|
-
|
|
5
|
+
<p class="ml-2 text-xs text-gray-600 dark:text-gray-200 h-full">{{ t('Created:') }} {{ getTimeAgoString(new Date(job.createdAt)) }}</p>
|
|
6
|
+
<div class="ml-auto flex flex-col items-start">
|
|
7
|
+
<div class="flex items-center">
|
|
8
|
+
<p class=" text-gray-800 dark:text-white h-full"> {{ t('Progress:') }} <span class="font-semibold" >{{ job.progress }}%</span></p>
|
|
9
|
+
<StateToIcon :job="job" />
|
|
10
|
+
</div>
|
|
11
|
+
<p class="text-xs text-gray-600 dark:text-gray-200 h-full" v-if="job.finishedAt"> {{ t('Finished:') }} {{ getTimeAgoString(new Date(job.finishedAt)) }}</p>
|
|
12
|
+
</div>
|
|
8
13
|
</div>
|
|
9
14
|
<div class="flex items-center gap-4 w-full">
|
|
10
15
|
<ProgressBar
|
package/dist/custom/utils.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -383,6 +383,7 @@ export default class BackgroundJobsPlugin extends AdminForthPlugin {
|
|
|
383
383
|
id: job[resourcePk],
|
|
384
384
|
name: job[this.options.nameField],
|
|
385
385
|
createdAt: job[this.options.createdAtField],
|
|
386
|
+
finishedAt: job[this.options.finishedAtField] || null,
|
|
386
387
|
status: job[this.options.statusField],
|
|
387
388
|
progress: job[this.options.progressField],
|
|
388
389
|
customComponent: this.jobCustomComponents[job[this.options.jobHandlerField]],
|
package/index.ts
CHANGED
|
@@ -413,6 +413,7 @@ export default class BackgroundJobsPlugin extends AdminForthPlugin {
|
|
|
413
413
|
id: job[resourcePk],
|
|
414
414
|
name: job[this.options.nameField],
|
|
415
415
|
createdAt: job[this.options.createdAtField],
|
|
416
|
+
finishedAt: job[this.options.finishedAtField] || null,
|
|
416
417
|
status: job[this.options.statusField],
|
|
417
418
|
progress: job[this.options.progressField],
|
|
418
419
|
customComponent: this.jobCustomComponents[job[this.options.jobHandlerField]],
|