Skip to content

Commit

Permalink
Merge branch 'master' into migrate-ua-connector-id
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Sep 20, 2021
2 parents 25c8fa4 + 1fb0982 commit f3473b7
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 38 deletions.
4 changes: 2 additions & 2 deletions src/plugins/embeddable/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ export class EmbeddablePublicPlugin implements Plugin<EmbeddableSetup, Embeddabl
);

const commonContract: CommonEmbeddableStartContract = {
getEmbeddableFactory: (this
.getEmbeddableFactory as unknown) as CommonEmbeddableStartContract['getEmbeddableFactory'],
getEmbeddableFactory: this
.getEmbeddableFactory as unknown as CommonEmbeddableStartContract['getEmbeddableFactory'],
getEnhancement: this.getEnhancement,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ beforeEach(async () => {

const contactCardFactory = new ContactCardEmbeddableFactory(
uiActions.executeTriggerActions,
({} as unknown) as OverlayStart
{} as unknown as OverlayStart
);
setup.registerEmbeddableFactory(contactCardFactory.type, contactCardFactory);

Expand Down
8 changes: 4 additions & 4 deletions src/plugins/embeddable/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export class EmbeddableServerPlugin implements Plugin<EmbeddableSetup, Embeddabl

public setup(core: CoreSetup) {
const commonContract: CommonEmbeddableStartContract = {
getEmbeddableFactory: (this
.getEmbeddableFactory as unknown) as CommonEmbeddableStartContract['getEmbeddableFactory'],
getEmbeddableFactory: this
.getEmbeddableFactory as unknown as CommonEmbeddableStartContract['getEmbeddableFactory'],
getEnhancement: this.getEnhancement,
};

Expand All @@ -68,8 +68,8 @@ export class EmbeddableServerPlugin implements Plugin<EmbeddableSetup, Embeddabl

public start(core: CoreStart) {
const commonContract: CommonEmbeddableStartContract = {
getEmbeddableFactory: (this
.getEmbeddableFactory as unknown) as CommonEmbeddableStartContract['getEmbeddableFactory'],
getEmbeddableFactory: this
.getEmbeddableFactory as unknown as CommonEmbeddableStartContract['getEmbeddableFactory'],
getEnhancement: this.getEnhancement,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ export class VisualizeEmbeddable
if (!adapters) return;

return this.deps.start().plugins.inspector.open(adapters, {
title: this.getTitle(),
title:
this.getTitle() ||
i18n.translate('visualizations.embeddable.inspectorTitle', {
defaultMessage: 'Inspector',
}),
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,33 +84,42 @@ export const AgentPolicyPackageBadges: React.FunctionComponent<Props> = ({
<EuiSpacer size="s" />
</>
)}
{packages.map((pkg, idx) => {
return (
<EuiBadge
key={idx}
color="hollow"
isDisabled={excludeFleetServer && pkg.name === FLEET_SERVER_PACKAGE}
>
<EuiFlexGroup direction="row" gutterSize="xs" alignItems="center" responsive={false}>
<EuiFlexItem grow={false}>
<PackageIcon
packageName={pkg.name}
version={pkg.version}
tryApi={true}
style={
// when a custom SVG is used the logo is rendered with <img class="euiIcon euiIcon--small">
// this collides with some EuiText (+img) CSS from the EuiIcon component
// which makes the button large, wide, and poorly layed out
// override those styles until the bug is fixed or we find a better approach
{ margin: 'unset', width: '16px' }
}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>{pkg.title}</EuiFlexItem>
</EuiFlexGroup>
</EuiBadge>
);
})}
<EuiFlexGroup direction="row" gutterSize="xs" alignItems="center" wrap>
{packages.map((pkg, idx) => {
return (
<EuiFlexItem grow={false}>
<EuiBadge
key={idx}
color="hollow"
isDisabled={excludeFleetServer && pkg.name === FLEET_SERVER_PACKAGE}
>
<EuiFlexGroup
direction="row"
gutterSize="xs"
alignItems="center"
responsive={false}
>
<EuiFlexItem grow={false}>
<PackageIcon
packageName={pkg.name}
version={pkg.version}
tryApi={true}
style={
// when a custom SVG is used the logo is rendered with <img class="euiIcon euiIcon--small">
// this collides with some EuiText (+img) CSS from the EuiIcon component
// which makes the button large, wide, and poorly layed out
// override those styles until the bug is fixed or we find a better approach
{ margin: 'unset', width: '16px' }
}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>{pkg.title}</EuiFlexItem>
</EuiFlexGroup>
</EuiBadge>
</EuiFlexItem>
);
})}
</EuiFlexGroup>
{showFleetServerWarning && (
<>
<EuiSpacer size="s" />
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export const LensTopNavMenu = ({
},
},
actions: {
inspect: lensInspector.inspect,
inspect: () => lensInspector.inspect({ title }),
exportToCSV: () => {
if (!activeData) {
return;
Expand Down Expand Up @@ -335,7 +335,7 @@ export const LensTopNavMenu = ({
setIsSaveModalVisible,
uiSettings,
unsavedTitle,
lensInspector.inspect,
lensInspector,
]
);

Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/lens/public/lens_inspector_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import type {
Adapters,
InspectorOptions,
Start as InspectorStartContract,
} from '../../../../src/plugins/inspector/public';

Expand All @@ -16,7 +17,7 @@ export const getLensInspectorService = (inspector: InspectorStartContract) => {
const adapters: Adapters = createDefaultInspectorAdapters();
return {
adapters,
inspect: () => inspector.open(adapters),
inspect: (options?: InspectorOptions) => inspector.open(adapters, options),
};
};

Expand Down
2 changes: 2 additions & 0 deletions x-pack/test/functional/apps/lens/formula.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
input = await find.activeElement();
await input.type(`Men\'s Clothing`);

await PageObjects.common.sleep(100);

await PageObjects.lens.expectFormulaText(`count(kql='Men\\'s Clothing')`);
});

Expand Down

0 comments on commit f3473b7

Please sign in to comment.