Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show newest monitoring data on top #3635

Merged
merged 4 commits into from
Nov 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion apinf_packages/core/lib/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@
"apiLogo_resumable_successfully_uploaded": "Logo successfully uploaded!",
"apiLogo_resumable_message_fileMaxSize": "File size exceeded max limit. Please upload a photo within 10 MB size.",
"apiMetadata_dateInvalid": "End date must be after begin date",
"apiMonitoring_table_title_details": "Details",
"apiMonitoring_table_title_endpoint": "Endpoint",
"apiMonitoring_table_title_status": "Status",
"apiMonitoring_table_title_timestamp": "Timestamp",
"apiMonitoring_title_text": "Status Messages",
"apiMonitoring_title_text_below": "Historical data on API availability",
"apiOrganization_disconnectButton": "Disconnect",
"apiOrganization_panelTitle": "Connect API to Organization",
"apiProxy_network_message_attention": "NOTE:",
Expand Down Expand Up @@ -223,7 +229,7 @@
"apinf_noproxybackend_error": "Error: No proxy backend found",
"apinf_usernotloggedin_error": "Error: Could not find signed-in user.",
"apiMonitoring_panelTitle_Monitoring": "API Health Monitoring",
"apiMonitoring_helpIcon_text": "API Monitoring indicates current state of your API. API monitoring is done using HTTP requests. Choose one of your APIs GET method so that accidental data insertion in your API is prevented. When monitoring is setup, you will see a dot next to your API name indicating the health of your API based on calls made in monitoring. Green = OK, Red = not OK.",
"apiMonitoring_helpIcon_text": "API Monitoring indicates current state of your API. API monitoring is done by using HTTP requests and responses to it. Choose one of your API's GET methods to be monitored. (By using GET method no accidental data is inserted in your API). When monitoring is set up, the health of your API (based on calls made in monitoring) is indicated with a dot next to your API's name. Green = OK, Red = not OK. API is polled once/hour. You can force refresh by clicking save button.",
"apiMonitoring_saveButton_text": "Save",
"apiMonitoringForm_successMessage": "The API Monitoring settings are successfully saved!",
"apiMonitoringForm_errorMessage": "Endpoint to monitor is required",
Expand Down Expand Up @@ -920,6 +926,9 @@
},
"url": {
"label": "Endpoint to Monitor"
},
"endPoint": {
"label": "Endpoint to Monitor"
}
},
"settings": {
Expand Down
19 changes: 11 additions & 8 deletions apinf_packages/monitoring/client/monitoring.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
<template name="apiMonitoring">
{{# if apiMonitoringSettings.enabled }}
<h2 style="font-size:1.4em;margin-top:0;">
Status Messages
{{_ "apiMonitoring_title_text" }}
</h2>
<p style="color:#6d859e;">
Historical data on API availability
{{_ "apiMonitoring_title_text_below" }}
</p>
<table class="rtable">
<thead>
<tr>
<th>Time</th>
<th>Endpoint</th>
<th>Status</th>
<th>Details</th>
<th>{{_ "apiMonitoring_table_title_timestamp" }}</th>
<th>{{_ "apiMonitoring_table_title_endpoint" }}</th>
<th>{{_ "apiMonitoring_table_title_status" }}</th>
<th>{{_ "apiMonitoring_table_title_details" }}</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -61,9 +61,12 @@ <h3 style="font-size:16px; margin-top:0;">
<div class="input-group">
<!-- API url addon -->
<span class="input-group-addon" id="api-url">
{{ api.url }}
{{ api.url }}
</span>
{{> afFieldInput name='endPoint' value=endPoint }}
{{> afFieldInput
name='endPoint'
value=endPoint
}}
</div>
{{# if afFieldIsInvalid name='endPoint' }}
<p class="text-danger">
Expand Down
2 changes: 1 addition & 1 deletion apinf_packages/monitoring/client/monitoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Template.apiMonitoring.helpers({
return result;
});
if (monitoringData) {
return responses;
return responses.reverse();
}
}
return [];
Expand Down