blob: 43aaf5ada68fe6086e1ce1e286694feab2ce7c38 [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 resource-btns">
<div class="selection">
<span
matTooltip="{{!healthStatus?.projectAssigned ? 'You are not assigned to any project' : 'You have not any active project'}}"
matTooltipPosition="above"
[matTooltipClass]="'full-size-tooltip'"
[matTooltipDisabled]="healthStatus?.projectAssigned && resourcesGrid.activeProjectsList?.length !== 0"
>
<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 project</mat-label>
<mat-select
disableOptionCentering
[(value)]="resourcesGrid.activeProject"
panelClass="top-select scrolling"
>
<mat-option
*ngIf="projects?.length > 1"
(click)="setActiveProject('')"
>
Show all
</mat-option>
<mat-option
*ngFor="let project of projects"
[value]="project"
(click)="setActiveProject(project)"
>
{{ project }}
</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]="'full-size-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>
<span>
<button mat-raised-button class="butt butt-tool" (click)="manageUngit()">
<i class="material-icons"></i>Git credentials
</button>
</span>
<span>
<button mat-raised-button class="butt butt-tool show-all-btn" (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>
</span>
<span>
<button mat-raised-button class="butt" (click)="refreshGrid()">
<i class="material-icons highlight">autorenew</i>Refresh
</button>
</span>
</div>
</div>
<mat-divider></mat-divider>
<resources-grid (getEnvironments)="getEnvironments($event)" ></resources-grid>
</div>