As a user I can see a status page
The status page should have:
- [ ] a bar graph each bar being the number of alerts triggered per day
- [ ] a list of alerts that triggered
- [ ] a list populated by an rss feed
- [ ] two or three graphs
Use react grid layout for this page

Notes
- As mentioned above, use react grid layout
- Trying to re-use as much as possible
- Cells should use the existing headers from dashboards
- Up for discussion: Should cells be resizable and/or draggable?
- Bar Chart Cell
- 30 bars divided evenly across the graph (which is why it is full width)
- Perhaps in the cell context menu, options for different time ranges?
- TBD how to build the bar graph, might use an existing framework or just hack something together using canvas (math seems simpleish)
- Gradient scales from
x = 0to the maximum x value, that way the hot spots look hot
- Newsfeed Cell
- Takes 1 or more RSS feeds
- Format each post to be consistent
- Will eventually have integration with support tickets (users can see updates on their tickets)
- Needs a little more definition for the initial version of this
- Getting Started Cell
- Links to Chronograf Docs
- Should source content from a markdown file
- Should the bar graph refresh at a regular interval, like graphs in a dashboard?
- Should the other status cells refresh at a regular interval? Or might they subscribe in real-time, such as the Recent Alerts? Will some be static, such as the Guide?
- Should a user should able to change the timeRange of their bar graph? And the recent alerts?
- For Newsfeed, is there an existing RSS link, or where is that data coming from?
- Do we imagine more status cell types going forward?
- Will the user be able to Edit or otherwise modify the data (such as a cell query) in any of the cells?
- Do we want to be able to view this page in Presentation Mode?
- Will Recent Alerts be calculated by the client retrieving all alerts and then slicing, or do we want to write this logic (if it exists, I haven't found it so far) on the server?
Basic page and layout is in place: 
I haven't used any components from /dashboards because they bring a lot of excess ideas, or LayoutRenderer because that is current written for graphs only, and this page introduces the idea of a Dashboard with subpages. LayoutRenderer could be refactored to accommodate non-graphs, but it also contains a number of other ideas that aren't relevant to non-graphs.
The working branch can be seen at https://github.com/influxdata/chronograf/tree/feature/status_page-1556.
Note on use of Redux here: My thinking so far is to not use Redux for this page, since we will likely want it to refresh frequently, and never show old data. There also isn't any editing in the spec thus far. Alternately, the StatusPage could check redux data for staleness, where Redux would store a timestamp of retrieval of data, and the StatusPage could not display anything older than a certain period of time ago. I'm split on whether to perform AJAX calls from this page, or whether to use Redux actions, even though I've previously been a strong advocate of never doing AJAX in a function. Then again, we do want to use errorThrown, which alone is reason to use Redux. So be it.
-
Should the bar graph refresh at a regular interval, like graphs in a dashboard? Yes
-
Should the other status cells refresh at a regular interval? Or might they subscribe in real-time, such as the Recent Alerts? Will some be static, such as the Guide?
Refresh
- Should a user should able to change the timeRange of their bar graph? And the recent alerts?
Not right now, it should be 30 days for now
- For Newsfeed, is there an existing RSS link, or where is that data coming from?
TBD I was thinking about using this https://jsonfeed.org/version/1
- Do we imagine more status cell types going forward?
Best to think of the cells as any graph and this is a dashboard with a default setup
- Will the user be able to Edit or otherwise modify the data (such as a cell query) in any of the cells? Do we want to be able to view this page in Presentation Mode?
Yes, plan on an rss feed url as a command line option
- Will Recent Alerts be calculated by the client retrieving all alerts and then slicing, or do we want to write this logic (if it exists, I haven't found it so far) on the server?
Not sure I understand, the alerts should be scoped to the last 30 days, then if a bar is selected the selected day. Assume the user is on a given time frame and we will select the alerts for that time frame.
• For the list initial load should query alerts time > now - 30d limit 30
• At the bottom of the alerts list add a get more
• Scroll through results as the keep coming
@alexpaxton what does "Cells should use the existing headers from dashboards" mean
Add title bar controls for refresh and datasource
@nhaugo same "title bar" markup and styles. Includes the context menu (little arrow on the right) in case we add options to a cell, also to ensure the names of cells appear consistent with graph cells
And what do you want the url to be for this page, /sources/:id/status or /sources/:id/dashboards/status? In other words, might this be considered a dashboard with a special id?
Current status / notes / questions:
-
A query for the last 30 days can take upwards of 10 seconds to load, depending on one's internet connection. Currently I've got a Line Graph at the top of the screen, until a Bar Graph is ready.
-
What do we want the Recent Alerts to display if there are no recent alerts? See the following:

-
Currently in the branch, I've taken a preliminary step toward "widgetizing" the
<AlertsApp>container. It'd be great if @alexpaxton could take a look at this and see how we might use styles to accommodate accordingly, as you can see below it only gets us so far. I'm currently just using a simple conditional in theAlertsAppcontainer to either render it as apageor not, but I would suggest that we may want to adopt a pattern of using a HOC calledFullPage(or something to that effect) that takes what would otherwise default to a (possibly responsive) widget that fills whatever space it's in, without much borders/padding, and styles it for Full Page. This would be useful to replace a lot of the styles (with<div>s) boilerplate that we have in most all of our containers and possibly some components, and allow us to use the various pages as either smaller widgets or full pages throughout the app, and would preempt the need to use janky conditionals that require redundancy, as can be seen in what I'm currently doing.
Next steps for development:
- [x] Allow more Alerts to be loaded (upon
Get More) - [x] Fix styling for Alerts widget
- [ ] Possibly create HOC to be able to widgetize any app/page
- [x] Newsfeed (JSON RSS)
- Schema for JSON news feed needs to be decided before continuing
JSONFeedReaderdev- @nhaugo will take care of this
- ~~Need a proxy endpoint (and respective link) to get JSON feed, or some other solution, per below comment~~ (external link will be passed through from Chronograf server)
- [x] Implement ENV var for external JSON feed url
- [x] Get JSON feed data from URL and display on Status Page
- sample resources: https://daringfireball.net/feeds/json, https://jsonfeed.org/version/1
- Schema for JSON news feed needs to be decided before continuing
- ~~Implement markdown-based guide~~
- [ ] Review & possibly refactor how cells + LayoutRenderer are coordinating
- [ ] If we want this data persisted in the future, coordinate with @goller on how to persist data, including whether
cellsshould be used for non-graphs (widgets), and if not, what other endpoint this data might come from, and what the shape of those data will be (currently I'm achieving widgets via a newisWidgetprop on thecellsin my fixture data, and the ones that don't have that property are assumed to be graphs with queries, but this is understandably problematic given the possible importance of enforcing a strict schema and API for cells)
- [ ] If we want this data persisted in the future, coordinate with @goller on how to persist data, including whether
- [x] Need BarGraph component
- [ ] Complete
TODOs inNewsFeed(interval polling + conditional update logic) to make it similar to<AutoRefresh>and consider refactoring it slightly into an HOC calledIntervalPollerthat would wrapJSONFeedReaderor other components
I think this can be a special case for the url, seems confusing to smash it into dashboards
The query should be fast, it should be something like SELECT sum("value") AS "sum_value" FROM "chronograf"."autogen"."alerts" WHERE time > now() - 720h GROUP BY time(1d)
Recent alerts can say something like there are no alerts please see getting started on how to set them up I will get better verbiage in the future but that should work for now
And @goller, for the news feed, do you imagine that we might add a proxy /status, or possibly /status/jsonfeed API endpoint that gives a JSON feed response object? And then add that API route to the sources/links object? This would accommodate an ENV variable config. And might such a response, or possibly one from /status/gettingstarted (or the like) return a markdown file as a string for the Getting Started section?
Current status:
- Alerts widget has been styled (thanks @alexpaxton!)
- Basic JSON NewsFeed has been implemented:
<NewsFeed>+<JSONFeedReader>are displaying local fixture data (from https://daringfireball.net/feeds/json)
- Added next steps in above checklist
Here's what it looks like currently:

Current Status:
- Made the
Recent Alertscell a bit larger as to avoid table crunch - Changed design of newsfeed a little
- Slightly more compact
- Fleshed out
Getting Startedwith static content- Initially figured using a markdown parser would be good
- Realized we might not be changing this content very often
- Static content = 99% of the way there, now

Remaining steps for consideration have been added to the PR WIP Notes at #1608