Hello.
I try to add my graph to home (like homepage screen
https://genieacs.com/images/screenshot.png)
But I can't understand how should I do it.
I edit  graphs.json.erb but have empty second graph

graphs.json.erb:
<%
threshold_green = (Time.now - (60 * 30))
threshold_yellow = (Time.now - (60 * 60 * 24))
%>
{
  "online_devices" : {
    "all_devices" : [
      {
        "label" : "Online now",
        "color" : "#5e5",
        "query" : {"_lastInform" : {"$gt" : "<%= threshold_green %>"}}
      },
      {
        "label" : "Past 24 hours",
        "color" : "#ee5",
"query" : {"_lastInform" : {"$lt" : "<%= threshold_green %>", "$gt" : "<%= threshold_yellow %>"}}
      },
      {
        "label" : "Others",
        "color" : "#e55",
        "query" : {"_lastInform" : {"$lt" : "<%= threshold_yellow %>"}}
      }
    ],
     "devices" : [
      {
        "label" : "HG231f",
        "color" : "#5e5",
        "query" : {"_productClass" : "HG231f"}
      },
      {
        "label" : "DIR-615A",
        "color" : "#ee5",
        "query" : {"_productClass" : "DIR-615A"}
      },
      {
        "label" : "DIR_300A",
        "color" : "#e55",
        "query" : {"_productClass" : "DIR_300A"}
      }
    ]
  }
}



Please explane to me how does it work?
or may be someone shows me how to use Tags ("HG231f","DIR-615A", "DIR_300A") instead of "productClass"?

_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

Reply via email to