-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] Update the Overview page #159609
[ML] Update the Overview page #159609
Conversation
Pinging @elastic/ml-ui (:ml) |
@@ -43,3 +43,7 @@ export function lazyMlNodesAvailable() { | |||
export function permissionToViewMlNodeCount() { | |||
return userHasPermissionToViewMlNodeCount; | |||
} | |||
|
|||
export function getMlNodesCount(): number { |
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.
Ideally, we should create a service to retrieve and store ML nodes data, but it'd be too much for this PR
@@ -158,5 +164,14 @@ export function getStatsBarData(jobsList: any) { | |||
|
|||
jobStats.activeNodes.value = Object.keys(mlNodes).length; | |||
|
|||
if (jobStats.total.value === 0) { | |||
for (const statKey in jobStats) { |
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.
Can we use Object.entries here instead?
for (const [statKey, val] of Object.entries(jobStats)) {
if (statKey !== 'total') {
val.show = false;
}
}
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.
updated in 0380da1
@qn895 I didn't manage to reproduce, unfortunately. Could it be some issues with the dev server? Otherwise can you please provide step-by-step instructions? |
const getAnalytics = getAnalyticsFactory( | ||
setAnalytics, | ||
setAnalyticsStats, | ||
// @ts-ignore |
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.
Could this be fixed? If not can it have a comment.
We should probably use ts-expect-error
too, so it's obvious when the issue it fixed.
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.
refactored in 4d2ded2
if (jobStats.total.value === 0) { | ||
for (const statKey in jobStats) { | ||
if (statKey !== 'total') { | ||
// @ts-ignore |
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.
same with this @ts-ignore
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 one was removed in 0380da1
const { euiTheme } = useCurrentThemeVars(); | ||
|
||
return ( | ||
<EuiSplitPanel.Outer grow hasShadow={false} hasBorder={isOpen}> |
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, if you expand and collapse these sections they resize by 1px because of the lack of border.
Adding a border when they are collapsed looks a bit nicer and is less flickery.
Something like this, euiColorLightestShade
is the closest shade I could find.
css={isOpen ? {} : { border: `1px solid ${euiTheme.euiColorLightestShade}` }}
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.
Fixed in f846d55
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.
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 left some suggestions for the UI text.
...ion/data_frame_analytics/pages/analytics_management/components/empty_prompt/empty_prompt.tsx
Outdated
Show resolved
Hide resolved
...ion/data_frame_analytics/pages/analytics_management/components/empty_prompt/empty_prompt.tsx
Outdated
Show resolved
Hide resolved
...on/jobs/jobs_list/components/anomaly_detection_empty_state/anomaly_detection_empty_state.tsx
Outdated
Show resolved
Hide resolved
...on/jobs/jobs_list/components/anomaly_detection_empty_state/anomaly_detection_empty_state.tsx
Outdated
Show resolved
Hide resolved
...ion/data_frame_analytics/pages/analytics_management/components/empty_prompt/empty_prompt.tsx
Outdated
Show resolved
Hide resolved
…s/analytics_management/components/empty_prompt/empty_prompt.tsx Co-authored-by: István Zoltán Szabó <[email protected]>
…s/analytics_management/components/empty_prompt/empty_prompt.tsx Co-authored-by: István Zoltán Szabó <[email protected]>
…-154294-overview-page
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.
UI text with the latest changes LGTM! Thank you!
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
Please ignore my comment about the panel sizes, it's something that we can tweak alter if we need to.
LGTM 🎉 |
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.
With the changes to the links in the empty states, please could you unskip the ml
and transform
accessibility tests in https://github.com/elastic/kibana/blob/main/x-pack/test/accessibility/config.ts#L38 and check if they are now passing.
@bhavyarm can you remember why the transform
plugin accessibility tests were skipped in #144940? The two PRs referenced in that PR don't seem to be related to the transforms page.
@peteharverson transforms failed in the ci run at one point. But yes they were passing in the local. Once a11y tests are unskipped - is it possible to run this PR in flaky test runner 100 times? Thanks very much! |
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 - hoping the accessibility tests pass now! If not keep them skipped and we'll look at in a follow up.
Flaky tests runner for accessibility tests https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2412 Update: several failures in a11y tests are not related to this PR, e.g., |
This reverts commit 1d15f22.
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @darnautov |
I had the need to revert this PR as it was failing the on merge ci https://buildkite.com/elastic/kibana-on-merge/builds/31675 |
## Summary Resolves elastic#154294 and updates the UI of the Overview page - Updates panels layout - Stores expand/collapsed state of the panels in the local storage - Update empty states text and layout <img width="1341" alt="image" src="https://github.com/elastic/kibana/assets/5236598/8833fa2a-b574-44ee-bacb-e974186dd35f"> ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) (cherry picked from commit 6ac52fb)
Summary
Resolves #154294 and updates the UI of the Overview page
Checklist