Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: abbyhu2000 <[email protected]>
  • Loading branch information
abbyhu2000 committed Aug 28, 2024
1 parent 9be3b74 commit 316bea9
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/plugins/data/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ export {
QueryStateChange,
QueryStart,
PersistedLog,
QueryControl,
} from './query';

export { AggsStart } from './search/aggs';
Expand Down
1 change: 0 additions & 1 deletion src/plugins/data/public/query/query_string/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ export {
LanguageService,
LanguageConfig,
EditorEnhancements,
QueryControl,
} from './language_service';
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ export const DefaultLanguageReference = () => {
<p>
<FormattedMessage
id="data.query.queryBar.syntaxOptionsDescription"
defaultMessage="The {docsLink} (DQL) offers a simplified query
syntax and support for scripted fields."
defaultMessage="The {docsLink} (DQL) offers a simplified query syntax and support for scripted fields."
values={{
docsLink: (
<EuiLink href={osdDQLDocs} target="_blank">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import { EuiFlexItem } from '@elastic/eui';
export const QueryControls = (props: { queryControls: React.ReactElement[] }) => {
return (
<>
{props.queryControls.map((queryControl) => (
<EuiFlexItem grow={false}>{queryControl}</EuiFlexItem>
{props.queryControls.map((queryControl, idx) => (
<EuiFlexItem grow={false} key={idx}>
{queryControl}
</EuiFlexItem>
))}
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@

export * from './types';
export { LanguageServiceContract, LanguageService } from './language_service';
export { QueryControl } from './get_query_control_links';
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ export class LanguageService {
}
};

public createDefaultLanguageReference = () => {
return createDefaultLanguageReference();
};

/**
* Registers default handlers for index patterns and indices.
*/
private registerDefaultLanguages() {
const defaultEditor = createEditor(
SingleLineInput,
SingleLineInput,
[createDefaultLanguageReference()],
[this.createDefaultLanguageReference()],
DQLBody
);
this.registerLanguage(getDQLLanguageConfig(this.defaultSearchInterceptor, defaultEditor));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class QueryLanguageReference {
toMountPoint(
<OpenSearchDashboardsContextProvider services={this.coreStart}>
<PPLReferenceFlyout
onClose={() => flyoutSession?.close?.().then()}
onClose={() => flyoutSession?.close()}
makeUrl={(searchId: any) => `#/view/${encodeURIComponent(searchId)}`}
/>
</OpenSearchDashboardsContextProvider>
Expand Down

0 comments on commit 316bea9

Please sign in to comment.