Add Dashboard Activity card - #2543
Conversation
|
targeting 4.3 /hold |
24a87af to
1561764
Compare
5b395a1 to
3fd0670
Compare
|
Oh wow, awesome! 🎉 I'm working on some adjustments to the Recent Events area right now and will comment here when those are ready. Until then, just some minor things I notice:
|
|
This is still a little WIP (we're targeting to have all cards "finalized" early next week) but here's the latest thinking. Ignore the height of the card for now. Each event now includes its resource badge when collapsed, making the card as a whole a little more useful without needing to read anything. When expanded, the resource badge and description within the row disappear, but the timestamp (and error icon) stays. The second timestamp in the expanded area (like "a minute ago" or "Aug 30, 5:55 pm") is no longer needed. Events are typically within the last few hours anyway, and we already have a timestamp with the hour/minute. The last example just shows the various Ongoing states, which are unchanged. I remember you pointed out that the start time won't always be available, which is fine - that line would just be removed. 🙂 |
3fd0670 to
9e35310
Compare
|
Thanks Andy!
sure, just an oversight :) fixed
I agree that we need to keep formatting aligned, however right now there are actually both formatting used. I see that AM/PM is used for events and 24hrs time is used in charts. So we need to unify it.
Agreed, but since its just a demo activity I didnt really style it :)
the space is there, its just scrolled a bit so it looks weird |
PR updated to latest design |
9e35310 to
331f708
Compare
3052285 to
868d0c5
Compare
13d52de to
73cd976
Compare
67a80c0 to
fefbcf9
Compare
fefbcf9 to
e5a739b
Compare
e5a739b to
0bda245
Compare
| return a.properties.isActivity(queryResults); | ||
| }) | ||
| .map(a => { | ||
| const queryResults = a.properties.queries.map(q => prometheusResults.getIn([q, 'data']) as PrometheusResponse); |
There was a problem hiding this comment.
As per the recent redux state changes, dont we need to get the loadError here as well ?
Otherwise we might need to repoll the queries for the prometheus activities.
c670756 to
38991de
Compare
There was a problem hiding this comment.
Let's follow the convention used by DevTools plugin, and hopefully other packages will follow up as well:
- files containing React component(s) reflect the primary component name, e.g.
DefaultPage.tsx - primary React component is provided via
defaultexport
There was a problem hiding this comment.
For now, I'd suggest using a single webpackChunkName value here.
There was a problem hiding this comment.
For now, I'd suggest using a single webpackChunkName value in all extensions, e.g. demo.
There was a problem hiding this comment.
| export interface DashboardsOverviewActivity extends DashboardExtension { | |
| export interface DashboardsOverviewResourceActivity extends DashboardExtension { |
There was a problem hiding this comment.
| type: 'Dashboards/Overview/Prometheus/Activity'; | |
| type: 'Dashboards/Overview/Activity/Prometheus'; |
There was a problem hiding this comment.
| activities: { | |
| resourceActivities: { |
There was a problem hiding this comment.
| const activities = getActivities(flags); | |
| const resourceActivities = getActivities(flags); |
There was a problem hiding this comment.
| const allActivities = _.flatten( | |
| const allResourceActivities = _.flatten( |
There was a problem hiding this comment.
| const getActivities = (flags: FlagsObject) => | |
| const getResourceActivities = (flags: FlagsObject) => |
590308e to
d503234
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rawagner, vojtechszocs The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



the Recent section is just a basic event list.