-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #346 from hongwei1/develop
feature/added the lastEndpoint info on metric page
- Loading branch information
Showing
4 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
apimanager/metrics/static/metrics/js/lastEndpointMetric.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
$(document).ready(function($) { | ||
getMetricLastEndpoint(); | ||
}); | ||
|
||
function getMetricLastEndpoint(){ | ||
$.ajax({url: "/metrics/api/last-endpoint", success: function(result){ | ||
var content = "" | ||
+result['implemented_by_partial_function']+" took " | ||
+result['duration']+" ms at " | ||
+result['date']+" " | ||
+result['verb']+" " | ||
+ result['url']; | ||
$("#last_endpoint").text(content); | ||
setTimeout(function(){getMetricLastEndpoint();}, 5000); // will call function to update time every 5 seconds | ||
}}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters