Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-2339

Srcset attribute not current for Ucd memory image

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Community Edition, Professional Edition
    • Web Interface

    Description

      Observium uses srcset attribute to have better support for Retina device. Most of them works well but not for Ucd memory in status page, one example URI /devices/format=status/ .

      For example, this is a screenshot on the retina device, the Ucd memory one is not as expected:

      http://imgur.com/a/89WVC

      The HTML for Ucd memory is generated like that

      <img src="graph.php?height=45&amp;width=175&amp;to=1498914615&amp;device=82&amp;type=device_ucd_memory&amp;from=1498828215&amp;legend=no&amp;bg=FFFFFF00&amp;popup_title=Ucd memory" srcset="graph.php?height=45&amp;width=175&amp;to=1498914615&amp;device=82&amp;type=device_ucd_memory&amp;from=1498828215&amp;legend=no&amp;bg=FFFFFF00&amp;popup_title=Ucd memory&amp;zoom=2 2x" style="max-width: 100%; width: auto; vertical-align: top;" alt="">
      

      The srcset includes a space, which is not encoded:

      popup_title=Ucd memory&amp;zoom=2 2x"
      

      It should be like this, and I changed the HTML to this, then it works as expected.

      popup_title=Ucd&amp;memory&amp;zoom=2 2x"
      

      Because it seems that only "Ucd memory" include a space, so only "Ucd memory" cannot show the @2x image for retina device.

      This bug also appears to the mouseover popups of Ucd memory and Ucd memory specific page.

      Here is the error log in Chrome debug console:

      Failed parsing 'srcset' attribute value since it has an unknown descriptor.
      Dropped srcset candidate "graph.php?height=45&width=175&to=1498915422&device=82&type=device_ucd_memory&from=1498829022&legend=no&bg=FFFFFF00&popup_title=Ucd"
      Failed parsing 'srcset' attribute value since it has an unknown descriptor.
      Dropped srcset candidate "graph.php?height=45&width=175&to=1498915422&device=82&type=device_ucd_memory&from=1498829022&legend=no&bg=FFFFFF00&popup_title=Ucd"
      Failed parsing 'srcset' attribute value since it has an unknown descriptor.
      Dropped srcset candidate "graph.php?height=45&width=175&to=1498915422&device=81&type=device_ucd_memory&from=1498829022&legend=no&bg=FFFFFF00&popup_title=Ucd"
      Failed parsing 'srcset' attribute value since it has an unknown descriptor.
      Dropped srcset candidate "graph.php?height=45&width=175&to=1498915422&device=81&type=device_ucd_memory&from=1498829022&legend=no&bg=FFFFFF00&popup_title=Ucd"
      Failed parsing 'srcset' attribute value since it has an unknown descriptor.
      Dropped srcset candidate "graph.php?height=45&width=175&to=1498915422&device=21&type=device_ucd_memory&from=1498829022&legend=no&bg=FFFFFF00&popup_title=Ucd"
      Failed parsing 'srcset' attribute value since it has an unknown descriptor.
      Dropped srcset candidate "graph.php?height=45&width=175&to=1498915422&device=21&type=device_ucd_memory&from=1498829022&legend=no&bg=FFFFFF00&popup_title=Ucd"
      Failed parsing 'srcset' attribute value since it has an unknown descriptor.
      Dropped srcset candidate "graph.php?height=45&width=175&to=1498915422&device=84&type=device_ucd_memory&from=1498829022&legend=no&bg=FFFFFF00&popup_title=Ucd"
      Failed parsing 'srcset' attribute value since it has an unknown descriptor.
      Dropped srcset candidate "graph.php?height=45&width=175&to=1498915422&device=84&type=device_ucd_memory&from=1498829022&legend=no&bg=FFFFFF00&popup_title=Ucd"
      Failed parsing 'srcset' attribute value since it has an unknown descriptor.
      Dropped srcset candidate "graph.php?height=45&width=175&to=1498915422&device=85&type=device_ucd_memory&from=1498829022&legend=no&bg=FFFFFF00&popup_title=Ucd"
      Failed parsing 'srcset' attribute value since it has an unknown descriptor.
      Dropped srcset candidate "graph.php?height=45&width=175&to=1498915422&device=85&type=device_ucd_memory&from=1498829022&legend=no&bg=FFFFFF00&popup_title=Ucd"
      

      Attachments

        Activity

          [OBS-2339] Srcset attribute not current for Ucd memory image

          Fixed in r8679.

          adama Adam Armstrong added a comment - Fixed in r8679.

          People

            adama Adam Armstrong
            ZE3kr Guo Zeyu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: