Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icons gone after import of csv #675

Closed
2 tasks done
killtux opened this issue May 16, 2024 · 6 comments
Closed
2 tasks done

Icons gone after import of csv #675

killtux opened this issue May 16, 2024 · 6 comments
Labels
bug 🐛 Something isn't working Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress.

Comments

@killtux
Copy link

killtux commented May 16, 2024

Is there an existing issue for this?

Current Behavior

why i import the csv the devices show up but has some strange values for icon names - no icons show up.

Expected Behavior

devices get imported with the icons the used before.

Steps To Reproduce

image

app.conf

No response

docker-compose.yml

services:
  pialert:
    container_name: netalertx
    image: "jokobsk/netalertx:latest"
    network_mode: "host"
    restart: unless-stopped
    volumes:
      - ./config:/app/config
      - ./db:/app/db
      # (optional) useful for debugging if you have issues setting up the container
      - ./log:/app/front/log
#      - ./api:/app/front/api
    environment:
      - TZ=Europe/Berlin
#      - HOST_USER_ID=1000
#      - HOST_USER_GID=1000
      - PORT=20211
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

What branch are you running?

Production

app.log

No response

Debug enabled

  • I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.
@killtux killtux added the bug 🐛 Something isn't working label May 16, 2024
@jokob-sk
Copy link
Owner

Hi @killtux ,

Thanks for filling in the details.

I don't see any error in your screenshot, the icon seems to be displayed correctly:

image

The way icons are handled has changed 2 releases ago. Please read more in the updated icons docs: https://github.com/jokob-sk/NetAlertX/blob/main/docs/ICONS.md

@jokob-sk jokob-sk added the Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress. label May 16, 2024
@killtux
Copy link
Author

killtux commented May 16, 2024

I don't see any error in your screenshot, the icon seems to be displayed correctly:

no the notebook icon is the standard icon that shows up. but at the overview no icons are displayed. the printer had the printer icon.

i think something happend when importing the csv.

i updated to the lates release today and wanted to access the backup. then i noticed paths were changed as the app got renamed. i changed it but i cannot access the folders without sudo (so i cant pull a backup via winscp). somehow the db got messed up and all my devices (100+) where gone. also there wasnt an option to import from backup (i made before). but the import csv worked - but devices offline, parent nodes gone and icons are not showing up.

@jokob-sk
Copy link
Owner

Sorry to hear that,

As per https://github.com/jokob-sk/NetAlertX/blob/main/docs/MIGRATION.md#migration-form-pialert-to-netalertx have you tried the following?

If you have troubles accessing past backups, config or database files you can copy them into the newly mapped directories, for example by running this command in the container: cp -r /app/config /home/pi/pialert/config/old_backup_files. This should create a folder in the config directory called old_backup_files conatining all the files in that location. Another approach is to map the old location and the new one at the same time to copy things over.

Since you have the devices.csv most of your device config should be fine. You will also need the app/pialert.conf to get the scanners up.

If you have only the devices.csv file you can always remove the icons manually and import the csv file without the icons. Use nano or notepad++ to preserve file endings.

Hope the above helps.

@killtux
Copy link
Author

killtux commented May 16, 2024

yeah i changed directories to the new format but i got some problems accessing them. is it possible that the app changes the permission so i can't access it from the user thats part of the docker group?

i also cant access over winscp the files to upload the devices.csv
image

the version in the config dir is from feb last year, so maybe thats the reason it got messed up.

i also see that there is an pialert.db from this morning with 7mb size. can i also use it to get back to the state before?
image

@killtux
Copy link
Author

killtux commented May 16, 2024

ok i managed to give my user access to the dir's again using "sudo chown user config", deleted via WinSCP the old devices.csv, uploaded the new one from today, shutted the docker down, brought it up again, deleted all devices and made a fresh import from csv. - everything back, online and with icons.

sorry for bothering you, i only have basic linux experience.

is there a reason the permissions were changed you can't access the dir with the normal user thats part of the docker group? Since the reason i mount it, is that i can access it and pull backup files from or to it.

maybe a file upload function for csv and backup files would be a nice addition for users who dont want to mess with terminal or sftp and can get backups to their pc outside of the docker. so if something messes up they can spin up a new docker and just start from the backup.

@jokob-sk
Copy link
Owner

Glad to hear you solved the issue! I'll consider the feature request for the future.

See this for a discussion about permissions #652

For now I'm closing this as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress.
Projects
None yet
Development

No branches or pull requests

2 participants