Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#4248 (ok 4.1.6) js error when changing number of columns inside server<status<monitor<settings

Latest_Git
fixed
None
1
2014-01-26
2014-01-24
Umair Khan
No

There's a javascript error inside server<status<monitor<settings when you try to change the Chart coulmns.
There error is because there is no method name setsize() inisde the runtime.charts object. The object right now is of this type :

{"c0":{"title":"Questions","series":[{"label":"Questions","highlighter":{"show":true}}],"nodes":[{"dataPoints":[{"type":"statusvar","name":"Questions"}],"display":"differential"}],"maxYLabel":0},"c1":{"title":"Connections / Processes","series":[{"label":"Connections"},{"label":"Processes"}],"nodes":[{"dataPoints":[{"type":"statusvar","name":"Connections"}],"display":"differential"},{"dataPoints":[{"type":"proc","name":"processes"}]}],"maxYLabel":0},"c2":{"title":"Traffic","series":[{"label":"Bytes sent"},{"label":"Bytes received"}],"nodes":[{"dataPoints":[{"type":"statusvar","name":"Bytes_sent"}],"display":"differential","valueDivisor":1024},{"dataPoints":[{"type":"statusvar","name":"Bytes_received"}],"display":"differential","valueDivisor":1024}],"maxYLabel":0},"c3":{"title":"System CPU Usage","series":[{"label":"Average load"}],"nodes":[{"dataPoints":[{"type":"cpu","name":"irrelevant"}],"transformFn":"cpu-linux"}],"maxYLabel":0},"c4":{"title":"System memory","series":[{"label":"Buffered memory","fill":true},{"label":"Used memory","fill":true},{"label":"Cached memory","fill":true},{"label":"Free memory","fill":true}],"nodes":[{"dataPoints":[{"type":"memory","name":"Buffers"}],"valueDivisor":1024},{"dataPoints":[{"type":"memory","name":"MemUsed"}],"valueDivisor":1024},{"dataPoints":[{"type":"memory","name":"Cached"}],"valueDivisor":1024},{"dataPoints":[{"type":"memory","name":"MemFree"}],"valueDivisor":1024}],"maxYLabel":0},"c5":{"title":"System swap","series":[{"label":"Cached Swap","fill":true},{"label":"Used Swap","fill":true},{"label":"Free Swap","fill":true}],"nodes":[{"dataPoints":[{"type":"memory","name":"SwapCached"}],"valueDivisor":1024},{"dataPoints":[{"type":"memory","name":"SwapUsed"}],"valueDivisor":1024},{"dataPoints":[{"type":"memory","name":"SwapFree"}],"valueDivisor":1024}],"maxYLabel":0}}

Related

Bugs: #4248

Discussion

  • Umair Khan
    Umair Khan
    2014-01-24

    I'm looking to fix this problem.

     
  • Hi Umair,
    I looked at the code. I think you can fix it by replacing

    $.each(runtime.charts, function (key,value) {
    //alert(value);
    alert(value.height());
    $(this).height(newSize.height);
    $(this).width(newSize.width);
    alert($(this).height());

        });
    

    with

    $(".jqplot-target").height(newSize.height);
    $(".jqplot-target").width(newSize.width);

    in server_status_monitor.js - line 444

     
  • Umair Khan
    Umair Khan
    2014-01-25

    Thanks Viduranga . You're so fast. I tested your suggestion and it is totally fine. But I was thinking to just remove that code. Because the charts are updated anyways and the settings are saved in localStorage.

     
    Last edit: Umair Khan 2014-01-25
    • Yes I noticed that too. No effect if we removed that code. But you may need
      to ask from the phpmyadmin admins before removing.
      On Jan 25, 2014 12:34 PM, "Umair Khan" omerjerk@users.sf.net wrote:

      Thanks sir. You're so fast. I tested your suggestion and it is totally
      fine. But I was thinking to just remove that code. Because the charts are
      updated anyways and the settings are saved in localStorage.


      Status: open
      Created: Fri Jan 24, 2014 03:33 PM UTC by Umair Khan
      Last Updated: Fri Jan 24, 2014 07:46 PM UTC
      Owner: nobody

      There's a javascript error inside server<status<monitor<settings when you
      try to change the Chart coulmns.
      There error is because there is no method name setsize() inisde the
      runtime.charts object. The object right now is of this type :

      {"c0":{"title":"Questions","series":
      [{"label":"Questions","highlighter":{"show":true}}],"nodes":
      [{"dataPoints":[{"type":"statusvar","name":"Questions"}],"display":"differential"}],"maxYLabel":0},"c1":{"title":"Connections
      / Processes","series":[{"label":"Connections"},{"label":"Processes"}]
      ,"nodes":[{"dataPoints":[{"type":"statusvar","name":"Connections"}]
      ,"display":"differential"},{"dataPoints":
      [{"type":"proc","name":"processes"}]
      }],"maxYLabel":0},"c2":{"title":"Traffic","series":[{"label":"Bytes
      sent"},{"label":"Bytes received"}]
      ,"nodes":
      [{"dataPoints":[{"type":"statusvar","name":"Bytes_sent"}]
      ,"display":"differential","valueDivisor":1024},{"dataPoints":
      [{"type":"statusvar","name":"Bytes_received"}],"display":"differential","valueDivisor":1024}],"maxYLabel":0},"c3":{"title":"System
      CPU Usage","series":[{"label":"Average load"}],"nodes":
      [{"dataPoints":[{"type":"cpu","name":"irrelevant"}],"transformFn":"cpu-linux"}],"maxYLabel":0},"c4":{"title":"System
      memory","series":[{"label":"Buffered memory","fill":true},{"label":"Used
      memory","fill":true},{"label":"Cached memory","fill":true},{"label":"Free
      memory","fill":true}]
      ,"nodes":
      [{"dataPoints":[{"type":"memory","name":"Buffers"}]
      ,"valueDivisor":1024},{"dataPoints":[{"type":"memory","name":"MemUsed"}]
      ,"valueDivisor":1024},{"dataPoints":[{"type":"memory","name":"Cached"}]
      ,"valueDivisor":1024},{"dataPoints":[{"type":"memory","name":"MemFree"}],"valueDivisor":1024}],"maxYLabel":0},"c5":{"title":"System
      swap","series":[{"label":"Cached Swap","fill":true},{"label":"Used
      Swap","fill":true},{"label":"Free Swap","fill":true}]
      ,"nodes":
      [{"dataPoints":[{"type":"memory","name":"SwapCached"}]
      ,"valueDivisor":1024},{"dataPoints":[{"type":"memory","name":"SwapUsed"}]
      ,"valueDivisor":1024},{"dataPoints":[{"type":"memory","name":"SwapFree"}]
      ,"valueDivisor":1024}],"maxYLabel":0}}


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/phpmyadmin/bugs/4248/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #4248

      Attachments
    • summary: js error when changing number of columns inside server<status<monitor<settings --=""> (ok 4.1.6) js error when changing number of columns inside server<status<monitor<settings
    • status: open --> resolved
    • Priority: 5 --> 1
     
  • Marc Delisle
    Marc Delisle
    2014-01-25

    • assigned_to: Atul Pratap Singh
     
  • Marc Delisle
    Marc Delisle
    2014-01-26

    • Status: resolved --> fixed