Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,15 @@ const GlobalSettingCategoryPage = () => {

break;
default:
if (
connectionsRouterClassBase.isEmbeddedMode() &&
category === GlobalSettingsMenuCategory.SERVICES
) {
if (isEmbedded && category === GlobalSettingsMenuCategory.SERVICES) {
navigate(connectionsRouterClassBase.getSettingsServicesPath(option));
} else {
navigate(getSettingPath(category, option));
}

break;
}
}, []);
}, [isEmbedded, navigate]);

return (
<PageLayoutV1 pageTitle={t('label.setting-plural')}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,6 @@ describe('ConnectionsRouterClassBase', () => {
router = new ConnectionsRouterClassBase();
});

describe('embeddedMode', () => {
it('setEmbeddedMode should be a no-op', () => {
router.setEmbeddedMode(true);

expect(router.isEmbeddedMode()).toBe(false);
});

it('isEmbeddedMode should always return false', () => {
expect(router.isEmbeddedMode()).toBe(false);
});
});

describe('getSettingsServicesPath', () => {
it('should return the generic settings services path when no category given', () => {
expect(router.getSettingsServicesPath()).toBe('/settings/services');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ import {
import { getServiceRouteFromServiceType } from './ServiceUtils';

class ConnectionsRouterClassBase {
public setEmbeddedMode(_flag: boolean): void {
// no-op in base; overridden in Collate
}

public isEmbeddedMode(): boolean {
return false;
}

public getSettingsServicesPath(serviceCategory?: string): string {
if (serviceCategory) {
return getSettingPath(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,6 @@ describe('ObservabilityRouterClassBase', () => {
router = new ObservabilityRouterClassBase();
});

describe('embeddedMode', () => {
it('setEmbeddedMode should be a no-op', () => {
router.setEmbeddedMode(true);

expect(router.isEmbeddedMode()).toBe(false);
});

it('isEmbeddedMode should always return false', () => {
expect(router.isEmbeddedMode()).toBe(false);
});
});

describe('getDataQualityPagePath', () => {
it('should return base path without tab', () => {
expect(router.getDataQualityPagePath()).toBe('/data-quality');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ import {
} from './RouterUtils';

class ObservabilityRouterClassBase {
public setEmbeddedMode(_flag: boolean): void {
// no-op in base; overridden in Collate
}

public isEmbeddedMode(): boolean {
return false;
}

public getDataQualityPagePath(
tab?: DataQualityPageTabs,
subTab?: string
Expand Down
Loading