adjusting for non-logged users
This commit is contained in:
parent
b8e4c74e81
commit
0a804990ee
|
@ -20,14 +20,7 @@ import { UserRouteAccessService } from 'app/core/auth/user-route-access.service'
|
|||
canActivate: [UserRouteAccessService],
|
||||
loadChildren: () => import('./admin/admin-routing.module').then(m => m.AdminRoutingModule),
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import(`./entities/entity-routing.module`).then(m => m.EntityRoutingModule),
|
||||
},
|
||||
{
|
||||
path: 'operations',
|
||||
loadChildren: () => import('./operations/operations.module').then(m => m.OperationsModule),
|
||||
},
|
||||
|
||||
navbarRoute,
|
||||
...errorRoute,
|
||||
],
|
||||
|
|
|
@ -1,84 +1,97 @@
|
|||
<div class="row" >
|
||||
<div *ngIf="isLoading" class="loader-container">
|
||||
<mat-spinner mode="indeterminate" style="top: 50%; left: 50%;"></mat-spinner>
|
||||
</div>
|
||||
<div class="d-flex flex-row py-4">
|
||||
<div id="btn-group" class="col-md-3 mt-3">
|
||||
<button mat-raised-button color="primary"><mat-icon>source</mat-icon> <span>File</span></button>
|
||||
<button mat-raised-button color="primary"><mat-icon>edit</mat-icon> <span>Edit</span></button>
|
||||
<button mat-raised-button color="primary"><mat-icon>explore</mat-icon> <span>View</span></button>
|
||||
<button mat-raised-button color="primary"><mat-icon>help</mat-icon><span>Help</span></button>
|
||||
|
||||
<div id="restree" class="m-3">
|
||||
<h4>Available Resources</h4>
|
||||
<div class="col-md-3" id="tree-view">
|
||||
<jhi-rsc-tree id="leftTree" (resourceTypeEm)="buildTableData($event)"></jhi-rsc-tree>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div [ngSwitch]="account !== null">
|
||||
<div class="alert alert-success" *ngSwitchCase="true">
|
||||
<span id="home-logged-message" *ngIf="account" jhiTranslate="home.logged.message"
|
||||
[translateValues]="{ username: account.login }">You are logged in as user "{{account.login}}".</span>
|
||||
<div class="row" id="generalContainer">
|
||||
<div [ngSwitch]="account !== null">
|
||||
<div *ngSwitchCase="true">
|
||||
<div class="alert alert-success">
|
||||
<h3 id="home-logged-message" *ngIf="account" jhiTranslate="home.logged.message"
|
||||
[translateValues]="{ username: account.login }">You are logged in as user "{{account.login}}"</h3>
|
||||
</div>
|
||||
<!--
|
||||
<div class="d-inline-block my-3">
|
||||
<mat-form-field>
|
||||
<mat-label>Your Contexts</mat-label>
|
||||
<mat-select>
|
||||
<mat-option *ngFor="let context of getContexts()" [value]="context">
|
||||
{{context|contexttransform}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
|
||||
<div *ngIf="isLoading" class="loader-container">
|
||||
<mat-spinner mode="indeterminate" style="top: 50%; left: 50%;"></mat-spinner>
|
||||
</div>
|
||||
<div class="d-flex flex-row py-4">
|
||||
<div id="btn-group" class="col-md-3 mt-3">
|
||||
<button mat-raised-button color="primary"><mat-icon>source</mat-icon> <span>File</span></button>
|
||||
<button mat-raised-button color="primary"><mat-icon>edit</mat-icon> <span>Edit</span></button>
|
||||
<button mat-raised-button color="primary"><mat-icon>explore</mat-icon> <span>View</span></button>
|
||||
<button mat-raised-button color="primary"><mat-icon>help</mat-icon><span>Help</span></button>
|
||||
<div id="restree" class="m-3">
|
||||
<h4>Available Resources</h4>
|
||||
<div class="col-md-3" id="tree-view">
|
||||
<jhi-rsc-tree id="leftTree" (resourceTypeEm)="buildTableData($event)"></jhi-rsc-tree>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
<!-- inizio ngSwitch-account -->
|
||||
<!-- <div [ngSwitch]="account !== null">
|
||||
<div class="alert alert-success" *ngSwitchCase="true">
|
||||
<span id="home-logged-message" *ngIf="account" jhiTranslate="home.logged.message"
|
||||
[translateValues]="{ username: account.login }">You are logged in as user "{{account.login}}".</span>
|
||||
</div>
|
||||
|
||||
<div class="d-inline-block my-3">
|
||||
<mat-form-field>
|
||||
<mat-label>Your Contexts</mat-label>
|
||||
<mat-select>
|
||||
<mat-option *ngFor="let context of getContexts()" [value]="context">
|
||||
{{context|contexttransform}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
-->
|
||||
<div>
|
||||
<div class="d-inline-block my-3" ngbDropdown #myDrop="ngbDropdown" ></div>
|
||||
|
||||
|
||||
<form [formGroup]="chooseContextForm">
|
||||
<mat-form-field appearance="outline" class="form-field">
|
||||
<mat-label for="namefield" class="ml-4 ">Context name</mat-label>
|
||||
<input matInput panel
|
||||
#contextInput (keyup)="(0)"
|
||||
[matAutocomplete]="auto"
|
||||
placeholder="Name" type="text"
|
||||
[formControl]="namefield"
|
||||
/>
|
||||
<mat-error>Please, enter a valid name!</mat-error>
|
||||
<mat-autocomplete #auto="matAutocomplete" [panelWidth]=350 [displayWith]="displayFn.bind(this)">
|
||||
<mat-option *ngFor="let fctx of filteredContexts | async" [value]="fctx">
|
||||
<span>{{ fctx.path }}</span>
|
||||
</mat-option>
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
-->
|
||||
<div>
|
||||
<div class="d-inline-block my-3" ngbDropdown #myDrop="ngbDropdown" ></div>
|
||||
|
||||
|
||||
<form [formGroup]="chooseContextForm">
|
||||
<mat-form-field appearance="outline" class="form-field">
|
||||
<mat-label for="namefield" class="ml-4 ">Context name</mat-label>
|
||||
<input matInput panel
|
||||
#contextInput (keyup)="(0)"
|
||||
[matAutocomplete]="auto"
|
||||
placeholder="Name" type="text"
|
||||
[formControl]="namefield"
|
||||
/>
|
||||
<mat-error>Please, enter a valid name!</mat-error>
|
||||
<mat-autocomplete #auto="matAutocomplete" [panelWidth]=350 [displayWith]="displayFn.bind(this)">
|
||||
<mat-option *ngFor="let fctx of filteredContexts | async" [value]="fctx">
|
||||
<span>{{ fctx.path }}</span>
|
||||
</mat-option>
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
<mat-form-field id="uidfield" [style.width.px]=327 appearance="outline" class="form-field">
|
||||
<mat-label for="uidfield">Context UUID</mat-label>
|
||||
<input matInput class="uid-input" type="text" placeholder="UUID" formControlName="uidfield" readonly [value]="namefield.value.id" />
|
||||
</mat-form-field>
|
||||
<button mat-button (click)="copyUid(namefield)" color="primary" matTooltip="copy UUID" matTooltipPosition="below">
|
||||
<mat-icon class="icon-wide2">content_copy</mat-icon>
|
||||
</button>
|
||||
<button mat-button color="primary" matTooltip="locate" matTooltipPosition="below">
|
||||
<mat-icon class="icon-wide2">location_searching</mat-icon>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
|
||||
<div [ngSwitch]="resType">
|
||||
<div *ngSwitchCase = "'HostingNode'">
|
||||
<jhi-table-screen [resourceType]="resType"></jhi-table-screen>
|
||||
<mat-form-field id="uidfield" [style.width.px]=327 appearance="outline" class="form-field">
|
||||
<mat-label for="uidfield">Context UUID</mat-label>
|
||||
<input matInput class="uid-input" type="text" placeholder="UUID" formControlName="uidfield" readonly [value]="namefield.value.id" />
|
||||
</mat-form-field>
|
||||
<button mat-button (click)="copyUid(namefield)" color="primary" matTooltip="copy UUID" matTooltipPosition="below">
|
||||
<mat-icon class="icon-wide2">content_copy</mat-icon>
|
||||
</button>
|
||||
<button mat-button color="primary" matTooltip="locate" matTooltipPosition="below">
|
||||
<mat-icon class="icon-wide2">location_searching</mat-icon>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
|
||||
<div [ngSwitch]="resType">
|
||||
<div *ngSwitchCase = "'HostingNode'">
|
||||
<jhi-table-screen [resourceType]="resType"></jhi-table-screen>
|
||||
</div>
|
||||
<div *ngSwitchCase = "'EService'">
|
||||
<jhi-table-screen-es [resourceType]="resType"></jhi-table-screen-es>
|
||||
</div>
|
||||
<div *ngSwitchDefault>Please navigate the resource type tree and select one</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngSwitchCase = "'EService'">
|
||||
<jhi-table-screen-es [resourceType]="resType"></jhi-table-screen-es>
|
||||
</div>
|
||||
<div *ngSwitchDefault>Please navigate the resource type tree and select one</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end successful login -->
|
||||
<div class="alert alert-warning" *ngSwitchCase="false">
|
||||
<h3>Please log in or check your credentials! </h3>
|
||||
</div>
|
||||
</div><!-- end ngSwitch-account -->
|
||||
</div><!-- end generalContainer -->
|
||||
|
||||
|
|
|
@ -76,8 +76,6 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
this.allCtxs = res;
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.subscriptions.push(this.progressService.getState()
|
||||
.pipe()
|
||||
.subscribe(res => {
|
||||
|
|
Loading…
Reference in New Issue