@nethserver/ns8-ui-lib 0.0.49 → 0.0.53
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/dist/ns8-ui-lib.esm.js +143 -50
- package/dist/ns8-ui-lib.min.js +1 -1
- package/dist/ns8-ui-lib.ssr.js +162 -71
- package/package.json +1 -1
- package/src/lib-components/NsInfoCard.vue +48 -15
- package/src/lib-components/NsPasswordInput.vue +1 -1
- package/src/lib-components/NsProgressBar.vue +4 -4
- package/src/lib-components/NsStatusCard.vue +3 -3
- package/src/lib-components/NsSystemdServiceCard.vue +3 -3
- package/src/lib-components/NsToastNotification.vue +1 -1
package/dist/ns8-ui-lib.esm.js
CHANGED
|
@@ -1248,8 +1248,8 @@ var __vue_staticRenderFns__$n = [];
|
|
|
1248
1248
|
|
|
1249
1249
|
const __vue_inject_styles__$o = function (inject) {
|
|
1250
1250
|
if (!inject) return;
|
|
1251
|
-
inject("data-v-
|
|
1252
|
-
source: ".progress-bar-container[data-v-
|
|
1251
|
+
inject("data-v-57532057_0", {
|
|
1252
|
+
source: ".progress-bar-container[data-v-57532057]{width:100%;position:relative}.slider[data-v-57532057]{position:absolute;width:100%;height:5px;overflow-x:hidden}.line[data-v-57532057]{position:absolute;opacity:.4;width:100%;height:5px}.progress-line[data-v-57532057]{position:absolute;height:5px}.indeterminate-line[data-v-57532057]{position:absolute;opacity:.4;width:150%;height:5px}.indeterminate-subline[data-v-57532057]{position:absolute;height:5px}.inc[data-v-57532057]{animation:increase-data-v-57532057 2s infinite}.dec[data-v-57532057]{animation:decrease-data-v-57532057 2s .5s infinite}@keyframes increase-data-v-57532057{from{left:-5%;width:5%}to{left:130%;width:100%}}@keyframes decrease-data-v-57532057{from{left:-80%;width:80%}to{left:110%;width:10%}}",
|
|
1253
1253
|
map: undefined,
|
|
1254
1254
|
media: undefined
|
|
1255
1255
|
});
|
|
@@ -1257,7 +1257,7 @@ const __vue_inject_styles__$o = function (inject) {
|
|
|
1257
1257
|
/* scoped */
|
|
1258
1258
|
|
|
1259
1259
|
|
|
1260
|
-
const __vue_scope_id__$o = "data-v-
|
|
1260
|
+
const __vue_scope_id__$o = "data-v-57532057";
|
|
1261
1261
|
/* module identifier */
|
|
1262
1262
|
|
|
1263
1263
|
const __vue_module_identifier__$o = undefined;
|
|
@@ -6236,11 +6236,11 @@ var __vue_staticRenderFns__$l = [];
|
|
|
6236
6236
|
|
|
6237
6237
|
const __vue_inject_styles__$l = function (inject) {
|
|
6238
6238
|
if (!inject) return;
|
|
6239
|
-
inject("data-v-
|
|
6240
|
-
source: ".notification[data-v-
|
|
6239
|
+
inject("data-v-7385c86a_0", {
|
|
6240
|
+
source: ".notification[data-v-7385c86a]{margin-bottom:0;margin-right:0}.action[data-v-7385c86a]{padding-top:0;margin-bottom:0}.bx--toast-notification .bx--inline-notification__action-button.bx--btn--ghost[data-v-7385c86a]{margin-left:-16px}.notification-description-and-progress[data-v-7385c86a]{margin-top:.75rem;margin-bottom:.75rem}.fix-margin-bottom[data-v-7385c86a]{margin-bottom:0}.progress[data-v-7385c86a]{margin-top:.75rem}.progress-bar-spacer[data-v-7385c86a]{height:.5rem}.cv-notifiation.bx--toast-notification.notification[data-v-7385c86a]{width:26vw;min-width:20rem;margin-top:0}.notification-drawer .cv-notifiation.bx--toast-notification.notification[data-v-7385c86a]{margin-top:1rem}.notification-drawer .cv-notifiation.bx--toast-notification.notification[data-v-7385c86a]{width:100%;cursor:pointer}.notification-read[data-v-7385c86a]{border-color:#8d8d8d;color:#c6c6c6}.notification-read .bx--toast-notification__icon[data-v-7385c86a]{fill:currentColor}.notification-read .bx--toast-notification__subtitle[data-v-7385c86a]{color:#c6c6c6}.notification-read .bx--toast-notification__title[data-v-7385c86a]{font-weight:400}.cv-notifiation .timestamp[data-v-7385c86a]{margin-bottom:.75rem;line-height:1.29;color:#fff;text-decoration:underline}.cv-notifiation .timestamp button[data-v-7385c86a]{color:#c6c6c6}.bx--tooltip__trigger[data-v-7385c86a]:not(.bx--btn--icon-only){font-size:inherit}.cv-notifiation .timestamp .bx--tooltip__trigger[data-v-7385c86a]::before{border-bottom-color:#161616}div.row[data-v-7385c86a]:last-child{margin-bottom:1.5rem}.bx--toast-notification__details[data-v-7385c86a]{flex-grow:1}",
|
|
6241
6241
|
map: undefined,
|
|
6242
6242
|
media: undefined
|
|
6243
|
-
}), inject("data-v-
|
|
6243
|
+
}), inject("data-v-7385c86a_1", {
|
|
6244
6244
|
source: ".cv-notifiation .timestamp button span{background-color:#161616!important;border-left:1px solid #393939;border-right:1px solid #393939;border-bottom:1px solid #393939}",
|
|
6245
6245
|
map: undefined,
|
|
6246
6246
|
media: undefined
|
|
@@ -6249,7 +6249,7 @@ const __vue_inject_styles__$l = function (inject) {
|
|
|
6249
6249
|
/* scoped */
|
|
6250
6250
|
|
|
6251
6251
|
|
|
6252
|
-
const __vue_scope_id__$l = "data-v-
|
|
6252
|
+
const __vue_scope_id__$l = "data-v-7385c86a";
|
|
6253
6253
|
/* module identifier */
|
|
6254
6254
|
|
|
6255
6255
|
const __vue_module_identifier__$l = undefined;
|
|
@@ -6270,17 +6270,19 @@ var __vue_component__$G = __vue_component__$F;
|
|
|
6270
6270
|
//
|
|
6271
6271
|
var script$e = {
|
|
6272
6272
|
name: "NsInfoCard",
|
|
6273
|
-
//components added for storybook to work
|
|
6274
6273
|
components: {
|
|
6275
6274
|
NsSvg,
|
|
6276
|
-
|
|
6275
|
+
NsInlineNotification
|
|
6277
6276
|
},
|
|
6278
6277
|
props: {
|
|
6279
6278
|
title: {
|
|
6280
6279
|
type: String,
|
|
6281
|
-
required:
|
|
6280
|
+
required: false
|
|
6281
|
+
},
|
|
6282
|
+
description: {
|
|
6283
|
+
type: String,
|
|
6284
|
+
required: false
|
|
6282
6285
|
},
|
|
6283
|
-
description: String,
|
|
6284
6286
|
icon: {
|
|
6285
6287
|
type: [String, Object],
|
|
6286
6288
|
default: undefined,
|
|
@@ -6294,11 +6296,21 @@ var script$e = {
|
|
|
6294
6296
|
}
|
|
6295
6297
|
|
|
6296
6298
|
},
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6299
|
+
loading: Boolean,
|
|
6300
|
+
isErrorShown: false,
|
|
6301
|
+
errorTitle: String,
|
|
6302
|
+
errorDescription: String,
|
|
6301
6303
|
light: Boolean
|
|
6304
|
+
},
|
|
6305
|
+
computed: {
|
|
6306
|
+
hasMenuSlot() {
|
|
6307
|
+
return !!this.$slots.menu;
|
|
6308
|
+
},
|
|
6309
|
+
|
|
6310
|
+
hasContentSlot() {
|
|
6311
|
+
return !!this.$slots.content;
|
|
6312
|
+
}
|
|
6313
|
+
|
|
6302
6314
|
}
|
|
6303
6315
|
};
|
|
6304
6316
|
|
|
@@ -6319,23 +6331,40 @@ var __vue_render__$k = function () {
|
|
|
6319
6331
|
"kind": "standard",
|
|
6320
6332
|
"light": _vm.light
|
|
6321
6333
|
}
|
|
6322
|
-
}, [_vm.
|
|
6334
|
+
}, [_vm.hasMenuSlot ? _vm._t("menu") : _vm._e(), _vm._v(" "), _vm.icon ? _c('div', {
|
|
6323
6335
|
staticClass: "row"
|
|
6324
6336
|
}, [_c('NsSvg', {
|
|
6325
6337
|
attrs: {
|
|
6326
6338
|
"svg": _vm.icon
|
|
6327
6339
|
}
|
|
6328
|
-
})], 1) : _vm._e(), _vm._v(" "), _c('div', {
|
|
6340
|
+
})], 1) : _vm._e(), _vm._v(" "), _vm.isErrorShown ? _c('div', {
|
|
6341
|
+
staticClass: "row"
|
|
6342
|
+
}, [_c('NsInlineNotification', {
|
|
6343
|
+
attrs: {
|
|
6344
|
+
"kind": "error",
|
|
6345
|
+
"title": _vm.errorTitle,
|
|
6346
|
+
"description": _vm.errorDescription,
|
|
6347
|
+
"showCloseButton": false
|
|
6348
|
+
}
|
|
6349
|
+
})], 1) : _vm.loading ? _c('div', {
|
|
6350
|
+
staticClass: "row"
|
|
6351
|
+
}, [_c('cv-skeleton-text', {
|
|
6352
|
+
staticClass: "skeleton",
|
|
6353
|
+
attrs: {
|
|
6354
|
+
"paragraph": true,
|
|
6355
|
+
"line-count": 3
|
|
6356
|
+
}
|
|
6357
|
+
})], 1) : [_vm.title ? _c('div', {
|
|
6329
6358
|
staticClass: "row"
|
|
6330
6359
|
}, [_c('h3', {
|
|
6331
6360
|
staticClass: "title"
|
|
6332
|
-
}, [_vm._v(_vm._s(_vm.title))])]), _vm._v(" "), _vm.description ? _c('div', {
|
|
6361
|
+
}, [_vm._v(_vm._s(_vm.title))])]) : _vm._e(), _vm._v(" "), _vm.description ? _c('div', {
|
|
6333
6362
|
staticClass: "row"
|
|
6334
6363
|
}, [_c('div', {
|
|
6335
6364
|
staticClass: "description"
|
|
6336
|
-
}, [_vm._v(_vm._s(_vm.description))])]) : _vm._e(), _vm._v(" "), _c('div', {
|
|
6365
|
+
}, [_vm._v(_vm._s(_vm.description))])]) : _vm._e()], _vm._v(" "), _c('div', {
|
|
6337
6366
|
staticClass: "row slot"
|
|
6338
|
-
}, [_vm._t("content")], 2)], 2);
|
|
6367
|
+
}, [_vm.hasContentSlot ? _vm._t("content") : _vm._e()], 2)], 2);
|
|
6339
6368
|
};
|
|
6340
6369
|
|
|
6341
6370
|
var __vue_staticRenderFns__$k = [];
|
|
@@ -6343,8 +6372,8 @@ var __vue_staticRenderFns__$k = [];
|
|
|
6343
6372
|
|
|
6344
6373
|
const __vue_inject_styles__$k = function (inject) {
|
|
6345
6374
|
if (!inject) return;
|
|
6346
|
-
inject("data-v-
|
|
6347
|
-
source: ".info-card[data-v-
|
|
6375
|
+
inject("data-v-34e69a80_0", {
|
|
6376
|
+
source: ".info-card[data-v-34e69a80]{display:flex;flex-direction:column;justify-content:center;min-height:7rem;position:relative}.skeleton[data-v-34e69a80]{margin-top:.5rem;margin-left:auto;margin-right:auto}.row[data-v-34e69a80]{display:flex;align-items:center;justify-content:center;margin-bottom:.5rem}.title[data-v-34e69a80]{margin-left:.25rem;margin-right:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description[data-v-34e69a80]{margin-left:.25rem;margin-right:.25rem}.slot[data-v-34e69a80]{margin-top:.5rem}",
|
|
6348
6377
|
map: undefined,
|
|
6349
6378
|
media: undefined
|
|
6350
6379
|
});
|
|
@@ -6352,7 +6381,7 @@ const __vue_inject_styles__$k = function (inject) {
|
|
|
6352
6381
|
/* scoped */
|
|
6353
6382
|
|
|
6354
6383
|
|
|
6355
|
-
const __vue_scope_id__$k = "data-v-
|
|
6384
|
+
const __vue_scope_id__$k = "data-v-34e69a80";
|
|
6356
6385
|
/* module identifier */
|
|
6357
6386
|
|
|
6358
6387
|
const __vue_module_identifier__$k = undefined;
|
|
@@ -6495,8 +6524,8 @@ var __vue_staticRenderFns__$j = [];
|
|
|
6495
6524
|
|
|
6496
6525
|
const __vue_inject_styles__$j = function (inject) {
|
|
6497
6526
|
if (!inject) return;
|
|
6498
|
-
inject("data-v-
|
|
6499
|
-
source: ".status-card[data-v-
|
|
6527
|
+
inject("data-v-496044f0_0", {
|
|
6528
|
+
source: ".status-card[data-v-496044f0]{display:flex;flex-direction:column;justify-content:center}.row[data-v-496044f0]{display:flex;align-items:center;justify-content:center;margin-bottom:.5rem}.value[data-v-496044f0]{margin-left:.25rem;margin-right:.25rem}.label[data-v-496044f0]{margin-left:.25rem;margin-right:.25rem}.success-icon[data-v-496044f0]{margin-right:.25rem}.error-icon[data-v-496044f0]{margin-right:.25rem}.warning-icon[data-v-496044f0]{margin-right:.25rem}.stats[data-v-496044f0]{display:flex;align-items:center;margin-left:.5rem;margin-right:.5rem}",
|
|
6500
6529
|
map: undefined,
|
|
6501
6530
|
media: undefined
|
|
6502
6531
|
});
|
|
@@ -6504,7 +6533,7 @@ const __vue_inject_styles__$j = function (inject) {
|
|
|
6504
6533
|
/* scoped */
|
|
6505
6534
|
|
|
6506
6535
|
|
|
6507
|
-
const __vue_scope_id__$j = "data-v-
|
|
6536
|
+
const __vue_scope_id__$j = "data-v-496044f0";
|
|
6508
6537
|
/* module identifier */
|
|
6509
6538
|
|
|
6510
6539
|
const __vue_module_identifier__$j = undefined;
|
|
@@ -6640,8 +6669,8 @@ var __vue_staticRenderFns__$i = [];
|
|
|
6640
6669
|
|
|
6641
6670
|
const __vue_inject_styles__$i = function (inject) {
|
|
6642
6671
|
if (!inject) return;
|
|
6643
|
-
inject("data-v-
|
|
6644
|
-
source: ".service-card[data-v-
|
|
6672
|
+
inject("data-v-3dfcfe29_0", {
|
|
6673
|
+
source: ".service-card[data-v-3dfcfe29]{display:flex;flex-direction:column;justify-content:center}.row[data-v-3dfcfe29]{display:flex;align-items:center;justify-content:center;margin-bottom:.5rem}.service-name[data-v-3dfcfe29]{margin-left:.25rem;margin-right:.25rem}.success-icon[data-v-3dfcfe29]{margin-right:.25rem}.error-icon[data-v-3dfcfe29]{margin-right:.25rem}.warning-icon[data-v-3dfcfe29]{margin-right:.25rem}.stats[data-v-3dfcfe29]{display:flex;align-items:center;margin-left:.5rem;margin-right:.5rem}",
|
|
6645
6674
|
map: undefined,
|
|
6646
6675
|
media: undefined
|
|
6647
6676
|
});
|
|
@@ -6649,7 +6678,7 @@ const __vue_inject_styles__$i = function (inject) {
|
|
|
6649
6678
|
/* scoped */
|
|
6650
6679
|
|
|
6651
6680
|
|
|
6652
|
-
const __vue_scope_id__$i = "data-v-
|
|
6681
|
+
const __vue_scope_id__$i = "data-v-3dfcfe29";
|
|
6653
6682
|
/* module identifier */
|
|
6654
6683
|
|
|
6655
6684
|
const __vue_module_identifier__$i = undefined;
|
|
@@ -6795,7 +6824,7 @@ var UtilService = {
|
|
|
6795
6824
|
},
|
|
6796
6825
|
|
|
6797
6826
|
/**
|
|
6798
|
-
* Get app description using the locale of
|
|
6827
|
+
* Get app description using the locale of core context
|
|
6799
6828
|
*/
|
|
6800
6829
|
getAppDescription(app, coreContext) {
|
|
6801
6830
|
const langCode = coreContext.$root.$i18n.locale;
|
|
@@ -6810,7 +6839,7 @@ var UtilService = {
|
|
|
6810
6839
|
},
|
|
6811
6840
|
|
|
6812
6841
|
/**
|
|
6813
|
-
* Get app categories using the locale of
|
|
6842
|
+
* Get app categories using the locale of core context
|
|
6814
6843
|
*/
|
|
6815
6844
|
getAppCategories(app, coreContext) {
|
|
6816
6845
|
let i18nCategories = [];
|
|
@@ -6831,6 +6860,58 @@ var UtilService = {
|
|
|
6831
6860
|
*/
|
|
6832
6861
|
toggleAccordion(ev) {
|
|
6833
6862
|
this.$refs.accordion.state.map((item, index) => index === ev.changedIndex);
|
|
6863
|
+
},
|
|
6864
|
+
|
|
6865
|
+
/**
|
|
6866
|
+
* Used in Backup section
|
|
6867
|
+
* */
|
|
6868
|
+
getBackupScheduleDescription(schedule) {
|
|
6869
|
+
if (!schedule) {
|
|
6870
|
+
return "-";
|
|
6871
|
+
}
|
|
6872
|
+
|
|
6873
|
+
switch (schedule.interval) {
|
|
6874
|
+
case "hourly":
|
|
6875
|
+
if (schedule.minute == 0) {
|
|
6876
|
+
return this.$t("backup.every_hour");
|
|
6877
|
+
} else {
|
|
6878
|
+
return this.$tc("backup.minutes_past_the_hour", schedule.minute, {
|
|
6879
|
+
minutes: schedule.minute
|
|
6880
|
+
});
|
|
6881
|
+
}
|
|
6882
|
+
|
|
6883
|
+
case "daily":
|
|
6884
|
+
if (this.time24HourPattern.test(schedule.time)) {
|
|
6885
|
+
return this.$t("backup.every_day_at", {
|
|
6886
|
+
time: schedule.time
|
|
6887
|
+
});
|
|
6888
|
+
} else {
|
|
6889
|
+
return "-";
|
|
6890
|
+
}
|
|
6891
|
+
|
|
6892
|
+
case "weekly":
|
|
6893
|
+
if (this.time24HourPattern.test(schedule.time)) {
|
|
6894
|
+
return this.$t("backup.every_weekday_at_hour", {
|
|
6895
|
+
weekDay: this.$t("calendar." + schedule.weekDay),
|
|
6896
|
+
time: schedule.time
|
|
6897
|
+
});
|
|
6898
|
+
} else {
|
|
6899
|
+
return "-";
|
|
6900
|
+
}
|
|
6901
|
+
|
|
6902
|
+
case "monthly":
|
|
6903
|
+
if (this.time24HourPattern.test(schedule.time)) {
|
|
6904
|
+
return this.$t("backup.every_month_at_time", {
|
|
6905
|
+
dayNum: schedule.monthDay,
|
|
6906
|
+
time: schedule.time
|
|
6907
|
+
});
|
|
6908
|
+
} else {
|
|
6909
|
+
return "-";
|
|
6910
|
+
}
|
|
6911
|
+
|
|
6912
|
+
default:
|
|
6913
|
+
return "-";
|
|
6914
|
+
}
|
|
6834
6915
|
}
|
|
6835
6916
|
|
|
6836
6917
|
}
|
|
@@ -7096,8 +7177,8 @@ var __vue_staticRenderFns__$h = [];
|
|
|
7096
7177
|
|
|
7097
7178
|
const __vue_inject_styles__$h = function (inject) {
|
|
7098
7179
|
if (!inject) return;
|
|
7099
|
-
inject("data-v-
|
|
7100
|
-
source: ".new-password-container[data-v-
|
|
7180
|
+
inject("data-v-6ed70bae_0", {
|
|
7181
|
+
source: ".new-password-container[data-v-6ed70bae]{margin-bottom:1rem}.new-password[data-v-6ed70bae]{margin-bottom:.25rem}.confirm-password[data-v-6ed70bae]{margin-bottom:.25rem}.password-meter[data-v-6ed70bae]{display:flex}@media (min-width:672px){.password-meter[data-v-6ed70bae]{max-width:38rem}}.requirement[data-v-6ed70bae]{padding:.2rem;margin-left:.2rem;margin-right:.2rem;background-color:#f4f4f4;text-align:center;font-size:.75rem;line-height:1.34;letter-spacing:.32px}.requirement-light[data-v-6ed70bae]{background-color:#fff}.requirement[data-v-6ed70bae]:first-child{margin-left:0}.requirement-ok[data-v-6ed70bae]{color:#fff;background-color:#198038}.requirement-disabled[data-v-6ed70bae]{color:#c6c6c6;background-color:#f4f4f4}",
|
|
7101
7182
|
map: undefined,
|
|
7102
7183
|
media: undefined
|
|
7103
7184
|
});
|
|
@@ -7105,7 +7186,7 @@ const __vue_inject_styles__$h = function (inject) {
|
|
|
7105
7186
|
/* scoped */
|
|
7106
7187
|
|
|
7107
7188
|
|
|
7108
|
-
const __vue_scope_id__$h = "data-v-
|
|
7189
|
+
const __vue_scope_id__$h = "data-v-6ed70bae";
|
|
7109
7190
|
/* module identifier */
|
|
7110
7191
|
|
|
7111
7192
|
const __vue_module_identifier__$h = undefined;
|
|
@@ -9166,7 +9247,7 @@ var __vue_component__$1 = __vue_component__;
|
|
|
9166
9247
|
var queryParam = {
|
|
9167
9248
|
name: "QueryParamService",
|
|
9168
9249
|
methods: {
|
|
9169
|
-
// used by
|
|
9250
|
+
// used by core and external apps to dynamically register a watch for every object inside data.q
|
|
9170
9251
|
watchQueryData(context) {
|
|
9171
9252
|
if (context.q) {
|
|
9172
9253
|
Object.keys(context.q).forEach(dataItem => {
|
|
@@ -9204,10 +9285,10 @@ var queryParam = {
|
|
|
9204
9285
|
queryParams.push(key + "=" + encodeURIComponent(value));
|
|
9205
9286
|
}
|
|
9206
9287
|
|
|
9207
|
-
const urlWithParams = window.parent.
|
|
9288
|
+
const urlWithParams = window.parent.core.$route.path + "?" + queryParams.join("&");
|
|
9208
9289
|
|
|
9209
|
-
if (window.parent.
|
|
9210
|
-
window.parent.
|
|
9290
|
+
if (window.parent.core.$route.fullPath != urlWithParams) {
|
|
9291
|
+
window.parent.core.$router.replace(urlWithParams);
|
|
9211
9292
|
}
|
|
9212
9293
|
},
|
|
9213
9294
|
|
|
@@ -9278,7 +9359,7 @@ var queryParam = {
|
|
|
9278
9359
|
}
|
|
9279
9360
|
},
|
|
9280
9361
|
|
|
9281
|
-
// used only by
|
|
9362
|
+
// used only by core to extract query parameters from URL
|
|
9282
9363
|
getQueryParamsForCore() {
|
|
9283
9364
|
if (!window.location.hash.includes("?") || window.location.hash.split("?").length < 2) {
|
|
9284
9365
|
return {};
|
|
@@ -9373,7 +9454,7 @@ var task = {
|
|
|
9373
9454
|
|
|
9374
9455
|
createClusterTaskForApp(taskData) {
|
|
9375
9456
|
const token = this.getFromStorage("loginInfo") ? this.getFromStorage("loginInfo").token : "";
|
|
9376
|
-
return this.axios.post(`${window.parent.
|
|
9457
|
+
return this.axios.post(`${window.parent.core.$root.apiUrl}/cluster/tasks`, taskData, {
|
|
9377
9458
|
headers: {
|
|
9378
9459
|
Authorization: `Bearer ${token}`
|
|
9379
9460
|
}
|
|
@@ -9382,7 +9463,7 @@ var task = {
|
|
|
9382
9463
|
|
|
9383
9464
|
createModuleTaskForApp(moduleId, taskData) {
|
|
9384
9465
|
const token = this.getFromStorage("loginInfo") ? this.getFromStorage("loginInfo").token : "";
|
|
9385
|
-
return this.axios.post(`${window.parent.
|
|
9466
|
+
return this.axios.post(`${window.parent.core.$root.apiUrl}/module/${moduleId}/tasks`, taskData, {
|
|
9386
9467
|
headers: {
|
|
9387
9468
|
Authorization: `Bearer ${token}`
|
|
9388
9469
|
}
|
|
@@ -9399,8 +9480,8 @@ var task = {
|
|
|
9399
9480
|
},
|
|
9400
9481
|
|
|
9401
9482
|
getTaskTitle(task) {
|
|
9402
|
-
if (task && task.context && task.context.
|
|
9403
|
-
return task.context.
|
|
9483
|
+
if (task && task.context && task.context.extra && task.context.extra.title) {
|
|
9484
|
+
return task.context.extra.title;
|
|
9404
9485
|
} else {
|
|
9405
9486
|
return "";
|
|
9406
9487
|
}
|
|
@@ -9441,28 +9522,40 @@ var task = {
|
|
|
9441
9522
|
},
|
|
9442
9523
|
|
|
9443
9524
|
getTaskStatusDescription(task, rootTask = true) {
|
|
9444
|
-
|
|
9525
|
+
let taskLabel = task.context.action; // use taskName instead of action, if available
|
|
9526
|
+
|
|
9527
|
+
if (task.context.extra && task.context.extra.taskName) {
|
|
9528
|
+
taskLabel = task.context.extra.taskName;
|
|
9529
|
+
}
|
|
9530
|
+
|
|
9445
9531
|
const taskOrSubtask = rootTask ? "task" : "subtask";
|
|
9532
|
+
let taskPrefix = "";
|
|
9533
|
+
|
|
9534
|
+
if (task.result && task.result.file) {
|
|
9535
|
+
taskPrefix = task.result.file.split("task/")[0];
|
|
9536
|
+
}
|
|
9537
|
+
|
|
9538
|
+
taskLabel = taskPrefix + taskLabel;
|
|
9446
9539
|
|
|
9447
9540
|
switch (task.status) {
|
|
9448
9541
|
case "aborted":
|
|
9449
9542
|
return this.$t("task." + taskOrSubtask + "_failed", {
|
|
9450
|
-
|
|
9543
|
+
task: taskLabel
|
|
9451
9544
|
});
|
|
9452
9545
|
|
|
9453
9546
|
case "validation-failed":
|
|
9454
9547
|
return this.$t("task." + taskOrSubtask + "_failed_validation", {
|
|
9455
|
-
|
|
9548
|
+
task: taskLabel
|
|
9456
9549
|
});
|
|
9457
9550
|
|
|
9458
9551
|
case "completed":
|
|
9459
9552
|
return this.$t("task." + taskOrSubtask + "_completed", {
|
|
9460
|
-
|
|
9553
|
+
task: taskLabel
|
|
9461
9554
|
});
|
|
9462
9555
|
|
|
9463
9556
|
case "pending":
|
|
9464
9557
|
return this.$t("task." + taskOrSubtask + "_pending", {
|
|
9465
|
-
|
|
9558
|
+
task: taskLabel
|
|
9466
9559
|
});
|
|
9467
9560
|
|
|
9468
9561
|
default:
|
|
@@ -9477,7 +9570,7 @@ var task = {
|
|
|
9477
9570
|
|
|
9478
9571
|
createErrorNotificationForApp(err, message) {
|
|
9479
9572
|
console.error(err);
|
|
9480
|
-
window.parent.
|
|
9573
|
+
window.parent.core.$root.$emit("createErrorNotification", err, message);
|
|
9481
9574
|
}
|
|
9482
9575
|
|
|
9483
9576
|
}
|
|
@@ -9554,7 +9647,7 @@ var pageTitle = {
|
|
|
9554
9647
|
const pageTitle = getPageTitle(this);
|
|
9555
9648
|
|
|
9556
9649
|
if (pageTitle) {
|
|
9557
|
-
// window.document would be ok for
|
|
9650
|
+
// window.document would be ok for core, but with window.parent.document we support external apps too (window.parent == window, if it's the root window)
|
|
9558
9651
|
window.parent.document.title = pageTitle;
|
|
9559
9652
|
}
|
|
9560
9653
|
}
|