Skip to content

pierre/metrics-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage example

Here is a simple example to retrieve periodically data from a server and refresh the graph:


    <script type="text/javascript">
        $(document).ready(function() {
            function myRetrieveSamplesAndCreateGraphs(uri) {
                getDataAndCreateOrUpdateGraph(url, "myCallback");
            }

            function myCallback(payload) {
                var data = $.parseJSON(payload).data;
                createOrUpdateGraph(data);
            }

            var uri = "http://127.0.0.1:8080/rest/1.0/data";

            // Setup the UI
            initializeUI();

            // Refresh the graph periodically
            window.refreshIntervalId = setInterval(function() {
                myRetrieveSamplesAndCreateGraphs(uri);
            }, 1000);
        });
    </script>

About

General purpose dashboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published