Skip to content

Commit

Permalink
try #3
Browse files Browse the repository at this point in the history
Signed-off-by: abbyhu2000 <[email protected]>
  • Loading branch information
abbyhu2000 committed Nov 3, 2023
1 parent eeb3251 commit 5fd8a87
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ class DashboardGridUi extends React.Component<DashboardGridProps, State> {
};
}

public getDerivedStateFromProps() {
console.log("getDerivedStateFromProps")

Check failure on line 168 in src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Unexpected console statement

Check failure on line 168 in src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Replace `"getDerivedStateFromProps")` with `'getDerivedStateFromProps');`

Check warning on line 168 in src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx#L168

Added line #L168 was not covered by tests
if(this.state.panels!==this.props.container.getInput().panels){

Check failure on line 169 in src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Replace `(this.state.panels!==this.props.container.getInput().panels)` with `·(this.state.panels·!==·this.props.container.getInput().panels)·`
console.log("here inside getDerivedStateFromProps if")

Check failure on line 170 in src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Unexpected console statement

Check failure on line 170 in src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Replace `"here·inside·getDerivedStateFromProps·if")` with `'here·inside·getDerivedStateFromProps·if');`

Check warning on line 170 in src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx#L170

Added line #L170 was not covered by tests
//this.setState(this.props.container.getInput().panels as any)

Check failure on line 171 in src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Expected exception block, space or tab after '//' in comment
return {panels: this.props.container.getInput().panels as any}

Check failure on line 172 in src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Replace `panels:·this.props.container.getInput().panels·as·any}` with `·panels:·this.props.container.getInput().panels·as·any·};`

Check warning on line 172 in src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx#L172

Added line #L172 was not covered by tests
}
}

public componentDidMount() {
this.mounted = true;
let isLayoutInvalid = false;
Expand Down Expand Up @@ -293,6 +302,7 @@ class DashboardGridUi extends React.Component<DashboardGridProps, State> {
}

public render() {
console.log("render")

Check failure on line 305 in src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Unexpected console statement

Check failure on line 305 in src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Replace `"render")` with `'render');`
if (this.state.isLayoutInvalid) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ export class EmbeddableChildPanel extends React.Component<EmbeddableChildPanelPr
}

public render() {
if(!this.embeddable){

Check failure on line 89 in src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Replace `(!this.embeddable)` with `·(!this.embeddable)·`
return null;
}
if(this.embeddable.parent && (this.embeddable.parent?.id !== this.props.container.id)){
return null;

Check warning on line 93 in src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx#L93

Added line #L93 was not covered by tests
}
const { PanelComponent } = this.props;
const classes = classNames('embPanel', {
'embPanel-isLoading': this.state.loading,
Expand Down

0 comments on commit 5fd8a87

Please sign in to comment.