-
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.
feature/added the lastEndpoint info on metric page
- Loading branch information
Showing
4 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
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,17 @@ | ||
$(document).ready(function($) { | ||
getMetricLastEndpoint(); | ||
}); | ||
|
||
function getMetricLastEndpoint(){ | ||
$.ajax({url: "/metrics/api/last-endpoint", success: function(result){ | ||
var content = "Last call: " | ||
+result['app_name']+" " | ||
+result['verb']+" " | ||
+ result['implemented_by_partial_function'] | ||
+" costed " | ||
+result['duration'] | ||
+" ms."; | ||
$("#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