diff --git a/proxy-conf-example.js b/proxy-conf-example.js deleted file mode 100644 index a6620a359e..0000000000 --- a/proxy-conf-example.js +++ /dev/null @@ -1,56 +0,0 @@ -const CLOUDSTACK_ENDPOINT = 'https://example.com'; -/* - * Plugins endpoint - * https://github.com/bwsw/cloudstack-ui#plugins-supported - * */ -const PULSE_PLUGIN_ENDPOINT = 'http://example.com:8081'; -const WEBSHELL_PLUGIN_ENDPOINT = 'http://example.com:8082'; - -function onProxyRes(proxyRes, req, res) { - var cookies = proxyRes.headers['set-cookie']; - var cookieRegex = /Secure/i; - - if (cookies) { - var newCookie = cookies.map(function(cookie) { - if (cookieRegex.test(cookie)) { - return cookie.replace(cookieRegex, ''); - } - return cookie; - }); - delete proxyRes.headers['set-cookie']; - proxyRes.headers['set-cookie'] = newCookie; - } -} - -const apiProxyConfig = { - context: ['/client/api', '/client/console'], - target: CLOUDSTACK_ENDPOINT, - secure: false, -}; - -// If server works over https need to change Secure Cookie -if (CLOUDSTACK_ENDPOINT.indexOf('https') === 0) { - apiProxyConfig.onProxyRes = onProxyRes; -} - -const pulseProxyConfig = { - context: ['/cs-extensions/pulse/**'], - target: PULSE_PLUGIN_ENDPOINT, - secure: false, - pathRewrite: { '^/cs-extensions/pulse': '' }, -}; - -const webShellProxyConfig = { - context: ['/cs-extensions/webshell/**'], - target: WEBSHELL_PLUGIN_ENDPOINT, - secure: false, - pathRewrite: { '^/cs-extensions/webshell': '' }, -}; - -const PROXY_CONFIG = [ - apiProxyConfig, - // pulseProxyConfig, - // webShellProxyConfig -]; - -module.exports = PROXY_CONFIG; diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts index 5c40a56376..126bbf4960 100644 --- a/src/app/core/core.module.ts +++ b/src/app/core/core.module.ts @@ -5,18 +5,13 @@ import { RouterModule } from '@angular/router'; import { ConfigValidationService } from './config'; import { SharedModule } from '../shared/shared.module'; import { MaterialModule } from '../material/material.module'; -import { - AppNavComponent, - LicenseComponent, - MenuHeaderComponent, - SectionNavComponent, -} from './nav-menu/components/'; +import { AppNavComponent, LicenseComponent, MenuHeaderComponent } from './nav-menu/components/'; import { SidebarWidthService, SnackBarService } from './services'; @NgModule({ imports: [CommonModule, SharedModule, MaterialModule, RouterModule], - exports: [AppNavComponent, SectionNavComponent], - declarations: [AppNavComponent, SectionNavComponent, LicenseComponent, MenuHeaderComponent], + exports: [AppNavComponent], + declarations: [AppNavComponent, LicenseComponent, MenuHeaderComponent], providers: [ConfigValidationService, SnackBarService, SidebarWidthService], }) export class CoreModule { diff --git a/src/app/core/nav-menu/components/app-nav/app-nav.component.html b/src/app/core/nav-menu/components/app-nav/app-nav.component.html index 29e97c6acf..bdde2e713f 100644 --- a/src/app/core/nav-menu/components/app-nav/app-nav.component.html +++ b/src/app/core/nav-menu/components/app-nav/app-nav.component.html @@ -1,17 +1,23 @@
- +