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
Feature/implement error boundary hoc #3367
Merged
Merged
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
7fdbe56
Feature/3316 error handler orchestrator (#3327)
Machi3mfl fcef3c7
Added ErrorBoundary HOC and component. (#3321)
gabiwassan 5feef14
feature(logger-service): PR comments
gabiwassan 457e0e5
feature(logger-orchestrator): Refactors on management of severity.
gabiwassan 76b1009
feature(logger-orchestrator): Refactor on wz-blank-screen component.
gabiwassan f6d115c
feature(logger-orchestrator): Separated prompt component from error-b…
gabiwassan 5b64c9c
feature(logger-orchestrator): Typo.
gabiwassan 123e950
test(error-boundary): Update snapshots.
gabiwassan bfc6dfa
test(error-boundary): Update snapshots
gabiwassan d8c0f96
fix(logger-orchestrator): PR comments and refactors, fix unit tests.
gabiwassan 05a95a4
test(error-orchestrator-base): Added simple unit test. Fixed licence …
gabiwassan e481167
test(error-orchestrator-base): Added simple unit test to ErrorOrchest…
gabiwassan dd5ba35
test(error-orchestrator-ui): Added simple unit test to ErrorOrchestra…
gabiwassan ba214d5
Create new backend service (#3324)
pablomarga dc8a304
bugfix(error-orchestrator): Added some improvements and fixes.
gabiwassan 3ba96f4
test(ui-logs-controller): Updated unit test.
gabiwassan ec219f5
Settings
pablomarga 5ae8a91
Added hoc
pablomarga b0d519c
Before rebase
pablomarga e4e73ee
rebase 4.3-7.10
pablomarga bd94b37
Merge 4.3-7.10
pablomarga d9697be
Feature/3316 error handler orchestrator (#3327)
Machi3mfl 1706f56
Final implementations
pablomarga 0edc654
Fix errors and apply prettier
pablomarga f227ee3
Added changelog
pablomarga File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,9 +27,10 @@ import { getAngularModule, getDataPlugin, getUiSettings } from '../../../kibana- | |
import { MainModuleAgent } from './main-agent' | ||
import { MainModuleOverview } from './main-overview'; | ||
import store from '../../../redux/store'; | ||
import WzReduxProvider from '../../../redux/wz-redux-provider.js'; | ||
import { compose } from 'redux'; | ||
import { withReduxProvider,withErrorBoundary } from '../hocs'; | ||
|
||
export class MainModule extends Component { | ||
export const MainModule = compose (withErrorBoundary,withReduxProvider) (class MainModule extends Component { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Check prettier here |
||
constructor(props) { | ||
super(props); | ||
this.reportingService = new ReportingService(); | ||
|
@@ -211,13 +212,13 @@ export class MainModule extends Component { | |
onSelectedTabChanged: (id) => this.onSelectedTabChanged(id) | ||
} | ||
return ( | ||
<WzReduxProvider> | ||
<> | ||
{agent && | ||
<MainModuleAgent {...{ ...this.props, ...mainProps }}></MainModuleAgent> | ||
|| ((this.props.section && this.props.section !== 'welcome') && | ||
<MainModuleOverview {...{ ...this.props, ...mainProps }}></MainModuleOverview>) | ||
} | ||
</WzReduxProvider> | ||
</> | ||
); | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,12 +23,9 @@ import { | |
EuiFlexGrid, | ||
EuiButtonEmpty, | ||
EuiTitle, | ||
EuiHealth, | ||
EuiHorizontalRule, | ||
EuiPage, | ||
EuiButton, | ||
EuiPopover, | ||
EuiSelect, | ||
EuiLoadingChart, | ||
EuiToolTip, | ||
EuiButtonIcon, | ||
|
@@ -54,8 +51,9 @@ import { updateCurrentAgentData } from '../../../redux/actions/appStateActions'; | |
import WzTextWithTooltipIfTruncated from '../wz-text-with-tooltip-if-truncated'; | ||
import { getAngularModule } from '../../../kibana-services'; | ||
import { hasAgentSupportModule } from '../../../react-services/wz-agents'; | ||
import { withErrorBoundary } from '../hocs'; | ||
|
||
export class AgentsWelcome extends Component { | ||
export const AgentsWelcome = withErrorBoundary (class AgentsWelcome extends Component { | ||
_isMount = false; | ||
constructor(props) { | ||
super(props); | ||
|
@@ -329,7 +327,7 @@ export class AgentsWelcome extends Component { | |
</EuiFlexGroup> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
); | ||
);withErrorBoundary | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe type error? |
||
|
||
} | ||
|
||
|
@@ -614,4 +612,4 @@ export class AgentsWelcome extends Component { | |
</div> | ||
); | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 be better like arrow functions
const MainSyscollectorClass = (props) => {