-
Notifications
You must be signed in to change notification settings - Fork 542
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: show warning notification when dashboard version not matching apisix #1435
Conversation
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.
Notification
will occur when the version gets mismatched and page refresh.
|
+1 agreed. The recommendation of matched version is recommended. We could improve this later in other PR. |
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
Thanks @LiteSun .
fe e2e test failed, tried to solve in #1442 |
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, it will very helpful for users, thanks
sorry I found that In addition to the test case run failed, there are some problems with lint, maybe it needs to solve in this pr |
@@ -49,6 +51,9 @@ const GlobalHeaderRight: React.FC = () => { | |||
if ((navTheme === 'dark' && layout === 'top') || layout === 'mix') { | |||
className = `${styles.right} ${styles.dark}`; | |||
} | |||
useEffect(() => { |
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.
Don’t call Hooks inside loops, conditions, or nested functions. Instead, always use Hooks at the top level of your React function. You can follow the documentation here. (from https://stackoverflow.com/questions/57620799/react-hook-useeffect-is-called-conditionally)
just move this useEffect
before line 44
Thanks for the review, I will fix it. |
Codecov Report
@@ Coverage Diff @@
## master #1435 +/- ##
===========================================
- Coverage 68.08% 57.03% -11.05%
===========================================
Files 48 48
Lines 3042 3042
===========================================
- Hits 2071 1735 -336
- Misses 728 1065 +337
+ Partials 243 242 -1
Continue to review full report at Codecov.
|
Please answer these questions before submitting a pull request
Why submit this pull request?
Bugfix
New feature provided
Improve performance
Backport patches
Related issues
resolves tip: display a warning message on the dashboard if the user is not using the recommended APISIX + Dashboard version #1165