add my own graph to "Home"

Denis Taranushin tda at suttk.ru
Wed Jul 29 14:46:03 EDT 2015


I'ev done it: "query" : {"summary.productClass" : "DIR_615K"}

29.07.2015 23:12, Denis Taranushin пишет:
> 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"?
>


More information about the Users mailing list