This repository has been archived by the owner on Mar 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bandwidth endpoints to netquery service
- Loading branch information
Showing
3 changed files
with
128 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
modules/portmaster/src/app/pages/dashboard/dashboard-widget/dashboard-widget.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<label class="relative" *ngIf="label"> | ||
{{ label }} | ||
<div *ngIf="beta" class="absolute top-0 right-0 flex flex-col items-center justify-center gap-0 text-yellow-200"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" | ||
class="relative z-10 w-4 h-4"> | ||
<path stroke-linecap="round" stroke-linejoin="round" | ||
d="M9.75 3.104v5.714a2.25 2.25 0 01-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 014.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0112 15a9.065 9.065 0 00-6.23-.693L5 14.5m14.8.8l1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.309 48.309 0 0112 21c-2.773 0-5.491-.235-8.135-.687-1.718-.293-2.3-2.379-1.067-3.61L5 14.5" /> | ||
</svg> | ||
<span class="-mt-1 uppercase" style="font-size: 0.6rem">BETA</span> | ||
</div> | ||
|
||
</label> | ||
|
||
<ng-content></ng-content> |
30 changes: 30 additions & 0 deletions
30
modules/portmaster/src/app/pages/dashboard/dashboard-widget/dashboard-widget.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { coerceBooleanProperty } from "@angular/cdk/coercion"; | ||
import { ChangeDetectionStrategy, Component, Input } from "@angular/core"; | ||
|
||
@Component({ | ||
selector: 'app-dashboard-widget', | ||
templateUrl: './dashboard-widget.component.html', | ||
styles: [ | ||
` | ||
:host { | ||
@apply bg-gray-200 p-4 self-stretch rounded-md flex flex-col gap-2; | ||
} | ||
label { | ||
@apply text-xs uppercase text-secondary font-light flex flex-row items-center gap-2 pb-2; | ||
} | ||
` | ||
], | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class DashboardWidgetComponent { | ||
@Input() | ||
set beta(v: any) { | ||
this._beta = coerceBooleanProperty(v) | ||
} | ||
get beta() { return this._beta } | ||
private _beta = false; | ||
|
||
@Input() | ||
label: string = ''; | ||
} |