Skip to content

[SLO] Provide initial size for the SLO Overview embeddable #170710

Closed
@mgiota

Description

Slack thread

🍒 Summary

In this issue we implemented an SLO Overview embeddable. The panel takes the default width and height dimensions based on the dashboards grid system.

DEFAULT_PANEL_WIDTH = 24
DEFAULT_PANEL_HEIGHT = 15

With this PR we now have the option to specify initial width and height of our panel by providing a getPanelPlacementSettings in the embeddable's factory.

✅ Acceptance criteria

  • specify the initial width and height of the SLO overview embeddable. I tried width: 8 and height: 7 and looks good, so I'll start with these values

Implementation details

We need to specify a getPanelPlacementSettings to the SLO Overview embeddable

 public getPanelPlacementSettings: IProvidesPanelPlacementSettings<
    SloEmbeddableInput,
    unknown
  >['getPanelPlacementSettings'] = () => {
    return { width: 8, height: 7, strategy: 'placeAtTop' };
  };

The SloOverviewEmbeddableFactoryDefinition needs to implement the IProvidesPanelPlacementSettings<SloEmbeddableInput> as well.

class SloOverviewEmbeddableFactoryDefinition implements EmbeddableFactoryDefinition, IProvidesPanelPlacementSettings<SloEmbeddableInput>

🗒️ Notes for the Reviewer

Already placed panels (Admin console availability SLO), still take the default dimensions. This change applies only to the newly added SLO Overview panels.

Verify that width: 8, height: 7 works well with your existing SLO widgets. In any case user can resize the panel and bring it to the desired dimensions!

Screenshot 2023-11-07 at 08 39 43

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions