Problem/Motivation
Now that the designs are almost finalized, the data support for each component in the design needs to be setup and passed through to the front end.
User interface changes
Add a refresh timeout option onto status page configuration forms to allow expiring the cached values on the status page on a regular basis. This cached value should be a select list field as follows:
- Label
- Historical Data Time Limit
- Values
- Interval select
- 7 days
- 14 days
- 30 days
- 60 days
- 120 days
- Description
- Select how far back the system should show when displaying historical incident data.
Data model changes
Make the following data structure available to the front end for use when creating the markup for the status page.
{
"header": {
"title": "Status Page Title",
"menu": [
{
"title": "Dashboard",
"url": "path to status page"
},
{
"title": "Issues",
"url": "path to issues page"
}
],
"status": "Healthy", // Healthy, Experiencing an issue, or experiencing downtime.
"last_checked": "Since {date}"
},
"content": {
"timeline": {
"title": "History",
"timespan": "Past XX days/hours/etc", // Pulled from system monitor log truncation value.
"statuses": {
"outage": "Downtime",
"issue": "Issue",
"healthy": "Healthy"
},
"date_span": {
"start": "start date",
"end": "end date"
},
"events": [ // Only events that are non-healthy and part of montiors that are tracked by the status page
{
"title": "title of issue",
"url": "link to issue page",
"reported_date": "last reported date",
"resolved_date": "next OK reported date after reported outage"
},
{
"title": "title of issue",
"url": "link to issue page",
"reported_date": "last reported date",
"resolved_date": "next OK reported date after reported outage"
},
{
"title": "title of issue",
"url": "link to issue page",
"reported_date": "last reported date",
"resolved_date": "next OK reported date after reported outage"
}
]
},
"cards": [ // monitors tracked by the status page that are active.
{
"title": "monitor name",
"image": "monitor icon",
"status": "overall status of the monitor",
"detail": {
"description": "description",
"tasks": [
{
"title": "task name",
"status": "task status based on system monitor status"
},
{
"title": "task name",
"status": "task status based on system monitor status"
}
]
}
},
{
"title": "monitor name",
"image": "monitor icon",
"status": "overall status of the monitor",
"detail": {
"description": "description",
"tasks": [
{
"title": "task name",
"status": "task status"
},
{
"title": "task name",
"status": "task status"
}
]
}
}
],
"history": {
"title": "Issue History",
"issues": [
{
"title": "title",
"description": "description",
"status": "Resolved",
"date": "last updated date",
"url": "link to issue page"
},
{
"title": "title",
"description": "description",
"status": "Resolved",
"date": "last updated date",
"url": "link to issue page"
}
],
"url": "link to issue history page"
}
},
"footer": {
"logo": "path to logo",
"menu": [
{
"title": "link title",
"url": "path to link"
},
{
"title": "link title",
"url": "path to link"
}
],
"copyright": "copyright text" // Appended like so: "Copyright (c) {auto_year} {copyright}
}
}
Comments
Comment #2
merauluka commentedAdding Contribution Weekend tags.
Comment #3
c-logemann"ContributionWeekend2020“ is the "official" tag suggested on global event page.
Comment #4
merauluka commentedI am updating the original ticket description. The refresh interval allowed too narrow a window to provide meaningful timelines for the status page.
Comment #5
merauluka commentedAttached is the first patch for this work. It adds basic css simply to help show if the data is structured correctly. It will require additional UX work that will be covered in #3083707: Implement Status Page UX.
Diff in Gitlab
https://git.drupalcode.org/project/system_monitor/compare/8.x-1.x...task...
Comment #6
merauluka commentedSwitching to "Needs review" to kick off testing.
Comment #7
merauluka commentedLinking UX ticket.
Comment #8
merauluka commentedUpdated a commented out section of code that was bypassing state.
Comment #9
merauluka commentedBelow are basic testing instruction to guide review of the given patch.
Testing instructions for the given patch:
If you already have this module installed, you will need to uninstall and reinstall it to incorporate the given changes.
drush cex -ydrush pm-uninstall system_monitor -ydrush en sm_status_page -ydrush cim -y/admin/config/system/system-monitor/status-pageand create a status page if necessary.drush smt-gen-logsComment #10
merauluka commentedA final update for the issue listing that allows showing a Resolved status.
Comment #11
robpowellFollowed steps as stated above, status page looks gorgeous. Two nitpicks:
* History view doesn't show downtime/issues
* Have a broken image in the section below image history
<img src="/modules/contrib/system_monitor/assets/images/icons/">Comment #12
merauluka commented@robpowell The broken image looks like it's due to the update I made on the system monitor entity form. There's an icon selector now that you can use to select an icon for the section below the history. This icon is required on the form so newly created (or updated) monitors will have the icon.
The downtime/issues hover effect will be added later in the UX ticket. I only added enough markup so we could verify the data that was coming over from the logs.
I also realized I forgot to wire up the footer logo option. It was added to the status page entity type, but not the form. So I added that and passed it through to the status page on the front end.
Comment #13
merauluka commentedA new patch to remove a pesky .DS_Store that made it into the code.
Comment #14
merauluka commentedUpdating the patch to handle binary files.
Comment #15
merauluka commentedUpdate icon paths in system monitor that were broken in last patch.
Comment #16
merauluka commentedRemove binary PNG files in icon library that aren't necessary for the system.
Comment #17
merauluka commentedI updated the patch to resolve php coding standards issues.
Comment #18
robpowellI reviewed the commits since the last time I reviewed the branch locally and this looks great. I think we are good to merge in and trust the passed tests. Great work.
Comment #19
robpowellComment #20
merauluka commentedMerged! Thanks!