blob: 50c91c2aeecb22c4f3c294f449ff72f243624065 [file] [log] [blame]
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<div class="base-retreat">
<div class="sub-nav">
<div class="selection">
<span
matTooltip="{{!healthStatus?.projectAssigned ? 'You are not assigned to any project' : 'You have not any active project'}}"
matTooltipPosition="above"
matTooltipDisabled="{{healthStatus?.projectAssigned && resourcesGrid.activeProjectsList.length}}"
[matTooltipClass]="'bucket-item-tooltip'"
>
<span>{{resourcesGrid.activeProject}}</span>
<button mat-raised-button class="butt butt-create" (click)="createEnvironment()"
[disabled]="!healthStatus?.projectAssigned || !resourcesGrid.activeProjectsList.length">
<i class="material-icons">add</i>Create new
</button>
</span>
<div class="mat-reset">
<div class="control selector-wrapper" *ngIf="projects.length">
<mat-form-field>
<mat-label>Select active project</mat-label>
<mat-select [(value)]="resourcesGrid.activeProject">
<mat-option *ngIf="projects.length > 1" (click)="setActiveProject()">Show all</mat-option>
<mat-option *ngFor="let project of projects" [value]="project.name"
(click)="setActiveProject(project.name)">
{{ project.name }}</mat-option>
<mat-option *ngIf="!projects.length" class="multiple-select ml-10" disabled>Projects list is empty
</mat-option>
</mat-select>
<button class="caret">
<i class="material-icons">keyboard_arrow_down</i>
</button>
</mat-form-field>
</div>
</div>
</div>
<div>
<span matTooltip="{{!this.bucketStatus?.view ? 'You have not permission to open bucket browser' : 'You have not any bucket'}}"
matTooltipPosition="above"
matTooltipDisabled="{{resourcesGrid.bucketsList?.length > 0 && this.bucketStatus?.view}}"
[matTooltipClass]="'bucket-item-tooltip'"
>
<button mat-raised-button class="butt butt-tool" (click)="bucketBrowser(this.bucketStatus?.view)"
[disabled]="!this.bucketStatus?.view || resourcesGrid.bucketsList?.length === 0">
<i class="material-icons"></i>Bucket browser
</button>
</span>
<button mat-raised-button class="butt butt-tool" (click)="manageUngit()">
<i class="material-icons"></i>Git credentials
</button>
<button mat-raised-button class="butt butt-tool" (click)="toggleFiltering()">
<span *ngIf="!resourcesGrid.activeFiltering">
<i class="material-icons">visibility_off</i> Show active
</span>
<span *ngIf="resourcesGrid.activeFiltering">
<i class="material-icons">visibility</i> Show all
</span>
</button>
<button mat-raised-button class="butt" (click)="refreshGrid()">
<i class="material-icons">autorenew</i>Refresh
</button>
</div>
</div>
<mat-divider></mat-divider>
<resources-grid></resources-grid>
</div>