@nethserver/ns8-ui-lib 1.3.0 → 1.3.2

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.
@@ -9095,7 +9095,7 @@ var script$h = {
9095
9095
  required: true
9096
9096
  },
9097
9097
  status: {
9098
- type: Array,
9098
+ type: Object,
9099
9099
  required: true
9100
9100
  },
9101
9101
  repositoryLabel: {
@@ -9184,8 +9184,8 @@ var __vue_staticRenderFns__$p = [];
9184
9184
 
9185
9185
  const __vue_inject_styles__$r = function (inject) {
9186
9186
  if (!inject) return;
9187
- inject("data-v-5c5848fc_0", {
9188
- source: ".ns-backup-card-details[data-v-5c5848fc]{display:contents}.tr[data-v-5c5848fc]{display:table-row}.td[data-v-5c5848fc]{display:table-cell}.label[data-v-5c5848fc]{padding-right:.75rem;font-weight:700;text-align:right;padding-bottom:.5rem}",
9187
+ inject("data-v-b3150a14_0", {
9188
+ source: ".ns-backup-card-details[data-v-b3150a14]{display:contents}.tr[data-v-b3150a14]{display:table-row}.td[data-v-b3150a14]{display:table-cell}.label[data-v-b3150a14]{padding-right:.75rem;font-weight:700;text-align:right;padding-bottom:.5rem}",
9189
9189
  map: undefined,
9190
9190
  media: undefined
9191
9191
  });
@@ -9193,7 +9193,7 @@ const __vue_inject_styles__$r = function (inject) {
9193
9193
  /* scoped */
9194
9194
 
9195
9195
 
9196
- const __vue_scope_id__$r = "data-v-5c5848fc";
9196
+ const __vue_scope_id__$r = "data-v-b3150a14";
9197
9197
  /* module identifier */
9198
9198
 
9199
9199
  const __vue_module_identifier__$r = undefined;
@@ -9275,6 +9275,10 @@ var script$g = {
9275
9275
  type: String,
9276
9276
  default: "Show more"
9277
9277
  },
9278
+ multipleUncertainStatusLabel: {
9279
+ type: String,
9280
+ default: "Some backups failed or are pending"
9281
+ },
9278
9282
  moduleId: {
9279
9283
  type: String,
9280
9284
  required: true
@@ -9305,10 +9309,17 @@ var script$g = {
9305
9309
  data() {
9306
9310
  return {
9307
9311
  backupsContainingInstance: [],
9308
- status: []
9312
+ status: {},
9313
+ summaryStatus: undefined
9309
9314
  };
9310
9315
  },
9311
9316
 
9317
+ computed: {
9318
+ singleBackup() {
9319
+ return this.backupsContainingInstance.length === 1 ? this.backupsContainingInstance[0] : null;
9320
+ }
9321
+
9322
+ },
9312
9323
  watch: {
9313
9324
  repositories: function () {
9314
9325
  this.updateData();
@@ -9338,8 +9349,15 @@ var script$g = {
9338
9349
 
9339
9350
  for (const backup of this.backupsContainingInstance) {
9340
9351
  const instance = backup.instances.find(i => i.module_id == this.moduleId);
9341
- const status = instance.status;
9342
- this.status[backup.id] = status;
9352
+ const instanceStatus = instance.status;
9353
+ this.status[backup.id] = instanceStatus; // overwrite summary status if:
9354
+ // - it is undefined (first time loading)
9355
+ // - the status is not successful
9356
+ // - the status is null (not run yet) and the previous status was true (successful)
9357
+
9358
+ if (this.summaryStatus === undefined || instanceStatus && instanceStatus.success === false || instanceStatus && instanceStatus.success === null && this.summaryStatus === true) {
9359
+ this.summaryStatus = instanceStatus;
9360
+ }
9343
9361
  }
9344
9362
  },
9345
9363
 
@@ -9396,69 +9414,53 @@ var __vue_render__$o = function () {
9396
9414
  }
9397
9415
  }), _vm._v(" "), _c('span', [_vm._v("\n " + _vm._s(_vm.noBackupMessage) + "\n ")])], 1)] : [_c('div', {
9398
9416
  staticClass: "backups"
9399
- }, _vm._l(_vm.backupsContainingInstance, function (backup) {
9400
- return _c('div', {
9401
- key: backup.id,
9402
- staticClass: "backup"
9403
- }, [_vm.backupsContainingInstance.length > 1 ? _c('div', {
9404
- staticClass: "row"
9405
- }, [_c('h5', {
9406
- staticClass: "title"
9407
- }, [_vm._v("\n " + _vm._s(backup.name) + "\n ")])]) : _vm._e(), _vm._v(" "), _c('div', {
9408
- staticClass: "table-wrapper"
9409
- }, [_c('div', {
9410
- staticClass: "table"
9411
- }, [_c('div', {
9412
- staticClass: "tr"
9413
- }, [_c('div', {
9414
- staticClass: "td label"
9415
- }, [_vm._v(_vm._s(_vm.statusLabel))]), _vm._v(" "), _c('div', {
9416
- staticClass: "td status"
9417
- }, [!backup.enabled ? _c('span', {
9418
- staticClass: "ns-warning"
9419
- }, [_vm._v("\n " + _vm._s(_vm.backupDisabledLabel) + "\n ")]) : _vm.status[backup.id] && _vm.status[backup.id].success == true ? _c('span', {
9420
- staticClass: "ns-success"
9421
- }, [_c('span', [_vm._v(_vm._s(_vm.statusSuccessLabel))])]) : _vm.status[backup.id] && _vm.status[backup.id].success == false ? _c('span', {
9422
- staticClass: "ns-error"
9423
- }, [_vm._v("\n " + _vm._s(_vm.statusErrorLabel) + "\n ")]) : _c('span', {
9424
- staticClass: "ns-warning"
9425
- }, [_vm._v("\n " + _vm._s(_vm.statusNotRunLabel) + "\n ")])])]), _vm._v(" "), _vm.backupsContainingInstance.length == 1 ? _c('NsBackupCardDetails', {
9426
- attrs: {
9427
- "backup": backup,
9428
- "status": _vm.status,
9429
- "repositoryLabel": _vm.repositoryLabel,
9430
- "completedLabel": _vm.completedLabel,
9431
- "durationLabel": _vm.durationLabel,
9432
- "totalSizeLabel": _vm.totalSizeLabel,
9433
- "totalFileCountLabel": _vm.totalFileCountLabel
9434
- }
9435
- }) : _vm._e()], 1)]), _vm._v(" "), _vm.backupsContainingInstance.length > 1 ? _c('div', {
9436
- staticClass: "table-wrapper"
9437
- }, [_c('div', {
9438
- staticClass: "table"
9439
- }, [_c('cv-accordion', {
9440
- ref: "accordion",
9441
- refInFor: true
9442
- }, [_c('cv-accordion-item', {
9443
- attrs: {
9444
- "open": _vm.toggleAccordion[0]
9445
- }
9446
- }, [_c('template', {
9447
- slot: "title"
9448
- }, [_vm._v(_vm._s(_vm.showMoreLabel))]), _vm._v(" "), _c('template', {
9449
- slot: "content"
9450
- }, [_c('NsBackupCardDetails', {
9451
- attrs: {
9452
- "backup": backup,
9453
- "status": _vm.status,
9454
- "repositoryLabel": _vm.repositoryLabel,
9455
- "completedLabel": _vm.completedLabel,
9456
- "durationLabel": _vm.durationLabel,
9457
- "totalSizeLabel": _vm.totalSizeLabel,
9458
- "totalFileCountLabel": _vm.totalFileCountLabel
9459
- }
9460
- })], 1)], 2)], 1)], 1)]) : _vm._e()]);
9461
- }), 0)], _vm._v(" "), _c('div', [_c('div', {
9417
+ }, [_vm.backupsContainingInstance.length == 1 ? _c('div', {
9418
+ staticClass: "backup"
9419
+ }, [_c('div', {
9420
+ staticClass: "table-wrapper"
9421
+ }, [_c('div', {
9422
+ staticClass: "table"
9423
+ }, [_c('div', {
9424
+ staticClass: "tr"
9425
+ }, [_c('div', {
9426
+ staticClass: "td label"
9427
+ }, [_vm._v(_vm._s(_vm.statusLabel))]), _vm._v(" "), _c('div', {
9428
+ staticClass: "td status"
9429
+ }, [!_vm.singleBackup.enabled ? _c('span', {
9430
+ staticClass: "ns-warning"
9431
+ }, [_vm._v("\n " + _vm._s(_vm.backupDisabledLabel) + "\n ")]) : _vm.status[_vm.singleBackup.id] && _vm.status[_vm.singleBackup.id].success == true ? _c('span', {
9432
+ staticClass: "ns-success"
9433
+ }, [_c('span', [_vm._v(_vm._s(_vm.statusSuccessLabel))])]) : _vm.status[_vm.singleBackup.id] && _vm.status[_vm.singleBackup.id].success == false ? _c('span', {
9434
+ staticClass: "ns-error"
9435
+ }, [_vm._v("\n " + _vm._s(_vm.statusErrorLabel) + "\n ")]) : _c('span', {
9436
+ staticClass: "ns-warning"
9437
+ }, [_vm._v("\n " + _vm._s(_vm.statusNotRunLabel) + "\n ")])])]), _vm._v(" "), _c('NsBackupCardDetails', {
9438
+ attrs: {
9439
+ "backup": _vm.singleBackup,
9440
+ "status": _vm.status,
9441
+ "repositoryLabel": _vm.repositoryLabel,
9442
+ "completedLabel": _vm.completedLabel,
9443
+ "durationLabel": _vm.durationLabel,
9444
+ "totalSizeLabel": _vm.totalSizeLabel,
9445
+ "totalFileCountLabel": _vm.totalFileCountLabel
9446
+ }
9447
+ })], 1)])]) : _c('div', [_c('div', {
9448
+ staticClass: "table-wrapper"
9449
+ }, [_c('div', {
9450
+ staticClass: "table"
9451
+ }, [_c('div', {
9452
+ staticClass: "tr"
9453
+ }, [_c('div', {
9454
+ staticClass: "td label"
9455
+ }, [_vm._v(_vm._s(_vm.statusLabel))]), _vm._v(" "), _c('div', {
9456
+ staticClass: "td status"
9457
+ }, [_vm.summaryStatus && _vm.summaryStatus.success == true ? _c('span', {
9458
+ staticClass: "ns-success"
9459
+ }, [_c('span', [_vm._v(_vm._s(_vm.statusSuccessLabel))])]) : _vm.summaryStatus && _vm.summaryStatus.success == false ? _c('span', {
9460
+ staticClass: "ns-error"
9461
+ }, [_vm._v("\n " + _vm._s(_vm.statusErrorLabel) + "\n ")]) : _c('span', {
9462
+ staticClass: "ns-warning"
9463
+ }, [_vm._v("\n " + _vm._s(_vm.multipleUncertainStatusLabel) + "\n ")])])])])])])])], _vm._v(" "), _c('div', [_c('div', {
9462
9464
  staticClass: "row mg-top-sm"
9463
9465
  }, [_c('NsButton', {
9464
9466
  attrs: {
@@ -9477,11 +9479,11 @@ var __vue_staticRenderFns__$o = [];
9477
9479
 
9478
9480
  const __vue_inject_styles__$q = function (inject) {
9479
9481
  if (!inject) return;
9480
- inject("data-v-6f55bf84_0", {
9481
- source: ".ns-backup-card[data-v-6f55bf84]{display:flex;flex-direction:column;justify-content:center;min-height:7rem}.backup[data-v-6f55bf84]{margin-bottom:1rem}.backup[data-v-6f55bf84]:last-child{margin-bottom:0}.row[data-v-6f55bf84]{display:flex;align-items:center;justify-content:center;margin-bottom:.5rem}.title[data-v-6f55bf84]{margin-left:.25rem;margin-right:.25rem;margin-bottom:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-wrapper[data-v-6f55bf84]{display:flex;justify-content:center;margin-bottom:.5rem}.table[data-v-6f55bf84]{display:table}.tr[data-v-6f55bf84]{display:table-row}.td[data-v-6f55bf84]{display:table-cell}.label[data-v-6f55bf84]{padding-right:.75rem;font-weight:700;text-align:right;padding-bottom:.5rem}.status[data-v-6f55bf84]{font-weight:700}.backup-status-icon[data-v-6f55bf84]{margin-right:.25rem}",
9482
+ inject("data-v-d65141fe_0", {
9483
+ source: ".ns-backup-card[data-v-d65141fe]{display:flex;flex-direction:column;justify-content:center;min-height:7rem}.backup[data-v-d65141fe]{margin-bottom:1rem}.backup[data-v-d65141fe]:last-child{margin-bottom:0}.row[data-v-d65141fe]{display:flex;align-items:center;justify-content:center;margin-bottom:.5rem}.title[data-v-d65141fe]{margin-left:.25rem;margin-right:.25rem;margin-bottom:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-wrapper[data-v-d65141fe]{display:flex;justify-content:center;margin-bottom:.5rem}.table[data-v-d65141fe]{display:table}.tr[data-v-d65141fe]{display:table-row}.td[data-v-d65141fe]{display:table-cell}.label[data-v-d65141fe]{padding-right:.75rem;font-weight:700;text-align:right;padding-bottom:.5rem}.status[data-v-d65141fe]{font-weight:700}.backup-status-icon[data-v-d65141fe]{margin-right:.25rem}",
9482
9484
  map: undefined,
9483
9485
  media: undefined
9484
- }), inject("data-v-6f55bf84_1", {
9486
+ }), inject("data-v-d65141fe_1", {
9485
9487
  source: ".ns-backup-card .bx--accordion--start .bx--accordion__content{margin-left:0}",
9486
9488
  map: undefined,
9487
9489
  media: undefined
@@ -9490,7 +9492,7 @@ const __vue_inject_styles__$q = function (inject) {
9490
9492
  /* scoped */
9491
9493
 
9492
9494
 
9493
- const __vue_scope_id__$q = "data-v-6f55bf84";
9495
+ const __vue_scope_id__$q = "data-v-d65141fe";
9494
9496
  /* module identifier */
9495
9497
 
9496
9498
  const __vue_module_identifier__$q = undefined;
@@ -17594,6 +17596,7 @@ var script$9 = {
17594
17596
  // workaround to detect click on clear search button; search is handled by filterRows() with debounce
17595
17597
  if (!this.searchFilter) {
17596
17598
  this.filteredRows = this.allRows;
17599
+ this.goToFirstPage();
17597
17600
  this.focusElement("tableSearch");
17598
17601
  }
17599
17602
  },
@@ -17605,6 +17608,18 @@ var script$9 = {
17605
17608
  } else {
17606
17609
  this.filteredRows = this.defaultFilterRows();
17607
17610
  }
17611
+
17612
+ this.goToFirstPage();
17613
+ },
17614
+
17615
+ goToFirstPage() {
17616
+ if (this.pageNumber !== 1) {
17617
+ this.paginateTable({
17618
+ start: 1,
17619
+ page: 1,
17620
+ length: this.pageLength
17621
+ });
17622
+ }
17608
17623
  },
17609
17624
 
17610
17625
  searchMatch(target, cleanRegex, queryText) {
@@ -17992,7 +18007,8 @@ var __vue_render__$i = function () {
17992
18007
  "ofTotalPagesLabel": _vm.ofTotalPagesLabel,
17993
18008
  "backwardText": _vm.backwardText,
17994
18009
  "forwardText": _vm.forwardText,
17995
- "pageNumberLabel": _vm.pageNumberLabel
18010
+ "pageNumberLabel": _vm.pageNumberLabel,
18011
+ "page": _vm.pageNumber
17996
18012
  },
17997
18013
  on: {
17998
18014
  "change": function ($event) {
@@ -21604,8 +21620,14 @@ var script$5 = {
21604
21620
  Close16
21605
21621
  },
21606
21622
  props: {
21607
- autoFilter: Boolean,
21608
- autoHighlight: Boolean,
21623
+ autoFilter: {
21624
+ type: Boolean,
21625
+ default: true
21626
+ },
21627
+ autoHighlight: {
21628
+ type: Boolean,
21629
+ default: true
21630
+ },
21609
21631
  disabled: Boolean,
21610
21632
  readonly: Boolean,
21611
21633
  invalidMessage: {
@@ -22273,11 +22295,11 @@ var __vue_staticRenderFns__$e = [];
22273
22295
 
22274
22296
  const __vue_inject_styles__$f = function (inject) {
22275
22297
  if (!inject) return;
22276
- inject("data-v-a6fe2bea_0", {
22277
- source: ".margin-bottom-on-open[data-v-a6fe2bea]{margin-bottom:14rem}.label-with-tooltip[data-v-a6fe2bea]{display:flex;align-items:baseline}.ns-combo-box .warn-text[data-v-a6fe2bea]{margin-top:.25rem}.invalid-icon[data-v-a6fe2bea],.warn-icon[data-v-a6fe2bea]{right:3rem}.cursor-not-allowed[data-v-a6fe2bea]{cursor:not-allowed}",
22298
+ inject("data-v-001e5b15_0", {
22299
+ source: ".margin-bottom-on-open[data-v-001e5b15]{margin-bottom:14rem}.label-with-tooltip[data-v-001e5b15]{display:flex;align-items:baseline}.ns-combo-box .warn-text[data-v-001e5b15]{margin-top:.25rem}.invalid-icon[data-v-001e5b15],.warn-icon[data-v-001e5b15]{right:3rem}.cursor-not-allowed[data-v-001e5b15]{cursor:not-allowed}",
22278
22300
  map: undefined,
22279
22301
  media: undefined
22280
- }), inject("data-v-a6fe2bea_1", {
22302
+ }), inject("data-v-001e5b15_1", {
22281
22303
  source: ".ns-combo-box .bx--tooltip__label .bx--tooltip__trigger{margin-left:.25rem}.ns-combo-box .bx--list-box__invalid-icon--warning{position:absolute;top:50%;right:3rem;fill:#f1c21b;transform:translateY(-50%)}.ns-combo-box .bx--list-box__invalid-icon--warning+.bx--list-box__field .bx--list-box__selection{right:4rem!important}",
22282
22304
  map: undefined,
22283
22305
  media: undefined
@@ -22286,7 +22308,7 @@ const __vue_inject_styles__$f = function (inject) {
22286
22308
  /* scoped */
22287
22309
 
22288
22310
 
22289
- const __vue_scope_id__$f = "data-v-a6fe2bea";
22311
+ const __vue_scope_id__$f = "data-v-001e5b15";
22290
22312
  /* module identifier */
22291
22313
 
22292
22314
  const __vue_module_identifier__$f = undefined;