XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Restore File - Long filenames not displayed correctly

    Scheduled Pinned Locked Moved Xen Orchestra
    8 Posts 5 Posters 445 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      mjtbrady
      last edited by

      When doing a Restore File, if the file/directory name is longer then the width of the pop up window, the file/directory name is not viewable.

      Screenshot from 2022-10-02 11-26-52.png

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Sadly, it's a bug on our old react component we can't really update. Any idea for a workaround @julien-f ?

        julien-fJ 1 Reply Last reply Reply Quote 0
        • julien-fJ Offline
          julien-f Vates 🪐 Co-Founder XO Team @olivierlambert
          last edited by

          I believe we could use an non-breakable space the icon and the text and maybe cut the text at a given length.

          Maybe there is something that we could do in the CSS too.

          @pdonias Could you take a quick look?

          pdoniasP 1 Reply Last reply Reply Quote 0
          • M Offline
            mjtbrady
            last edited by

            This isn't actually causing me a problem. It is just something that I came across while doing some testing.

            On Linux the maximum file name length is 255 and the maximum combined length of both the file name and path name is 4096, so these should be allowed for in the solution some how.

            Unless it is a really easy fix or it its really causing someone issues, can I suggest leaving this in XO 5, but make sure it is covered in XO 6?

            Thanks

            1 Reply Last reply Reply Quote 0
            • olivierlambertO Offline
              olivierlambert Vates 🪐 Co-Founder CEO
              last edited by

              This is the plan already, yes 🙂

              1 Reply Last reply Reply Quote 0
              • pdoniasP Offline
                pdonias Vates 🪐 XO Team @julien-f
                last edited by

                I took a look but I'm not able to reproduce 🤔 We do have a known issue with the select component but not that one specifically. The non-breakable space wouldn't work between the icon and the text but maybe there's something else we can do if we can ever reproduce it. In any case, this will be fixed in the next major version of XO as we won't use that component at all any more.

                A M 2 Replies Last reply Reply Quote 0
                • A Offline
                  Andrew Top contributor @pdonias
                  last edited by

                  @pdonias @mjtbrady I have had the same display problem with file restore and long names.

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mjtbrady @pdonias
                    last edited by

                    @pdonias I am puzzled. What do you see?

                    To be clear there are two problems.

                    1. The selected directory truncates the directory name at around 46 characters ("/var/lib/docker/containers" in my original screen shot isn't truncated because it isn't that long).
                    2. "Long" file/directory names in the "Select a file" drop down do not display correctly.

                    Once a file has been selected, the "Selected files/folders" does show it in a scrollable "widget" that can then be used to see the full file name.

                    My screen shots are from Chrome on Fedora. I normally use Fedora/Firefox which has the same issues.

                    I set up the following as a test. Filename lengths are 10-80 characters long.

                    root@debian42:~/testdir# pwd
                    /root/testdir
                    root@debian42:~/testdir# ls -l
                    total 0
                    -rw-r--r-- 1 root root 0 Oct  7 09:50 1234567890
                    -rw-r--r-- 1 root root 0 Oct  7 09:50 12345678901234567890
                    -rw-r--r-- 1 root root 0 Oct  7 09:50 123456789012345678901234567890
                    -rw-r--r-- 1 root root 0 Oct  7 09:50 1234567890123456789012345678901234567890
                    -rw-r--r-- 1 root root 0 Oct  7 09:50 12345678901234567890123456789012345678901234567890
                    -rw-r--r-- 1 root root 0 Oct  7 09:51 123456789012345678901234567890123456789012345678901234567890
                    -rw-r--r-- 1 root root 0 Oct  7 09:51 1234567890123456789012345678901234567890123456789012345678901234567890
                    -rw-r--r-- 1 root root 0 Oct  7 09:51 12345678901234567890123456789012345678901234567890123456789012345678901234567890
                    

                    Filename lengths 10-50 display. Filename lengths 60-80 do not.

                    Screenshot from 2022-10-07 10-22-26.png

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post