Skip to content

Commit

Permalink
[Canvas] Update limits and change some imports (#182028)
Browse files Browse the repository at this point in the history
updates the `limits.yml` to reflect that Canvas is actually _much_ smaller than it appears.
  • Loading branch information
ThomThomson committed Apr 30, 2024
1 parent 4b4c573 commit 5ea747c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pageLoadAssetSize:
assetManager: 25000
banners: 17946
bfetch: 22837
canvas: 1066647
canvas: 29355
cases: 180037
charts: 55000
cloud: 21076
Expand All @@ -25,7 +25,7 @@ pageLoadAssetSize:
core: 435325
crossClusterReplication: 65408
customIntegrations: 22034
dashboard: 82025
dashboard: 52967
dashboardEnhanced: 65646
data: 454087
datasetQuality: 50624
Expand Down
5 changes: 3 additions & 2 deletions x-pack/plugins/canvas/common/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
* 2.0.
*/

// eslint-disable-next-line @kbn/imports/no_boundary_crossing
import { SHAREABLE_RUNTIME_NAME } from '../../shareable_runtime/constants_static';
import { FilterField } from '../../types';

// avoid import from shareable_runtime
const SHAREABLE_RUNTIME_NAME = 'kbn_canvas';

export const CANVAS_TYPE = 'canvas-workpad';
export const CUSTOM_ELEMENT_TYPE = 'canvas-element';
export const TEMPLATE_TYPE = `${CANVAS_TYPE}-template`;
Expand Down
8 changes: 4 additions & 4 deletions x-pack/plugins/canvas/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* 2.0.
*/

import { PluginInitializerContext } from '@kbn/core/public';
import { CoreStart } from '@kbn/core/public';
import { CanvasServices } from './services';
import { CanvasSetup, CanvasStart, CanvasStartDeps, CanvasPlugin } from './plugin';
import type { PluginInitializerContext } from '@kbn/core/public';
import type { CoreStart } from '@kbn/core/public';
import type { CanvasServices } from './services';
import { type CanvasSetup, type CanvasStart, type CanvasStartDeps, CanvasPlugin } from './plugin';

export type { CanvasSetup, CanvasStart };

Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/canvas/public/lib/loading_indicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* 2.0.
*/

import * as Rx from 'rxjs';
import { CoreStart } from '@kbn/core/public';
import { BehaviorSubject } from 'rxjs';

let isActive = false;

Expand All @@ -15,7 +15,7 @@ export interface LoadingIndicatorInterface {
hide: () => void;
}

const loadingCount$ = new Rx.BehaviorSubject(0);
const loadingCount$ = new BehaviorSubject(0);

export const initLoadingIndicator = (addLoadingCount: CoreStart['http']['addLoadingCountSource']) =>
addLoadingCount(loadingCount$);
Expand Down

0 comments on commit 5ea747c

Please sign in to comment.