@nethserver/ns8-ui-lib 0.0.67 → 0.0.70

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.
@@ -6,6 +6,7 @@ import { carbonPrefixMixin, themeMixin } from '@carbon/vue/src/mixins';
6
6
  import CheckmarkFilled20 from '@carbon/icons-vue/es/checkmark--filled/20';
7
7
  import ErrorFilled20 from '@carbon/icons-vue/es/error--filled/20';
8
8
  import Warning20 from '@carbon/icons-vue/es/warning--filled/20';
9
+ import crypto from 'crypto';
9
10
  import OverflowMenuVertical20 from '@carbon/icons-vue/es/overflow-menu--vertical/20';
10
11
  import Vue from 'vue';
11
12
  import '@carbon/charts/styles.css';
@@ -6724,6 +6725,182 @@ const __vue_component__$B = /*#__PURE__*/normalizeComponent({
6724
6725
 
6725
6726
  var __vue_component__$C = __vue_component__$B;
6726
6727
 
6728
+ // Unique ID creation requires a high quality random # generator. In node.js
6729
+ // this is pretty straight-forward - we use the crypto API.
6730
+
6731
+
6732
+
6733
+ var rng = function nodeRNG() {
6734
+ return crypto.randomBytes(16);
6735
+ };
6736
+
6737
+ /**
6738
+ * Convert array of 16 byte values to UUID string format of the form:
6739
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
6740
+ */
6741
+ var byteToHex = [];
6742
+ for (var i = 0; i < 256; ++i) {
6743
+ byteToHex[i] = (i + 0x100).toString(16).substr(1);
6744
+ }
6745
+
6746
+ function bytesToUuid(buf, offset) {
6747
+ var i = offset || 0;
6748
+ var bth = byteToHex;
6749
+ // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
6750
+ return ([
6751
+ bth[buf[i++]], bth[buf[i++]],
6752
+ bth[buf[i++]], bth[buf[i++]], '-',
6753
+ bth[buf[i++]], bth[buf[i++]], '-',
6754
+ bth[buf[i++]], bth[buf[i++]], '-',
6755
+ bth[buf[i++]], bth[buf[i++]], '-',
6756
+ bth[buf[i++]], bth[buf[i++]],
6757
+ bth[buf[i++]], bth[buf[i++]],
6758
+ bth[buf[i++]], bth[buf[i++]]
6759
+ ]).join('');
6760
+ }
6761
+
6762
+ var bytesToUuid_1 = bytesToUuid;
6763
+
6764
+ // **`v1()` - Generate time-based UUID**
6765
+ //
6766
+ // Inspired by https://github.com/LiosK/UUID.js
6767
+ // and http://docs.python.org/library/uuid.html
6768
+
6769
+ var _nodeId;
6770
+ var _clockseq;
6771
+
6772
+ // Previous uuid creation time
6773
+ var _lastMSecs = 0;
6774
+ var _lastNSecs = 0;
6775
+
6776
+ // See https://github.com/uuidjs/uuid for API details
6777
+ function v1(options, buf, offset) {
6778
+ var i = buf && offset || 0;
6779
+ var b = buf || [];
6780
+
6781
+ options = options || {};
6782
+ var node = options.node || _nodeId;
6783
+ var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
6784
+
6785
+ // node and clockseq need to be initialized to random values if they're not
6786
+ // specified. We do this lazily to minimize issues related to insufficient
6787
+ // system entropy. See #189
6788
+ if (node == null || clockseq == null) {
6789
+ var seedBytes = rng();
6790
+ if (node == null) {
6791
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
6792
+ node = _nodeId = [
6793
+ seedBytes[0] | 0x01,
6794
+ seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
6795
+ ];
6796
+ }
6797
+ if (clockseq == null) {
6798
+ // Per 4.2.2, randomize (14 bit) clockseq
6799
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
6800
+ }
6801
+ }
6802
+
6803
+ // UUID timestamps are 100 nano-second units since the Gregorian epoch,
6804
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
6805
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
6806
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
6807
+ var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
6808
+
6809
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
6810
+ // cycle to simulate higher resolution clock
6811
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
6812
+
6813
+ // Time since last uuid creation (in msecs)
6814
+ var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
6815
+
6816
+ // Per 4.2.1.2, Bump clockseq on clock regression
6817
+ if (dt < 0 && options.clockseq === undefined) {
6818
+ clockseq = clockseq + 1 & 0x3fff;
6819
+ }
6820
+
6821
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
6822
+ // time interval
6823
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
6824
+ nsecs = 0;
6825
+ }
6826
+
6827
+ // Per 4.2.1.2 Throw error if too many uuids are requested
6828
+ if (nsecs >= 10000) {
6829
+ throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
6830
+ }
6831
+
6832
+ _lastMSecs = msecs;
6833
+ _lastNSecs = nsecs;
6834
+ _clockseq = clockseq;
6835
+
6836
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
6837
+ msecs += 12219292800000;
6838
+
6839
+ // `time_low`
6840
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
6841
+ b[i++] = tl >>> 24 & 0xff;
6842
+ b[i++] = tl >>> 16 & 0xff;
6843
+ b[i++] = tl >>> 8 & 0xff;
6844
+ b[i++] = tl & 0xff;
6845
+
6846
+ // `time_mid`
6847
+ var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
6848
+ b[i++] = tmh >>> 8 & 0xff;
6849
+ b[i++] = tmh & 0xff;
6850
+
6851
+ // `time_high_and_version`
6852
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
6853
+ b[i++] = tmh >>> 16 & 0xff;
6854
+
6855
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
6856
+ b[i++] = clockseq >>> 8 | 0x80;
6857
+
6858
+ // `clock_seq_low`
6859
+ b[i++] = clockseq & 0xff;
6860
+
6861
+ // `node`
6862
+ for (var n = 0; n < 6; ++n) {
6863
+ b[i + n] = node[n];
6864
+ }
6865
+
6866
+ return buf ? buf : bytesToUuid_1(b);
6867
+ }
6868
+
6869
+ var v1_1 = v1;
6870
+
6871
+ function v4(options, buf, offset) {
6872
+ var i = buf && offset || 0;
6873
+
6874
+ if (typeof(options) == 'string') {
6875
+ buf = options === 'binary' ? new Array(16) : null;
6876
+ options = null;
6877
+ }
6878
+ options = options || {};
6879
+
6880
+ var rnds = options.random || (options.rng || rng)();
6881
+
6882
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
6883
+ rnds[6] = (rnds[6] & 0x0f) | 0x40;
6884
+ rnds[8] = (rnds[8] & 0x3f) | 0x80;
6885
+
6886
+ // Copy bytes to buffer, if provided
6887
+ if (buf) {
6888
+ for (var ii = 0; ii < 16; ++ii) {
6889
+ buf[i + ii] = rnds[ii];
6890
+ }
6891
+ }
6892
+
6893
+ return buf || bytesToUuid_1(rnds);
6894
+ }
6895
+
6896
+ var v4_1 = v4;
6897
+
6898
+ var uuid = v4_1;
6899
+ uuid.v1 = v1_1;
6900
+ uuid.v4 = v4_1;
6901
+
6902
+ var uuid_1 = uuid;
6903
+
6727
6904
  var UtilService = {
6728
6905
  name: "UtilService",
6729
6906
 
@@ -6979,6 +7156,24 @@ var UtilService = {
6979
7156
 
6980
7157
  reader.onerror = error => reject(error);
6981
7158
  });
7159
+ },
7160
+
7161
+ /**
7162
+ * Navigate to a page of an external app. Use this method only from an external app (e.g. from AppSideMenuContent)
7163
+ */
7164
+ goToAppPage(instanceName, page) {
7165
+ const path = `/apps/${instanceName}?page=${page}`;
7166
+
7167
+ if (this.core.$route.fullPath != path) {
7168
+ this.core.$router.push(path);
7169
+ }
7170
+ },
7171
+
7172
+ /**
7173
+ * Generate a universally unique identifier
7174
+ */
7175
+ getUuid() {
7176
+ return uuid_1.v4();
6982
7177
  }
6983
7178
 
6984
7179
  }
@@ -8627,13 +8822,16 @@ var __vue_render__$a = function () {
8627
8822
  staticClass: "mg-top-sm",
8628
8823
  attrs: {
8629
8824
  "paragraph": true,
8630
- "line-count": 5
8825
+ "line-count": 2
8631
8826
  }
8632
8827
  })], 1) : !_vm.backupsContainingInstance.length ? [_c('div', {
8633
- staticClass: "row no-backup"
8634
- }, [_c('span', {
8635
- staticClass: "ns-warning"
8636
- }, [_vm._v("\n " + _vm._s(_vm.noBackupMessage) + "\n ")])])] : [_c('div', {
8828
+ staticClass: "row icon-and-text"
8829
+ }, [_c('NsSvg', {
8830
+ staticClass: "icon ns-warning",
8831
+ attrs: {
8832
+ "svg": _vm.Warning16
8833
+ }
8834
+ }), _vm._v(" "), _c('span', [_vm._v("\n " + _vm._s(_vm.noBackupMessage) + "\n ")])], 1)] : [_c('div', {
8637
8835
  staticClass: "backups"
8638
8836
  }, _vm._l(_vm.backupsContainingInstance, function (backup) {
8639
8837
  return _c('div', {
@@ -8716,11 +8914,11 @@ var __vue_staticRenderFns__$a = [];
8716
8914
 
8717
8915
  const __vue_inject_styles__$a = function (inject) {
8718
8916
  if (!inject) return;
8719
- inject("data-v-9ef09a4e_0", {
8720
- source: ".ns-backup-card[data-v-9ef09a4e]{display:flex;flex-direction:column;justify-content:center;min-height:7rem}.backup[data-v-9ef09a4e]{margin-bottom:1rem}.backup[data-v-9ef09a4e]:last-child{margin-bottom:0}.row[data-v-9ef09a4e]{display:flex;align-items:center;justify-content:center;margin-bottom:.5rem}.title[data-v-9ef09a4e]{margin-left:.25rem;margin-right:.25rem;margin-bottom:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-wrapper[data-v-9ef09a4e]{display:flex;justify-content:center;margin-bottom:.5rem}.table[data-v-9ef09a4e]{display:table}.tr[data-v-9ef09a4e]{display:table-row}.td[data-v-9ef09a4e]{display:table-cell}.label[data-v-9ef09a4e]{padding-right:.75rem;font-weight:700;text-align:right;padding-bottom:.5rem}.status[data-v-9ef09a4e]{font-weight:700}.backup-status-icon[data-v-9ef09a4e]{margin-right:.25rem}.no-backup[data-v-9ef09a4e]{font-weight:700}",
8917
+ inject("data-v-5a3b7738_0", {
8918
+ source: ".ns-backup-card[data-v-5a3b7738]{display:flex;flex-direction:column;justify-content:center;min-height:7rem}.backup[data-v-5a3b7738]{margin-bottom:1rem}.backup[data-v-5a3b7738]:last-child{margin-bottom:0}.row[data-v-5a3b7738]{display:flex;align-items:center;justify-content:center;margin-bottom:.5rem}.title[data-v-5a3b7738]{margin-left:.25rem;margin-right:.25rem;margin-bottom:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-wrapper[data-v-5a3b7738]{display:flex;justify-content:center;margin-bottom:.5rem}.table[data-v-5a3b7738]{display:table}.tr[data-v-5a3b7738]{display:table-row}.td[data-v-5a3b7738]{display:table-cell}.label[data-v-5a3b7738]{padding-right:.75rem;font-weight:700;text-align:right;padding-bottom:.5rem}.status[data-v-5a3b7738]{font-weight:700}.backup-status-icon[data-v-5a3b7738]{margin-right:.25rem}",
8721
8919
  map: undefined,
8722
8920
  media: undefined
8723
- }), inject("data-v-9ef09a4e_1", {
8921
+ }), inject("data-v-5a3b7738_1", {
8724
8922
  source: ".ns-backup-card .bx--accordion--start .bx--accordion__content{margin-left:0}",
8725
8923
  map: undefined,
8726
8924
  media: undefined
@@ -8729,7 +8927,7 @@ const __vue_inject_styles__$a = function (inject) {
8729
8927
  /* scoped */
8730
8928
 
8731
8929
 
8732
- const __vue_scope_id__$a = "data-v-9ef09a4e";
8930
+ const __vue_scope_id__$a = "data-v-5a3b7738";
8733
8931
  /* module identifier */
8734
8932
 
8735
8933
  const __vue_module_identifier__$a = undefined;