launcher.component.html 7.02 KB
Newer Older
1
2


Chris Hines's avatar
Chris Hines committed
3
4
<div  fxFlex style="flex: 1 1 0%; box-sizing: border-box">
<div fxLayout="column" fxLayoutAlign="space-around stretch" style="height: 100%; width: 100%" >
Chris Hines's avatar
Chris Hines committed
5
6
7
<mat-toolbar color="primary">
  <mat-toolbar-row>
    <button mat-icon-button (click)=idSideNav.toggle()><mat-icon>menu</mat-icon></button>
Chris Hines's avatar
Chris Hines committed
8

Chris Hines's avatar
Chris Hines committed
9
10
11
12
    <span>Strudel v2.0</span>
    <span class="fill-horizontal-space"></span>
    </mat-toolbar-row>
  </mat-toolbar>
13
<mat-sidenav-container style="height: 100%; width: 100%">
Chris Hines's avatar
Chris Hines committed
14
  <mat-sidenav #idSideNav mode="side" opened>
15
16
    <div fxLayout="column" style="height: 100%">
        <div>
Chris Hines's avatar
Chris Hines committed
17
            <mat-accordion style="width: 100%" [displayMode]="flat">
Chris Hines's avatar
Chris Hines committed
18
            <div *ngFor="let id of (computeSitesService.appidentities | async)">
Chris Hines's avatar
Chris Hines committed
19
                <mat-expansion-panel (afterExpand)="selectId(id)" (closed)="selectId(id)" style="width: 100%">
20
                    <mat-expansion-panel-header>
Chris Hines's avatar
Chris Hines committed
21
                    <mat-panel-title>
22
23
                        <span fxFlex matBadge="{{ countErrors((id.systemalerts | async), (id.accountalerts | async)) }}" 
                                                  [matBadgeHidden]= "countErrors((id.systemalerts | async), (id.accountalerts | async)) == 0"  
24
25
26
27
28
29
                                                  matBadgePosition="above before" 
                                                  matBadgeColor="warn" 
                                                  matBadgeOverlap="false" matBadgeSize="small"
                                                  style="text-align: left; margin-left: 20px; margin-top: 10px" >
                            {{ id.displayName() }}
                        </span>
Chris Hines's avatar
Chris Hines committed
30
                        </mat-panel-title>
31
                    </mat-expansion-panel-header>
32
                    <app-strudelapplist [applist]=id.site.appCatalog [identity]="id" (appChange)="selectApp($event)" style="width: 100%"></app-strudelapplist>
33
                </mat-expansion-panel>
Chris Hines's avatar
Chris Hines committed
34
            </div>
35
            </mat-accordion>
36
        </div>
37
        <div fxFlex></div>
Chris Hines's avatar
Chris Hines committed
38
39
40
41
42
        <mat-menu #actionmenu="matMenu">
            <div *ngFor="let az of (authService.loggedInAuthZ | async)">
                <button mat-menu-item routerLink="/logout"><mat-icon>logout</mat-icon>Log out of {{ az.name }}</button>
            </div>
            <button mat-menu-item routerLink="/settings"><mat-icon>settings</mat-icon>Settings</button>
43
            <button *ngIf="(authService.loggedOutAuthZ | async).length > 0" mat-menu-item routerLink="/login"><mat-icon>exit_to_app</mat-icon>Login</button>
Chris Hines's avatar
Chris Hines committed
44
45
46
47
        </mat-menu>
        <button  mat-icon-button [matMenuTriggerFor]="actionmenu">
            <mat-icon>person</mat-icon>
        </button>
48
    </div>
49
  </mat-sidenav>
Chris Hines's avatar
Chris Hines committed
50
51
  <mat-sidenav-content>
    <div fxLayout="column" style="height: 100%">
Chris Hines's avatar
Chris Hines committed
52

Chris Hines's avatar
Chris Hines committed
53
54
        
    <!-- the list of warning either on the computer system or the users account -->
Chris Hines's avatar
Chris Hines committed
55
56
57
58
    <div *ngIf="(identitySubject | async) !== null && (appSubject | async) === null" >
        <div *ngIf="countErrors(((identitySubject | async).systemalerts | async),((identitySubject | async).accountalerts | async)) == 0; then noAlerts else displayAlerts"></div>
        <ng-template #noAlerts><h2> No Alerts for {{ (identitySubject | async).displayName() }}</h2></ng-template>
        <ng-template #displayAlerts>
Chris Hines's avatar
Chris Hines committed
59

Chris Hines's avatar
Chris Hines committed
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
          <h2>Alerts for {{ (identitySubject | async).displayName() }}</h2>
          <!-- This is all the system level alerts-->
          <mat-list>
          <div *ngFor="let h of ((identitySubject | async).systemalerts | async)">
             <mat-list-item>
             <div *ngIf="h.stat == 'error'">
               <div class='health-warn'>
                {{ h.msg }}
               </div>
             </div>
             </mat-list-item>
          </div>
          </mat-list>

          <!-- this is all the user level alerts that are not quota -->
          <mat-list>
              <div *ngFor="let h of ((identitySubject | async).accountalerts | async)">
                 <div *ngIf="h.type === undefined || h.type != 'quota'">
                     <mat-list-item>
                         <div [ngClass]="h.stat == 'error' || h.stat == 'warn' ? 'health-warn': 'health-ok'">
                       {{ h.msg }}
                     </div>
                     </mat-list-item>
                 </div>
Chris Hines's avatar
Chris Hines committed
84
                 <div *ngIf="h.type == 'table'">
85
                     <table mat-table [dataSource]="h.data">
Chris Hines's avatar
Chris Hines committed
86
87
88
89
90
                         <ng-container *ngFor="let c of h.cols" matColumnDef="{{c.key}}">
                             <th mat-header-cell *matHeaderCellDef>{{c.name}}</th>
                             <th mat-cell *matCellDef="let row;"> {{row[c.key]}}</th>
                         </ng-container>
                         <!--<ng-container matColumnDef="usage">
91
92
93
94
95
96
                            <th mat-header-cell *matHeaderCellDef> Usage </th>
                            <td mat-cell *matCellDef="let row"> {{row.pu}} </td>
                          </ng-container>
                          <ng-container matColumnDef="quota">
                            <th mat-header-cell *matHeaderCellDef> Quota </th>
                            <td mat-cell *matCellDef="let row"> {{row.pq}} </td>
Chris Hines's avatar
Chris Hines committed
97
                          </ng-container>-->
98
99

                          <tr mat-header-row *matHeaderRowDef="displayedColumns" ></tr>
Chris Hines's avatar
Chris Hines committed
100
                          <!--<tr mat-row *matRowDef="let row; columns: displayedColumns;"  [ngClass]="quotaClass(row)"></tr>-->
101
102
                          <tr mat-row *matRowDef="let row;  columns: displayedColumns" ></tr>
                     </table>
Chris Hines's avatar
Chris Hines committed
103
                 </div>
Chris Hines's avatar
Chris Hines committed
104
105
106
107
              </div>
          </mat-list>

          <!-- this table contains all the user level alerts that are quotas -->
108
          <!--<table mat-table [dataSource]="quotas" style="width: 100%">
109

Chris Hines's avatar
Chris Hines committed
110
111
112
113
              <ng-container matColumnDef="resource">
                <th mat-header-cell *matHeaderCellDef> Resource </th>
                <td mat-cell *matCellDef="let quota"> {{quota.data.resource}} </td>
              </ng-container>
114

Chris Hines's avatar
Chris Hines committed
115
116
117
118
119
120
121
122
              <ng-container matColumnDef="usage">
                <th mat-header-cell *matHeaderCellDef> Usage </th>
                <td mat-cell *matCellDef="let quota"> {{humanKBytes(quota.data.usage)}} </td>
              </ng-container>
              <ng-container matColumnDef="quota">
                <th mat-header-cell *matHeaderCellDef> Quota </th>
                <td mat-cell *matCellDef="let quota"> {{humanKBytes(quota.data.quota)}} </td>
              </ng-container>
123

Chris Hines's avatar
Chris Hines committed
124
125
              <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
              <tr mat-row *matRowDef="let row; columns: displayedColumns;"  [ngClass]="quotaClass(row)"></tr>
126
          </table>-->
Chris Hines's avatar
Chris Hines committed
127
128
129
130
131
132
133
134
135

        </ng-template>
    </div>

    <div  *ngIf="(appSubject | async) !== null && (identitySubject | async)  !== null" >
      <app-launch-dialog [identity]="identitySubject | async" [appSubject]="appSubject"></app-launch-dialog>
      <app-joblist [identitySubject]="identitySubject" [appSubject]="appSubject"></app-joblist>
    </div>
    </div>
Chris Hines's avatar
Chris Hines committed
136

Chris Hines's avatar
Chris Hines committed
137
  </mat-sidenav-content>
Chris Hines's avatar
Chris Hines committed
138

Chris Hines's avatar
Chris Hines committed
139
140
141
</mat-sidenav-container>

<!-- <app-joblist></app-joblist> -->