Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation change #3449

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
241c89f
Move tabs to left nav
KlapTrap Dec 13, 2018
1ecde10
Add page header from side nav
KlapTrap Dec 13, 2018
e8f3f17
Add new page side nav
KlapTrap Dec 13, 2018
428d43b
Remove old side nav open close logic
KlapTrap Dec 14, 2018
b2af12f
Improve sub nav layout
KlapTrap Dec 14, 2018
eb7d9f8
Remove unused mobile nav logic
KlapTrap Dec 14, 2018
92fe6f7
Add icons to cf page
KlapTrap Dec 14, 2018
e861a04
Update icons for all CF side navs
KlapTrap Dec 14, 2018
8b3a250
Tidy up page sub nav
KlapTrap Dec 14, 2018
af76f15
Fix scss import
KlapTrap Dec 17, 2018
9cd3761
Merge branch 'v2-master' into tabs-layout-change
KlapTrap Dec 17, 2018
68a6216
Merge branch 'v2-master' into tabs-layout-change
KlapTrap Dec 31, 2018
ede7a61
Remove manage user button
KlapTrap Dec 31, 2018
e2f41a1
Merge branch 'v2-master' into tabs-layout-change
KlapTrap Feb 19, 2019
84623b4
Fix home left tab
KlapTrap Feb 19, 2019
a744be6
Add WIP breadcrumbs
KlapTrap Feb 19, 2019
e70c53e
Merge branch 'v2-master' into tabs-layout-change
KlapTrap Mar 18, 2019
b910e0f
Post merge fixes
KlapTrap Mar 19, 2019
7535d33
Editor config change
KlapTrap Mar 19, 2019
1f5fcae
Applciation sub nav and sub nav changes
KlapTrap Mar 19, 2019
b73e7eb
Fix compilation issues
nwmac Mar 21, 2019
14983a6
Merge remote-tracking branch 'origin/v2-master' into tabs-layout-change
nwmac Mar 21, 2019
d65dbaa
Merge branch 'fix-unknown-endpoint-types' into tabs-layout-change
nwmac Mar 21, 2019
e161c6e
Fix for endpoint favorite card when endpoint type is not known
nwmac Mar 21, 2019
7fcda8c
Add support for icon mode and a few tidy ups
nwmac Mar 21, 2019
c7bd4df
Various fixes and tweaks
nwmac Mar 22, 2019
607e948
Merge remote-tracking branch 'origin/v2-master' into navigation-change
nwmac Mar 25, 2019
1320c8a
Fix code climate issues
nwmac Mar 25, 2019
fe6d254
Fix lint issue
nwmac Mar 25, 2019
83f636a
PR feedback fixes
nwmac Mar 27, 2019
96e7753
PR Fixes
nwmac Mar 27, 2019
91e61f5
Remove warning on startup
richard-cox Mar 27, 2019
c4b39e6
Changes following review
richard-cox Mar 27, 2019
95edbcc
Temp fix for tables with cells that use `white-space: nowrap;` and ha…
richard-cox Mar 28, 2019
7109d51
Fix delete space on space page
richard-cox Apr 1, 2019
09122ca
Merge remote-tracking branch 'origin/v2-master' into navigation-change
richard-cox Apr 8, 2019
926b7e2
Add delay to side nav slide out
richard-cox Apr 9, 2019
b69cc87
Add side nav icon for new user service tab
richard-cox Apr 9, 2019
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
Prev Previous commit
Next Next commit
Post merge fixes
  • Loading branch information
KlapTrap committed Mar 19, 2019
commit b910e0fbbc7a40e5cabc11b3408323344c4697e9
3 changes: 3 additions & 0 deletions src/frontend/packages/core/sass/_all-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import '../src/features/dashboard/dashboard-base/dashboard-base.component.theme';
@import '../src/features/login/login-page/login-page.component.theme';
@import '../src/features/applications/deploy-application/deploy-application.component.theme';
@import '../src/features/dashboard/page-side-nav/page-side-nav.component.theme';
@import '../src/features/cloud-foundry/tabs/cloud-foundry-firehose/cloud-foundry-firehose.component.theme';
@import '../src/features/about/about-page/about-page.component.theme';
@import '../src/shared/components/display-value/display-value.component.theme';
Expand Down Expand Up @@ -127,6 +128,8 @@ $side-nav-light-active: #484848;
@include metrics-chart-theme($theme, $app-theme);
@include metrics-range-selector-theme($theme, $app-theme);
@include app-multiline-title-theme($theme, $app-theme);
@include page-side-nav-theme($theme, $app-theme);
// @include cf-admin-add-user-warning($theme, $app-theme);
richard-cox marked this conversation as resolved.
Show resolved Hide resolved
}

@function app-generate-nav-theme($theme, $nav-theme: null) {
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/packages/core/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import { ApplicationStateService } from './shared/components/application-state/a
import { favoritesConfigMapper } from './shared/components/favorites-meta-card/favorite-config-mapper';
import { SharedModule } from './shared/shared.module';
import { XSRFModule } from './xsrf.module';
import { TabNavService } from '../tab-nav.service';

// Create action for router navigation. See
// - https://github.com/ngrx/platform/issues/68
Expand Down Expand Up @@ -117,6 +118,7 @@ export class CustomRouterStateSerializer
CloudFoundryModule
],
providers: [
TabNavService,
LoggedInService,
ExtensionService,
DynamicExtensionRoutes,
Expand Down
12 changes: 6 additions & 6 deletions src/frontend/packages/core/src/app.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const appRoutes: Routes = [
path: 'home', component: HomePageComponent,
data: {
stratosNavigation: {
text: 'Home',
label: 'Home',
matIcon: 'home',
position: 10
}
Expand All @@ -41,7 +41,7 @@ const appRoutes: Routes = [
loadChildren: './features/applications/applications.module#ApplicationsModule',
data: {
stratosNavigation: {
text: 'Applications',
label: 'Applications',
matIcon: 'apps',
position: 20
}
Expand All @@ -51,7 +51,7 @@ const appRoutes: Routes = [
path: 'endpoints',
data: {
stratosNavigation: {
text: 'Endpoints',
label: 'Endpoints',
matIcon: 'settings_ethernet',
position: 100
}
Expand All @@ -69,7 +69,7 @@ const appRoutes: Routes = [
path: 'marketplace', loadChildren: './features/service-catalog/service-catalog.module#ServiceCatalogModule',
data: {
stratosNavigation: {
text: 'Marketplace',
label: 'Marketplace',
matIcon: 'store',
position: 30
}
Expand All @@ -79,7 +79,7 @@ const appRoutes: Routes = [
path: 'services', loadChildren: './features/services/services.module#ServicesModule',
data: {
stratosNavigation: {
text: 'Services',
label: 'Services',
matIcon: 'service',
matIconFont: 'stratos-icons',
position: 40
Expand All @@ -90,7 +90,7 @@ const appRoutes: Routes = [
path: 'cloud-foundry', loadChildren: './features/cloud-foundry/cloud-foundry.module#CloudFoundryModule',
data: {
stratosNavigation: {
text: 'Cloud Foundry',
label: 'Cloud Foundry',
matIcon: 'cloud_foundry',
matIconFont: 'stratos-icons',
position: 50
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/packages/core/src/core/core.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { TruncatePipe } from './truncate.pipe';
import { UserService } from './user.service';
import { UtilsService } from './utils.service';
import { WindowRef } from './window-ref/window-ref.service';

import { PortalModule } from '@angular/cdk/portal';

@NgModule({
imports: [
Expand All @@ -51,6 +51,7 @@ import { WindowRef } from './window-ref/window-ref.service';
DotContentComponent,
ButtonBlurOnClickDirective,
PageNotFoundComponentComponent,
PortalModule,
EntityFavoriteStarComponent,
RecentEntitiesComponent,
DisableRouterLinkDirective
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ <h1>{{ (applicationService.application$ | async)?.app?.entity?.name }} </h1>
</span>
</div>
</app-page-header>
<app-page-sub-nav>
</app-page-sub-nav>
<app-loading-page [entityId]="applicationService.appGuid" [entitySchema]="schema" deleteText="Deleting application"
text="Retrieving application" class="router-component">
<router-outlet></router-outlet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { GitSCMService, GitSCMType } from '../../../../shared/data-services/scm/
import { ENTITY_SERVICE } from '../../../../shared/entity.tokens';
import { ApplicationData, ApplicationService } from '../../application.service';
import { EndpointsService } from './../../../../core/endpoints.service';
import { IPageSideNavTab } from '../../../dashboard/page-side-nav/page-side-nav.component';

// Confirmation dialogs
const appStopConfirmation = new ConfirmationDialogConfig(
Expand Down Expand Up @@ -127,14 +128,14 @@ export class ApplicationTabsBaseComponent implements OnInit, OnDestroy {
);

this.tabLinks = [
{ link: 'summary', label: 'Summary' },
{ link: 'instances', label: 'Instances' },
{ link: 'routes', label: 'Routes' },
{ link: 'log-stream', label: 'Log Stream' },
{ link: 'services', label: 'Services' },
{ link: 'variables', label: 'Variables', hidden: appDoesNotHaveEnvVars$ },
{ link: 'events', label: 'Events' }
];
{ link: 'summary', label: 'Summary', matIcon: 'description' },
{ link: 'instances', label: 'Instances', matIcon: 'library_books' },
{ link: 'routes', label: 'Routes', matIconFont: 'stratos-icons', matIcon: 'network_route' },
{ link: 'log-stream', label: 'Log Stream', matIcon: 'featured_play_list' },
{ link: 'services', label: 'Services', matIconFont: 'stratos-icons', matIcon: 'service' },
{ link: 'variables', label: 'Variables', matIcon: 'lock', hidden: appDoesNotHaveEnvVars$ },
{ link: 'events', label: 'Events', matIcon: 'watch_later' }
];;

this.endpointsService.hasMetrics(applicationService.cfGuid).subscribe(hasMetrics => {
if (hasMetrics) {
Expand Down Expand Up @@ -183,7 +184,7 @@ export class ApplicationTabsBaseComponent implements OnInit, OnDestroy {
update => update[this.autoRefreshString] || { busy: false }
));

tabLinks: ISubHeaderTabs[];
tabLinks: IPageSideNavTab[];

private getBreadcrumbs(
application: IApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
StratosTabType,
} from '../../../core/extension/extension-service';
import { environment } from '../../../environments/environment.prod';
import { ISubHeaderTabs } from '../../../shared/components/page-subheader/page-subheader.types';
import { CloudFoundryEndpointService } from '../services/cloud-foundry-endpoint.service';
import { IPageSideNavTab } from '../../dashboard/page-side-nav/page-side-nav.component';

@Component({
selector: 'app-cloud-foundry-tabs-base',
Expand All @@ -27,15 +27,15 @@ export class CloudFoundryTabsBaseComponent implements OnInit {
static users = 'users';
static cells = 'cells';

public tabLinks: ISubHeaderTabs[];
public tabLinks: IPageSideNavTab[];

// Used to hide tab that is not yet implemented when in production
isDevEnvironment = !environment.production;

isFetching$: Observable<boolean>;

public canAddOrg$: Observable<boolean>;

public tabsHeader = 'Cloud Foundry';
public extensionActions: StratosActionMetadata[] = getActionsFromExtensions(StratosActionType.CloudFoundry);

public favorite$: Observable<UserFavoriteEndpoint>;
Expand Down Expand Up @@ -71,29 +71,33 @@ export class CloudFoundryTabsBaseComponent implements OnInit {

// Default tabs + add any tabs from extensions
this.tabLinks = [
{ link: 'summary', label: 'Summary' },
{ link: 'organizations', label: 'Organizations' },
{ link: 'summary', label: 'Summary', matIcon: 'description' },
{ link: 'organizations', label: 'Organizations', matIcon: 'organization', matIconFont: 'stratos-icons' },
{
link: CloudFoundryTabsBaseComponent.cells,
label: 'Cells',
matIcon: 'select_all',
hidden: cellsHidden$
},
{ link: 'routes', label: 'Routes' },
{ link: 'routes', label: 'Routes', matIcon: 'network_route', matIconFont: 'stratos-icons', },
{
link: CloudFoundryTabsBaseComponent.users,
label: 'Users',
hidden: usersHidden$
hidden: usersHidden$,
matIcon: 'people'
},
{
link: CloudFoundryTabsBaseComponent.firehose,
label: 'Firehose',
hidden: firehoseHidden$
hidden: firehoseHidden$,
matIcon: 'featured_play_list'
},
{ link: 'feature-flags', label: 'Feature Flags' },
{ link: 'build-packs', label: 'Build Packs' },
{ link: 'stacks', label: 'Stacks' },
{ link: 'security-groups', label: 'Security Groups' }
].concat(getTabsFromExtensions(StratosTabType.CloudFoundry));
{ link: 'feature-flags', label: 'Feature Flags', matIcon: 'flag' },
{ link: 'build-packs', label: 'Build Packs', matIcon: 'build' },
{ link: 'stacks', label: 'Stacks', matIcon: 'code' },
{ link: 'security-groups', label: 'Security Groups', matIcon: 'security' },
...getTabsFromExtensions(StratosTabType.CloudFoundry)
];
}

ngOnInit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { Observable } from 'rxjs';
import { first, map } from 'rxjs/operators';

import { IHeaderBreadcrumb } from '../../../../../../shared/components/page-header/page-header.types';
import { ISubHeaderTabs } from '../../../../../../shared/components/page-subheader/page-subheader.types';
import { getActiveRouteCfCellProvider } from '../../../../cf.helpers';
import { CloudFoundryEndpointService } from '../../../../services/cloud-foundry-endpoint.service';
import { CloudFoundryCellService } from '../cloud-foundry-cell.service';
import { entityFactory, metricSchemaKey } from '../../../../../../../../store/src/helpers/entity-factory';
import { IPageSideNavTab } from '../../../../../dashboard/page-side-nav/page-side-nav.component';

@Component({
selector: 'app-cloud-foundry-cell-base',
Expand All @@ -22,10 +22,11 @@ export class CloudFoundryCellBaseComponent {

static AppsLinks = 'apps';

tabLinks: ISubHeaderTabs[] = [
tabLinks: IPageSideNavTab[] = [
{
link: 'summary',
label: 'Summary'
label: 'Summary',
matIcon: 'description'
},
{
link: 'charts',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import {
import { getFavoriteFromCfEntity } from '../../../../../core/user-favorite-helpers';
import { environment } from '../../../../../environments/environment.prod';
import { IHeaderBreadcrumb } from '../../../../../shared/components/page-header/page-header.types';
import { ISubHeaderTabs } from '../../../../../shared/components/page-subheader/page-subheader.types';
import { CfUserService } from '../../../../../shared/data-services/cf-user.service';
import { getActiveRouteCfOrgSpaceProvider } from '../../../cf.helpers';
import { CloudFoundryEndpointService } from '../../../services/cloud-foundry-endpoint.service';
import { CloudFoundryOrganizationService } from '../../../services/cloud-foundry-organization.service';
import { IPageSideNavTab } from '../../../../dashboard/page-side-nav/page-side-nav.component';

@Component({
selector: 'app-cloud-foundry-organization-base',
Expand All @@ -35,21 +35,23 @@ import { CloudFoundryOrganizationService } from '../../../services/cloud-foundry
})
export class CloudFoundryOrganizationBaseComponent {

tabLinks: ISubHeaderTabs[] = [
tabLinks: IPageSideNavTab[] = [
{
link: 'summary',
label: 'Summary'
label: 'Summary',
matIcon: 'description'
},
{
link: 'spaces',
label: 'Spaces'
label: 'Spaces',
matIcon: 'language'
},
{
link: 'users',
label: 'Users',
matIcon: 'people'
}
];

public breadcrumbs$: Observable<IHeaderBreadcrumb[]>;

public name$: Observable<string>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { getActiveRouteCfOrgSpaceProvider } from '../../../../cf.helpers';
import { CloudFoundryEndpointService } from '../../../../services/cloud-foundry-endpoint.service';
import { CloudFoundryOrganizationService } from '../../../../services/cloud-foundry-organization.service';
import { CloudFoundrySpaceService } from '../../../../services/cloud-foundry-space.service';
import { IPageSideNavTab } from '../../../../../dashboard/page-side-nav/page-side-nav.component';

@Component({
selector: 'app-cloud-foundry-space-base',
Expand All @@ -40,26 +41,33 @@ import { CloudFoundrySpaceService } from '../../../../services/cloud-foundry-spa
})
export class CloudFoundrySpaceBaseComponent implements OnDestroy {

tabLinks = [
tabLinks: IPageSideNavTab[] = [
{
link: 'summary',
label: 'Summary',
matIcon: 'description'
},
{
link: 'apps',
label: 'Applications',
matIcon: 'apps'
},
{
link: 'service-instances',
label: 'Service Instances'
label: 'Services',
matIconFont: 'stratos-icons',
matIcon: 'service'
},
{
link: 'routes',
label: 'Routes',
matIconFont: 'stratos-icons',
matIcon: 'network_route'
},
{
link: 'users',
label: 'Users',
matIcon: 'people'
}
];

Expand Down
Loading