Skip to content

[Bug] Initial storage layout filtering out every disk #1083

@nribeka

Description

@nribeka

Description of the bug

I tried running the application from source on my Mac Mini and the storage layout initial query is returning empty list. This will ended up preventing the UI from rendering. What I ended up getting is blank white screen and the console log is showing error from the StorageWidget.

I tried debugging the UI part and this part is causing the problem when the storage section is returning empty list.

const brand = removeDuplicates(
  shownData[0]?.disks?.map(({ brand }) => brand)
);

I think it is returning empty list because it will filter out non "disk" drive. My Mac Mini is either returning "part" or "virtual" as the type for every disk. Maybe this should be changed to check the mount point starts with "/" similar to how the dynamic storage query is done?

const getDiskBlocks = (blocks: Block[]) =>
  blocks.filter(
    block =>
      block.type === 'disk' &&
      block.size > 0 &&
      !/^zram\d+$/.test(block.name) &&
      !CONFIG.fs_device_filter.includes(block.name) &&
      !CONFIG.fs_type_filter.includes(block.fsType)
  );

My Mac Mini is returning the following structure:

  {
    name: '/dev/disk0',
    identifier: 'disk0',
    type: 'virtual',
    ...
  },
  {
    name: '/dev/disk7s1',
    identifier: 'disk7s1',
    type: 'part',
    ...
  }

How to reproduce

Perform the installation as outlined in the documentation.

  • Clone and build the code:
git clone https://github.com/MauriceNino/dashdot \
  && cd dashdot \
  && yarn \
  && yarn build:prod
  • Start the application:
sudo -E yarn start

Relevant log output

No response

Info output of dashdot cli

No response

What browsers are you seeing the problem on?

Chrome

Where is your instance running?

Desktop PC (Mac OS)

Additional context

It is working as expected if this is running in docker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions