-
Notifications
You must be signed in to change notification settings - Fork 147
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
feat: Add Table Notices #957
Conversation
Cool to see that one make it through ! We've been meaning to work on something similar next months. Regarding questions I think I might have input for 1 and 2 - our use case assumed not only alerts but also warnings and info messages. Examples information we wanted to show were:
so it definitely would be more scalable with more than just one type of notification in my opinion (and possibility to define more than one notification per table) One nit - would it make sense to have alerts section |
That's awesome, thanks for chiming in @mgorsk1! I could easily add the three types of notification part, it think it would be something like:
Regarding the positioning, let me ask our designer to see what she thinks. I guess the placement was because they wanted to give it the most importance. What do you think about the RFC, should I open one? |
This is cool! I haven't looked closely, but very much want this functionality. Minor nit: is there something else we could name this? Notifications to me implies stuff getting pushed to people. Perhaps table notices, alerts, or something like that? +1 on I think that it would be reasonable to have multiple notifications per table? regarding RFC, I think this does qualify, it is a new feature. The biggest discussion points I see are:
it is quite probable the initial implementation wouldn't do the full scope, but the initial impl details may change based on some of these answers |
Makes sense, changing it to "Notices"
Updated this PR with it
This one is a bit more problematic, as we would need to limit them and maybe offer the option to close them?
I will create an RFC now.
All legit questions. |
0b009eb
to
38e66dd
Compare
98e3849
to
17fe3ed
Compare
8493516
to
2e77116
Compare
}, | ||
}, | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few notes about this configuration:
- I think this furthers the need to move our configs to an external config service. Updating these messages will require a rebuild and redeploy which is not ideal.
- Adding notices to our datastore seems like it could work, but with a lot more work. (adding to graph model, databuilder jobs, user editing/adding notices, etc) Doesn't seem worth it at this point.
- Using the
"<SCHEMANAME>.<TABLENAME>"
as the table identifier seems somewhat nonstandard. Everywhere we identify a table we always use the pattern{database}://{cluster}.{schema}/{table_name}
. Is the intent here to match similar tables in different databases or clusters? - nit: rename
message
tomessageHtml
. Also is it required to wrap the message in a span?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few notes about this configuration:
- I think this furthers the need to move our configs to an external config service. Updating these messages will require a rebuild and redeploy which is not ideal.
100% Agree, I think a combination of a feature flag system plus an admin UI would be ideal.
- Using the
"<SCHEMANAME>.<TABLENAME>"
as the table identifier seems somewhat nonstandard. Everywhere we identify a table we always use the pattern{database}://{cluster}.{schema}/{table_name}
. Is the intent here to match similar tables in different databases or clusters?
Oh, didn't think about this. I will try to include the rest.
- nit: rename
message
tomessageHtml
. Also is it required to wrap the message in a span?
Good call, I that key name will be more explicit.
I will check about the span, I can't remember why it was there.
const hasDescription = | ||
dashboard.description && dashboard.description.length > 0; | ||
const hasLastRunState = | ||
dashboard.last_run_state && dashboard.last_run_state.length > 0; | ||
const dashboardNotice = getResourceNotices( | ||
ResourceType.dashboard, | ||
`${dashboard.product}.${dashboard.name}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the product and dashboard name are enough to uniquely identify a dashboard. Multiple dashboards in the same product are named some generic "payments dashboard" or something that would all match the same config value. The "uri" ("key" for tables, we should standardize to one or the other but that's a different issue) for dashboards is {product}://{cluster}.{group}/{name}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, I will try to add more stuff here.
afb22c7
to
0d73c63
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from changing the key/uri format, should be good to merge.
Signed-off-by: Marcos Iglesias <[email protected]>
Signed-off-by: Marcos Iglesias <[email protected]>
Signed-off-by: Marcos Iglesias <[email protected]>
Signed-off-by: Marcos Iglesias <[email protected]>
Signed-off-by: Marcos Iglesias <[email protected]>
Signed-off-by: Marcos Iglesias <[email protected]>
Signed-off-by: Marcos Iglesias <[email protected]>
…cs and tests updates Signed-off-by: Marcos Iglesias <[email protected]>
0d73c63
to
c5b7f6c
Compare
|
||
import './styles.scss'; | ||
|
||
const STROKE_COLOR = '#b8072c'; // $red70 | ||
const SEVERITY_TO_COLOR_MAP = { | ||
[NoticeSeverity.INFO]: '#3a97d3', // cyan50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have these colors on the _colors css file as variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's the 'cyan50', but we cannot bring the scss variables into the JS files :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one small comment
* Alert styling on Table Detail page Signed-off-by: Marcos Iglesias <[email protected]> * Sources table notification from the config object Signed-off-by: Marcos Iglesias <[email protected]> * Adds severities to notices Signed-off-by: Marcos Iglesias <[email protected]> * Adding it to dashboard Signed-off-by: Marcos Iglesias <[email protected]> * Updating for dashboard notices as well Signed-off-by: Marcos Iglesias <[email protected]> * Update betterer results Signed-off-by: Marcos Iglesias <[email protected]> * Adding documentation Signed-off-by: Marcos Iglesias <[email protected]> * Unique table and dashboard identifications, messageHtml as key and docs and tests updates Signed-off-by: Marcos Iglesias <[email protected]>
Summary of Changes
Adds Table and Dashboards notifications in the detail page using the current JavaScript configuration system
Implements amundsen-io/rfcs#29
Tests
Tested configuration helper
Documentation
Not yet