Skip to content
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

[MDS] UI polishment for MDS support of Timeline visualization #7000

Closed
2 tasks
zhongnansu opened this issue Jun 10, 2024 · 3 comments
Closed
2 tasks

[MDS] UI polishment for MDS support of Timeline visualization #7000

zhongnansu opened this issue Jun 10, 2024 · 3 comments
Assignees
Labels
multiple datasource multiple datasource project ux / ui Improvements or additions to user experience, flows, components, UI elements v2.16.0

Comments

@zhongnansu
Copy link
Member

zhongnansu commented Jun 10, 2024

Tasks

  • Polish error message to be data_source_name is not supported. Contact your administrator to start using multiple data sources when data source feature is not enabled
    image
    Link PR:
  1. Place data source name before the index name in the expression. Hierarchically user selects data source first, then index name, then metric and timestamp
  • Add data source helper text into the help tooltip
    image
@zhongnansu zhongnansu added ux / ui Improvements or additions to user experience, flows, components, UI elements multiple datasource multiple datasource project v2.16.0 labels Jun 10, 2024
@BionIT BionIT assigned zhongnansu and unassigned huyaboo Jun 17, 2024
@zhongnansu
Copy link
Member Author

cc: @xeniatup @BionIT

@xeniatup
Copy link

For task 2: "place data source name before the index name". Based on @huyaboo, is not doable. Could you add more context?
I would not consider it a blocker. The suggestion was based on the general hierarchy of the objects (data source contains multiple indexes, an index has metric, etc..)

@huyaboo
Copy link
Member

huyaboo commented Jun 20, 2024

For task 2: "place data source name before the index name". Based on @huyaboo, is not doable. Could you add more context?

If a specific Timeline visualization does not specify field names for its arguments, the arguments are assigned to the fields in a specific order: queries, metric, split, index, ... (see snippet below for order)

In other words, if data_source_name were placed first or in the middle, it would break existing Timeline visualizations because the argument order would be modified. This is why data_source_name is placed last.

args: [
{
name: 'q',
types: ['string', 'null'],
multi: true,
help: i18n.translate('timeline.help.functions.opensearch.args.qHelpText', {
defaultMessage: 'Query in lucene query string syntax',
}),
},
{
name: 'metric',
types: ['string', 'null'],
multi: true,
help: i18n.translate('timeline.help.functions.opensearch.args.metricHelpText', {
defaultMessage:
'An opensearch metric agg: avg, sum, min, max, percentiles or cardinality, followed by a field. ' +
'E.g., "sum:bytes", "percentiles:bytes:95,99,99.9" or just "count"',
description:
`avg, sum, min, max, percentiles and cardinality are keywords in the expression ` +
`and must not be translated. Also don't translate the examples.`,
}),
},
{
name: 'split',
types: ['string', 'null'],
multi: true,
help: i18n.translate('timeline.help.functions.opensearch.args.splitHelpText', {
defaultMessage:
'An opensearch field to split the series on and a limit. E.g., "{hostnameSplitArg}" to get the top 10 hostnames',
values: {
hostnameSplitArg: 'hostname:10',
},
}),
},
{
name: 'index',
types: ['string', 'null'],
help: i18n.translate('timeline.help.functions.opensearch.args.indexHelpText', {
defaultMessage:
'Index to query, wildcards accepted. Provide Index Pattern name for scripted fields and ' +
'field name type ahead suggestions for metrics, split, and timefield arguments.',
description:
'"metrics", "split" and "timefield" are referring to parameter names and should not be translated.',
}),
},
{
name: 'timefield',
types: ['string', 'null'],
help: i18n.translate('timeline.help.functions.opensearch.args.timefieldHelpText', {
defaultMessage: 'Field of type "date" to use for x-axis',
description: '"date" is a field type and should not be translated.',
}),
},
{
name: 'kibana',
types: ['boolean', 'null'],
help: i18n.translate('timeline.help.functions.opensearch.args.opensearchDashboardsHelpText', {
defaultMessage:
'Respect filters on OpenSearch Dashboards dashboards. Only has an effect when using on OpenSearch Dashboards dashboards',
}),
},
{
name: 'opensearchDashboards',
types: ['boolean', 'null'],
help: i18n.translate('timeline.help.functions.opensearch.args.opensearchDashboardsHelpText', {
defaultMessage:
'Respect filters on OpenSearch Dashboards dashboards. Only has an effect when using on OpenSearch Dashboards dashboards',
}),
},
{
name: 'interval', // You really shouldn't use this, use the interval picker instead
types: ['string', 'null'],
help: i18n.translate('timeline.help.functions.opensearch.args.intervalHelpText', {
defaultMessage: `**DO NOT USE THIS**. It's fun for debugging fit functions, but you really should use the interval picker`,
}),
},
{
name: 'data_source_name',
types: ['string', 'null'], // If null, the query will proceed with local cluster
help: i18n.translate('timeline.help.functions.opensearch.args.dataSourceNameHelpText', {
defaultMessage:
'Specify a data source to query from. This will only work if multiple data sources is enabled',
}),
},
],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multiple datasource multiple datasource project ux / ui Improvements or additions to user experience, flows, components, UI elements v2.16.0
Projects
None yet
Development

No branches or pull requests

3 participants