-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
ui: add license change notification to db console #129420
ui: add license change notification to db console #129420
Conversation
780c20b
to
bf8c22f
Compare
|
||
const licenseUpdateDismissedPersistentLoadedSelector = createSelector( | ||
(state: AdminUIState) => state.uiData, | ||
uiData => uiData && has(uiData, LICENSE_UPDATE_DISMISSED_KEY), |
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.
nit: any reason we can't use native hasOwn
or hasOwnProperty
here?
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.
done.
(uiData && | ||
uiData[LICENSE_UPDATE_DISMISSED_KEY] && | ||
uiData[LICENSE_UPDATE_DISMISSED_KEY].data && |
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.
nit: i think this can be collapsed a little:
return moment(uiData?.[LICENSE_UPDATE_DISMISSED_KEY]?.data ?? 0);
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.
ooh nice. thanks!
licenseUpdateDismissedPersistentLoaded && | ||
licenseUpdateDismissedPersistent ) { |
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'm a little confused by this case because based on the selector right above this one, doesn't licenseUpdateDismissedPersistent
always return a moment as long as there is uiData loaded? Why don't we need to do the isAfter(moment(0))
check here?
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.
you are correct. added.
a8d5aa8
to
eb6ce6b
Compare
eb6ce6b
to
d6cbabe
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.
This change adds a dismissable alert to the Overview page of DB Console that informs users about upcoming license changes. This popup is only shown if the cluster does not have an active "Enterprise" license The popup links to this page: "https://www.cockroachlabs.com/enterprise-license-update/" When the popup is dismissed, the dismissal is stored in the DB for this user and they don't see this notification again. Resolves: CRDB-40939 Release note (ui change): DB Console will show a notification alerting customers without an Enterprise license, to upcoming license changes with a link to more information.
d6cbabe
to
a597c17
Compare
TFTR! I added some tests too 😄 bors r=xinhaoz |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from a597c17 to blathers/backport-release-23.1-129420: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.1.x failed. See errors above. error creating merge commit from a597c17 to blathers/backport-release-23.2-129420: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.2.x failed. See errors above. error creating merge commit from a597c17 to blathers/backport-release-24.1-129420: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 24.1.x failed. See errors above. error creating merge commit from a597c17 to blathers/backport-release-24.2-129420: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 24.2.x failed. See errors above. error creating merge commit from a597c17 to blathers/backport-release-23.1.26-rc-129420: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.1.26-rc failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
This change adds a dismissable alert to the Overview page of DB
Console that informs users about upcoming license changes.
This popup is only shown if the cluster does not have an active
"Enterprise" license
The popup links to this page:
"https://www.cockroachlabs.com/enterprise-license-update/"
When the popup is dismissed, the dismissal is stored in the DB for
this user and they don't see this notification again.
Resolves: CRDB-40939
Release note (ui change): DB Console will show a notification alerting
customers without an Enterprise license, to upcoming license changes
with a link to more information.