Skip to content

fix: loosen metric dimension and filter dimension types in dashboard schema#3049

Open
filipgutica wants to merge 3 commits intomainfrom
fix/loosen-metric-dimension-types-dashboard-schema
Open

fix: loosen metric dimension and filter dimension types in dashboard schema#3049
filipgutica wants to merge 3 commits intomainfrom
fix/loosen-metric-dimension-types-dashboard-schema

Conversation

@filipgutica
Copy link
Contributor

Copy link
Contributor

@adorack adorack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to review.

@filipgutica filipgutica force-pushed the fix/loosen-metric-dimension-types-dashboard-schema branch from e3d13c4 to 4521ced Compare March 24, 2026 18:19
@filipgutica filipgutica requested review from a team and kongponents-bot as code owners March 24, 2026 18:19
@filipgutica filipgutica force-pushed the fix/loosen-metric-dimension-types-dashboard-schema branch 2 times, most recently from d59ee57 to 63a93fe Compare March 24, 2026 19:07
expect(result).toEqual(expected)
})

it('keeps all filters for platform', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the behaviour we want for platform?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It certainly isn't the right long-term behavior. However, given the timeline, maybe we let it pass and try to follow up with the refactor that looks at the datasource config store.

@filipgutica filipgutica force-pushed the fix/loosen-metric-dimension-types-dashboard-schema branch from 63a93fe to 1379b37 Compare March 24, 2026 20:33
expect(result).toEqual(expected)
})

it('keeps all filters for platform', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It certainly isn't the right long-term behavior. However, given the timeline, maybe we let it pass and try to follow up with the refactor that looks at the datasource config store.

} = query

const datasource = originalDatasource || 'basic'
const datasource = originalDatasource
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment explaining what this is doing?

zoomable: false,
}

it('falls back to api_usage for unknown datasources', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you want to do this? (I don't think it's a problem, just curious what case cropped up that causes the need for it.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this what the behaviour always was?

filters: [{ field: 'status_code', operator: 'in', value: ['test1'] }],
}
mount({ context })
mount({ context, waitForDatasourceConfigStore: true })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this option do anything?

@kongponents-bot
Copy link
Collaborator

Preview components from this PR in consuming application

In consuming application project install preview versions of shared packages generated by this PR:

@kong-ui-public/analytics-utilities@pr-3049
@kong-ui-public/analytics-config-store@pr-3049
@kong-ui-public/analytics-geo-map@pr-3049
@kong-ui-public/portal-analytics-bridge@pr-3049
@kong-ui-public/analytics-metric-provider@pr-3049
@kong-ui-public/analytics-chart@pr-3049
@kong-ui-public/dashboard-renderer@pr-3049

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants