core/bootstrap/bootstrap.component.ts
OnDestroy
OnInit
selector | c8y-bootstrap |
templateUrl | ./bootstrap.template.html |
Properties |
|
Methods |
|
constructor(tabs: TabsService, ui: AppStateService, navigator: NavigatorService, actionBar: ActionBarService, headerService: HeaderService, options: OptionsService, pluginsResolve: PluginsResolveService, setupService: SetupService, loginService: LoginService)
|
||||||||||||||||||||||||||||||
Parameters :
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
Async ngOnInit |
ngOnInit()
|
Returns :
any
|
Public actionBar |
Type : ActionBarService
|
Public headerService |
Type : HeaderService
|
Public loginService |
Type : LoginService
|
Public navigator |
Type : NavigatorService
|
navigatorOpen$ |
Type : Observable<boolean>
|
noAppsMargin$ |
Type : Observable<boolean>
|
Public setupService |
Type : SetupService
|
showLoadingIndicator$ |
Type : Observable<boolean>
|
showLogin$ |
Type : Observable<boolean>
|
showMainView$ |
Type : Observable<boolean>
|
showPoweredBy |
Default value : true
|
showSetup$ |
Type : Observable<boolean>
|
Public tabs |
Type : TabsService
|
tabsOrientation |
Type : string
|
Public ui |
Type : AppStateService
|
<c8y-message-banner
*ngIf="!(showLogin$ | async)"
class="c8y-message-banner"
></c8y-message-banner>
<c8y-login *ngIf="showLogin$ | async"></c8y-login>
<div
class="init-load"
*ngIf="showLoadingIndicator$ | async"
>
<div class="spinner-snake"></div>
<div class="mainlogo-placeholder mainlogo"></div>
</div>
<div
[class.head-open]="headerService.headerOpen"
*ngIf="showMainView$ | async"
>
<c8y-header-bar
*ngIf="!headerService.hideHeader"
#header
></c8y-header-bar>
<c8y-drawer-outlet
[tabindex]="(headerService.navigatorOpen$ | async) ? '0' : '-1'"
role="region"
position="left"
data-cy="bootstrap.template--c8y-drawer-outlet"
[open]="headerService.navigatorOpen$ | async"
></c8y-drawer-outlet>
<div class="alerts">
<c8y-alert-outlet></c8y-alert-outlet>
</div>
<c8y-tabs-outlet
role="navigation"
#tabsComponent
[tabs]="tabs.items$ | async"
[hasHeader]="tabsComponent.hasHeader"
[navigatorOpen]="headerService.navigatorOpen$ | async"
[orientation]="tabs.orientation$ | async"
></c8y-tabs-outlet>
<c8y-action-bar
role="group"
#actionBarComponent
[navigatorOpen]="headerService.navigatorOpen$ | async"
[hasTabs]="tabsComponent.hasTabs"
[hasHeader]="tabsComponent.hasHeader"
[isTabsHorizontal]="tabsComponent?.isHorizontal"
[items$]="actionBar.items$"
></c8y-action-bar>
<div
class="mcontainer"
[ngClass]="{
open: headerService.navigatorOpen$ | async,
'no-apps-margin': noAppsMargin$ | async,
'horizontal-tabs': tabsComponent.isHorizontal,
'vertical-tabs': !tabsComponent.isHorizontal,
'has-tabs': tabsComponent.hasTabs,
'has-action-bar': !actionBarComponent?.hidden,
'has-header': headerService.hideHeader
}"
>
<main
class="container-fluid"
id="main-content"
tabindex="-1"
>
<router-outlet></router-outlet>
<ng-content select="#c8y-legacy-view"></ng-content>
<!-- legacy ng-view, will not be migrated atm -->
</main>
</div>
</div>
<div *ngIf="showSetup$ | async">
<c8y-header-bar
*ngIf="!headerService.hideHeader"
[simple]="true"
></c8y-header-bar>
<div class="alerts">
<c8y-alert-outlet></c8y-alert-outlet>
</div>
<div
class="mcontainer"
role="main"
>
<div class="container-fluid">
<c8y-setup></c8y-setup>
</div>
</div>
</div>
<c8y-cookie-banner></c8y-cookie-banner>