@nethserver/ns8-ui-lib 1.2.10 → 1.3.1

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;
@@ -21604,9 +21606,16 @@ var script$5 = {
21604
21606
  Close16
21605
21607
  },
21606
21608
  props: {
21607
- autoFilter: Boolean,
21608
- autoHighlight: Boolean,
21609
+ autoFilter: {
21610
+ type: Boolean,
21611
+ default: true
21612
+ },
21613
+ autoHighlight: {
21614
+ type: Boolean,
21615
+ default: true
21616
+ },
21609
21617
  disabled: Boolean,
21618
+ readonly: Boolean,
21610
21619
  invalidMessage: {
21611
21620
  type: String,
21612
21621
  default: undefined
@@ -21805,7 +21814,7 @@ var script$5 = {
21805
21814
  },
21806
21815
 
21807
21816
  clearFilter() {
21808
- if (this.disabled) return;
21817
+ if (this.disabled || this.readonly) return;
21809
21818
  this.internalUpdateValue("");
21810
21819
  this.filter = "";
21811
21820
  this.$refs.input.focus();
@@ -21895,7 +21904,7 @@ var script$5 = {
21895
21904
  },
21896
21905
 
21897
21906
  onInput() {
21898
- if (this.disabled) return;
21907
+ if (this.disabled || this.readonly) return;
21899
21908
  this.doOpen(true);
21900
21909
  this.updateOptions();
21901
21910
  this.updateHighlight();
@@ -21911,7 +21920,7 @@ var script$5 = {
21911
21920
  },
21912
21921
 
21913
21922
  onDown() {
21914
- if (this.disabled) return;
21923
+ if (this.disabled || this.readonly) return;
21915
21924
 
21916
21925
  if (!this.open) {
21917
21926
  this.doOpen(true);
@@ -21921,7 +21930,7 @@ var script$5 = {
21921
21930
  },
21922
21931
 
21923
21932
  onUp() {
21924
- if (this.disabled) return;
21933
+ if (this.disabled || this.readonly) return;
21925
21934
 
21926
21935
  if (this.open) {
21927
21936
  this.doMove(true);
@@ -21929,13 +21938,13 @@ var script$5 = {
21929
21938
  },
21930
21939
 
21931
21940
  onEsc() {
21932
- if (this.disabled) return;
21941
+ if (this.disabled || this.readonly) return;
21933
21942
  this.doOpen(false);
21934
21943
  this.$el.focus();
21935
21944
  },
21936
21945
 
21937
21946
  onEnter() {
21938
- if (this.disabled) return;
21947
+ if (this.disabled || this.readonly) return;
21939
21948
  this.doOpen(!this.open);
21940
21949
 
21941
21950
  if (!this.open) {
@@ -21945,7 +21954,7 @@ var script$5 = {
21945
21954
  },
21946
21955
 
21947
21956
  onClick() {
21948
- if (this.disabled) return;
21957
+ if (this.disabled || this.readonly) return;
21949
21958
  this.doOpen(!this.open);
21950
21959
 
21951
21960
  if (this.open) {
@@ -22004,7 +22013,7 @@ var script$5 = {
22004
22013
  },
22005
22014
 
22006
22015
  inputClick() {
22007
- if (this.disabled) return;
22016
+ if (this.disabled || this.readonly) return;
22008
22017
 
22009
22018
  if (!this.open) {
22010
22019
  this.doOpen(true);
@@ -22012,7 +22021,7 @@ var script$5 = {
22012
22021
  },
22013
22022
 
22014
22023
  inputFocus() {
22015
- if (this.disabled) return;
22024
+ if (this.disabled || this.readonly) return;
22016
22025
  this.doOpen(true);
22017
22026
  },
22018
22027
 
@@ -22143,6 +22152,7 @@ var __vue_render__$e = function () {
22143
22152
  "aria-expanded": _vm.open ? 'true' : 'false',
22144
22153
  "autocomplete": "off",
22145
22154
  "disabled": _vm.disabled,
22155
+ "readonly": _vm.readonly,
22146
22156
  "placeholder": _vm.label
22147
22157
  },
22148
22158
  domProps: {
@@ -22164,7 +22174,9 @@ var __vue_render__$e = function () {
22164
22174
  }
22165
22175
  }
22166
22176
  }), _vm._v(" "), _vm.filter ? _c('div', {
22167
- class: [_vm.carbonPrefix + "--list-box__selection"],
22177
+ class: [_vm.carbonPrefix + "--list-box__selection", {
22178
+ 'cursor-not-allowed': _vm.readonly
22179
+ }],
22168
22180
  attrs: {
22169
22181
  "role": "button",
22170
22182
  "tabindex": "0",
@@ -22202,7 +22214,9 @@ var __vue_render__$e = function () {
22202
22214
  }
22203
22215
  }
22204
22216
  }, [_c('Close16')], 1) : _vm._e(), _vm._v(" "), _c('div', {
22205
- class: [_vm.carbonPrefix + "--list-box__menu-icon", (_obj$4 = {}, _obj$4[_vm.carbonPrefix + "--list-box__menu-icon--open"] = _vm.open, _obj$4)],
22217
+ class: [_vm.carbonPrefix + "--list-box__menu-icon", (_obj$4 = {}, _obj$4[_vm.carbonPrefix + "--list-box__menu-icon--open"] = _vm.open, _obj$4), {
22218
+ 'cursor-not-allowed': _vm.readonly
22219
+ }],
22206
22220
  attrs: {
22207
22221
  "role": "button"
22208
22222
  }
@@ -22267,11 +22281,11 @@ var __vue_staticRenderFns__$e = [];
22267
22281
 
22268
22282
  const __vue_inject_styles__$f = function (inject) {
22269
22283
  if (!inject) return;
22270
- inject("data-v-610245c0_0", {
22271
- source: ".margin-bottom-on-open[data-v-610245c0]{margin-bottom:14rem}.label-with-tooltip[data-v-610245c0]{display:flex;align-items:baseline}.ns-combo-box .warn-text[data-v-610245c0]{margin-top:.25rem}.invalid-icon[data-v-610245c0],.warn-icon[data-v-610245c0]{right:3rem}",
22284
+ inject("data-v-001e5b15_0", {
22285
+ 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}",
22272
22286
  map: undefined,
22273
22287
  media: undefined
22274
- }), inject("data-v-610245c0_1", {
22288
+ }), inject("data-v-001e5b15_1", {
22275
22289
  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}",
22276
22290
  map: undefined,
22277
22291
  media: undefined
@@ -22280,7 +22294,7 @@ const __vue_inject_styles__$f = function (inject) {
22280
22294
  /* scoped */
22281
22295
 
22282
22296
 
22283
- const __vue_scope_id__$f = "data-v-610245c0";
22297
+ const __vue_scope_id__$f = "data-v-001e5b15";
22284
22298
  /* module identifier */
22285
22299
 
22286
22300
  const __vue_module_identifier__$f = undefined;