@kosdev-code/kos-ui-sdk 0.1.0-next.1034 → 0.1.0-next.1036

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.
@@ -23652,6 +23652,7 @@ var __decorateClass$6 = (decorators, target, key, kind) => {
23652
23652
  };
23653
23653
  const MODEL_TYPE$5 = "storage-device-container-model";
23654
23654
  const TOPIC_STORAGE_AVAILABILITY = "/kos/storage";
23655
+ const isInsertedStorage = (device) => !device.local;
23655
23656
  let StorageDeviceContainerModelImpl = class {
23656
23657
  id;
23657
23658
  logger;
@@ -23690,7 +23691,8 @@ let StorageDeviceContainerModelImpl = class {
23690
23691
  get volumes() {
23691
23692
  return this.data;
23692
23693
  }
23693
- handleStorageAvailability(devices) {
23694
+ handleStorageAvailability(payload) {
23695
+ const devices = payload.filter(isInsertedStorage);
23694
23696
  const toRemove = this._models.data.filter(
23695
23697
  (model) => !devices.find((device) => device.id === model.id)
23696
23698
  );
@@ -23718,7 +23720,7 @@ let StorageDeviceContainerModelImpl = class {
23718
23720
  async load() {
23719
23721
  this.logger.debug(`loading storage-device-container container ${this.id}`);
23720
23722
  const storageDevices = await getStorageDevices();
23721
- storageDevices.forEach((storageDevice) => {
23723
+ storageDevices.filter(isInsertedStorage).forEach((storageDevice) => {
23722
23724
  if (storageDevice.deviceType !== "disk") {
23723
23725
  const options = {
23724
23726
  ...storageDevice,
@@ -25409,4 +25411,4 @@ exports.waitForRequest = waitForRequest;
25409
25411
  exports.whenReady = whenReady;
25410
25412
  exports.withCancellation = withCancellation;
25411
25413
  exports.wrapWithFutureLifecycle = wrapWithFutureLifecycle;
25412
- //# sourceMappingURL=software-info-registration-C-fplY8u.cjs.map
25414
+ //# sourceMappingURL=software-info-registration-CWlRW0sN.cjs.map