diff --git a/custom-src/frontend/app/custom/custom.module.ts b/custom-src/frontend/app/custom/custom.module.ts index ca20c1a326..bc74c5f846 100644 --- a/custom-src/frontend/app/custom/custom.module.ts +++ b/custom-src/frontend/app/custom/custom.module.ts @@ -14,13 +14,14 @@ import { KubernetesSetupModule } from './kubernetes/kubernetes.setup.module'; import { KubeHealthCheck } from './kubernetes/store/kubernetes.actions'; import { SuseAboutInfoComponent } from './suse-about-info/suse-about-info.component'; import { SuseLoginComponent } from './suse-login/suse-login.component'; -// import { HelmModule } from './helm/helm.module'; -// import { HelmSetupModule } from './helm/helm.setup.module'; +import { HelmModule } from './helm/helm.module'; +import { HelmSetupModule } from './helm/helm.setup.module'; const SuseCustomizations: CustomizationsMetadata = { copyright: '© 2019 SUSE', hasEula: true, - aboutInfoComponent: SuseAboutInfoComponent + aboutInfoComponent: SuseAboutInfoComponent, + alwaysShowNavForEndpointTypes: (typ) => false, }; @NgModule({ @@ -29,11 +30,8 @@ const SuseCustomizations: CustomizationsMetadata = { SharedModule, MDAppModule, KubernetesSetupModule, - // #150 - Uncomment to enable helm plugin - // --------------------------------------- - // HelmModule, - // HelmSetupModule - // --------------------------------------- + HelmModule, + HelmSetupModule ], declarations: [ SuseLoginComponent, diff --git a/custom-src/frontend/app/custom/helm/helm.store.module.ts b/custom-src/frontend/app/custom/helm/helm.store.module.ts index 0453fb0a20..520d8577d8 100644 --- a/custom-src/frontend/app/custom/helm/helm.store.module.ts +++ b/custom-src/frontend/app/custom/helm/helm.store.module.ts @@ -14,7 +14,8 @@ const helmEndpointTypes: EndpointTypeExtensionConfig[] = [{ imagePath: '/core/assets/custom/helm.svg', homeLink: (guid) => ['/monocular/repos', guid], entitySchemaKeys: monocularEntityKeys, - doesNotSupportConnect: true + doesNotSupportConnect: true, + techPreview: true, }]; @StratosExtension({ diff --git a/src/jetstream/plugins/kubernetes/main.go b/src/jetstream/plugins/kubernetes/main.go index 736ddfa35d..a6d7f13716 100644 --- a/src/jetstream/plugins/kubernetes/main.go +++ b/src/jetstream/plugins/kubernetes/main.go @@ -2,6 +2,7 @@ package kubernetes import ( "net/url" + "strconv" "errors" @@ -89,15 +90,14 @@ func (c *KubernetesSpecification) Connect(ec echo.Context, cnsiRecord interfaces // Init the Kubernetes Jetstream plugin func (c *KubernetesSpecification) Init() error { - // Register all of the providers - c.AddAuthProvider(auth.InitGKEKubeAuth(c.portalProxy)) c.AddAuthProvider(auth.InitAWSKubeAuth(c.portalProxy)) c.AddAuthProvider(auth.InitCertKubeAuth(c.portalProxy)) c.AddAuthProvider(auth.InitAzureKubeAuth(c.portalProxy)) c.AddAuthProvider(auth.InitOIDCKubeAuth(c.portalProxy)) c.AddAuthProvider(auth.InitKubeConfigAuth(c.portalProxy)) - c.portalProxy.GetConfig().PluginConfig[kubeDashboardPluginConfigSetting] = "false" + // Kube dashboard is enabled by Tech Preview mode + c.portalProxy.GetConfig().PluginConfig[kubeDashboardPluginConfigSetting] = strconv.FormatBool(c.portalProxy.GetConfig().EnableTechPreview) return nil } diff --git a/src/jetstream/plugins/monocular/main.go b/src/jetstream/plugins/monocular/main.go index f07a4175c4..f1c31bfa95 100644 --- a/src/jetstream/plugins/monocular/main.go +++ b/src/jetstream/plugins/monocular/main.go @@ -44,15 +44,15 @@ func (m *Monocular) GetChartStore() chartsvc.ChartSvcDatastore { // Init performs plugin initialization func (m *Monocular) Init() error { - return errors.New("Manually disabled") - - // #150 - Uncomment to enable helm plugin - // --------------------------------------- - // m.ConfigureSQL() - // m.chartSvcRoutes = chartsvc.GetRoutes() - // m.InitSync() - // m.syncOnStartup() - // return nil + + if !m.portalProxy.GetConfig().EnableTechPreview { + return errors.New("Feature is in Tech Preview") + } + m.ConfigureSQL() + m.chartSvcRoutes = chartsvc.GetRoutes() + m.InitSync() + m.syncOnStartup() + return nil } func (m *Monocular) syncOnStartup() { diff --git a/src/test-e2e/cloud-foundry/cloud-foundry-list-cf-e2e.spec.ts b/src/test-e2e/cloud-foundry/cloud-foundry-list-cf-e2e.spec.ts index 68fb0bcc78..2d193d6eb6 100644 --- a/src/test-e2e/cloud-foundry/cloud-foundry-list-cf-e2e.spec.ts +++ b/src/test-e2e/cloud-foundry/cloud-foundry-list-cf-e2e.spec.ts @@ -15,17 +15,8 @@ describe('CF Endpoints Dashboard - ', () => { .clearAllEndpoints(); }); - beforeEach(() => { - nav.goto(SideNavMenuItem.CloudFoundry); - cloudFoundry.loadingIndicator.waitUntilNotShown(); - }); - - it('should be the Endpoints page', () => { - expect(cloudFoundry.isActivePage()).toBeTruthy(); - }); - - it('should show the `no registered endpoints` message', () => { - expect(cloudFoundry.hasNoCloudFoundryMessage).toBeTruthy(); + it('No CF side nav when no CF connected', () => { + expect(nav.isMenuItemPresent(SideNavMenuItem.CloudFoundry)).toBeFalsy(); }); }); diff --git a/src/test-e2e/endpoints/endpoints-e2e.spec.ts b/src/test-e2e/endpoints/endpoints-e2e.spec.ts index 486018cad5..4aa2dfbaff 100644 --- a/src/test-e2e/endpoints/endpoints-e2e.spec.ts +++ b/src/test-e2e/endpoints/endpoints-e2e.spec.ts @@ -1,18 +1,12 @@ -import { ApplicationsPage } from '../applications/applications.po'; -import { CfTopLevelPage } from '../cloud-foundry/cf-level/cf-top-level-page.po'; import { e2e } from '../e2e'; import { ConsoleUserType } from '../helpers/e2e-helpers'; import { MenuComponent } from '../po/menu.po'; import { SideNavMenuItem } from '../po/side-nav.po'; import { SnackBarPo } from '../po/snackbar.po'; -import { ServicesPage } from '../services/services.po'; import { EndpointsPage } from './endpoints.po'; describe('Endpoints', () => { const endpointsPage = new EndpointsPage(); - const applications = new ApplicationsPage(); - const services = new ServicesPage(); - const cloudFoundry = new CfTopLevelPage(); describe('Workflow on log in (admin/non-admin + no endpoints/some endpoints) -', () => { describe('As Admin -', () => { @@ -46,19 +40,8 @@ describe('Endpoints', () => { expect(endpointsPage.isActivePage()).toBeTruthy(); }); - it('Should show application wall with \'no clusters\' message', () => { - endpointsPage.sideNav.goto(SideNavMenuItem.Applications); - expect(applications.hasNoCloudFoundryMessage()).toBeTruthy(); - }); - - it('Should show services view with \'no clusters\' message', () => { - endpointsPage.sideNav.goto(SideNavMenuItem.Services); - expect(services.hasNoCloudFoundryMessage()).toBeTruthy(); - }); - - it('Should show Cloud Foundry view with \'no clusters\' message', () => { - endpointsPage.sideNav.goto(SideNavMenuItem.CloudFoundry); - expect(cloudFoundry.hasNoCloudFoundryMessage()).toBeTruthy(); + it('No CF side nav when no CF connected', () => { + expect(endpointsPage.sideNav.isMenuItemPresent(SideNavMenuItem.CloudFoundry)).toBeFalsy(); }); it('Welcome snackbar message should be displayed', () => { @@ -121,8 +104,8 @@ describe('Endpoints', () => { const menu = new MenuComponent(); menu.waitUntilShown(); menu.getItemMap().then(items => { - expect(items['connect']).toBeDefined(); - expect(items['disconnect']).not.toBeDefined(); + expect(items.connect).toBeDefined(); + expect(items.disconnect).not.toBeDefined(); }); return menu.close(); }); diff --git a/src/test-e2e/po/side-nav.po.ts b/src/test-e2e/po/side-nav.po.ts index 92ea249ebc..1e258f5509 100644 --- a/src/test-e2e/po/side-nav.po.ts +++ b/src/test-e2e/po/side-nav.po.ts @@ -1,4 +1,4 @@ -import { browser, by, element, promise } from 'protractor'; +import { browser, by, element, ElementFinder, promise } from 'protractor'; import { E2EHelpers } from '../helpers/e2e-helpers'; import { Component } from './component.po'; @@ -23,9 +23,17 @@ export class SideNavigation extends Component { // Goto the specified menu item goto(menuItem: SideNavMenuItem): promise.Promise { - return this.helpers.waitForElementAndClick(element(by.cssContainingText('.side-nav__item', menuItem))) + return this.helpers.waitForElementAndClick(this.getMenuItem(menuItem)) .then(() => browser.actions().mouseMove({ x: 500, y: 0 }).perform()) .then(() => browser.sleep(500)); } + isMenuItemPresent(menuItem: SideNavMenuItem) { + return this.getMenuItem(menuItem).isPresent(); + } + + getMenuItem(menuItem: SideNavMenuItem): ElementFinder { + return this.locator.element(by.cssContainingText('.side-nav__item', menuItem)); + } + }