in networks the tooltip shows the description

This commit is contained in:
Dragos 2021-05-13 13:59:43 +03:00
parent adfc05b387
commit 53b8b4e7af
5 changed files with 14 additions and 5 deletions

Binary file not shown.

Binary file not shown.

View File

@ -11,7 +11,7 @@
<ng-container *ngIf="vlans && vlans.length"> <ng-container *ngIf="vlans && vlans.length">
<div class="input-group mb-3 input-group-pill flex-grow-1 flex-grow-sm-0 me-sm-3 w-sm-auto w-100"> <div class="input-group mb-3 input-group-pill flex-grow-1 flex-grow-sm-0 me-sm-3 w-sm-auto w-100">
<input type="text" class="form-control" placeholder="Search by name..." formControlName="searchTerm" appAlphaOnly="^[A-Za-z0-9_-]+$"> <input type="text" class="form-control" placeholder="Search by name or description..." formControlName="searchTerm" appAlphaOnly="^[A-Za-z0-9_-]+$">
<button class="btn btn-outline-info" type="button" (click)="clearSearch()" [disabled]="!editorForm.get('searchTerm').value" <button class="btn btn-outline-info" type="button" (click)="clearSearch()" [disabled]="!editorForm.get('searchTerm').value"
tooltip="Clear search" container="body" placement="top" [adaptivePosition]="false"> tooltip="Clear search" container="body" placement="top" [adaptivePosition]="false">
<fa-icon icon="times" size="sm" [fixedWidth]="true"></fa-icon> <fa-icon icon="times" size="sm" [fixedWidth]="true"></fa-icon>
@ -45,10 +45,14 @@
<div class="overflow-auto flex-grow-1 mt-1"> <div class="overflow-auto flex-grow-1 mt-1">
<div class="container my-2"> <div class="container my-2">
<h2 *ngIf="listItems && listItems.length === 0 && vlans && vlans.length > 0" class="text-uppercase">
{{ 'networking.networks.list.noResults' | translate }}
</h2>
<accordion [isAnimated]="false" [closeOthers]="false"> <accordion [isAnimated]="false" [closeOthers]="false">
<accordion-group *ngFor="let vlan of listItems" (isOpenChange)="getNetworks($event, vlan)"> <accordion-group *ngFor="let vlan of listItems" (isOpenChange)="getNetworks($event, vlan)">
<div class="d-flex justify-content-between align-items-center sticky-top" accordion-heading <div class="d-flex justify-content-between align-items-center sticky-top" accordion-heading
tooltip="Show or hide this VLAN's networks" placement="top" [adaptivePosition]="false" container="body"> [tooltip]="vlan.description" placement="top" [adaptivePosition]="false" container="body">
<h4 class="mb-0"> <h4 class="mb-0">
<span class="text-info me-2">{{ vlan.name }}</span> <span class="text-info me-2">{{ vlan.name }}</span>
<small class="vlan-id text-faded"> <small class="vlan-id text-faded">
@ -144,7 +148,7 @@
<li role="menuitem"> <li role="menuitem">
<button class="dropdown-item" (click)="showVlanEditor(vlan)"> <button class="dropdown-item" (click)="showVlanEditor(vlan)">
<fa-icon icon="pen" [fixedWidth]="true"></fa-icon> <fa-icon icon="pen" [fixedWidth]="true"></fa-icon>
Rename this virtual network Edit this virtual network
</button> </button>
</li> </li>
<li class="dropdown-divider"></li> <li class="dropdown-divider"></li>

View File

@ -51,7 +51,8 @@ export class NetworksComponent implements OnInit, OnDestroy
threshold: .3, // Lower value means a more exact search threshold: .3, // Lower value means a more exact search
keys: [ keys: [
{ name: 'name', weight: .9 }, { name: 'name', weight: .9 },
{ name: 'networks.name', weight: .7 } { name: 'description', weight: .7 },
//{ name: 'networks.name', weight: .7 }
] ]
}; };

View File

@ -3,7 +3,11 @@
{ {
"networks": "networks":
{ {
"title": "Networks" "title": "Networks",
"list":
{
"noResults": "No network matches the specified filters"
}
}, },
"firewall": "firewall":
{ {