Skip to content

Commit

Permalink
Code Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedhamed-ahmed committed May 16, 2023
1 parent 09ed682 commit 6bcbfa4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* 2.0.
*/

import { LocatorDefinition } from '@kbn/share-plugin/public';
import { LocatorDefinition, LocatorPublic } from '@kbn/share-plugin/public';
import type { LogsLocatorDependencies, LogsLocatorParams } from './logs_locator';

const DISCOVER_LOGS_LOCATOR_ID = 'DISCOVER_LOGS_LOCATOR';

export type DiscoverLogsLocator = LocatorPublic<LogsLocatorParams>;

export class DiscoverLogsLocatorDefinition implements LocatorDefinition<LogsLocatorParams> {
public readonly id = DISCOVER_LOGS_LOCATOR_ID;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* 2.0.
*/

import { LocatorDefinition } from '@kbn/share-plugin/public';
import { LocatorDefinition, LocatorPublic } from '@kbn/share-plugin/public';
import type { NodeLogsLocatorDependencies, NodeLogsLocatorParams } from './node_logs_locator';

const DISCOVER_NODE_LOGS_LOCATOR_ID = 'DISCOVER_NODE_LOGS_LOCATOR';

export type DiscoverNodeLogsLocator = LocatorPublic<NodeLogsLocatorParams>;

export class DiscoverNodeLogsLocatorDefinition implements LocatorDefinition<NodeLogsLocatorParams> {
public readonly id = DISCOVER_NODE_LOGS_LOCATOR_ID;

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

import type { DiscoverLogsLocatorDefinition } from './discover_logs_locator';
import type { DiscoverNodeLogsLocatorDefinition } from './discover_node_logs_locator';
import type { DiscoverLogsLocator } from './discover_logs_locator';
import type { DiscoverNodeLogsLocator } from './discover_node_logs_locator';
import type { LogsLocator } from './logs_locator';
import type { NodeLogsLocator } from './node_logs_locator';

Expand All @@ -16,6 +16,6 @@ export * from './logs_locator';
export * from './node_logs_locator';

export interface InfraLocators {
logsLocator: LogsLocator | DiscoverLogsLocatorDefinition;
nodeLogsLocator: NodeLogsLocator | DiscoverNodeLogsLocatorDefinition;
logsLocator: LogsLocator | DiscoverLogsLocator;
nodeLogsLocator: NodeLogsLocator | DiscoverNodeLogsLocator;
}

0 comments on commit 6bcbfa4

Please sign in to comment.