-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements for the UI code (#1498)
- Loading branch information
Showing
17 changed files
with
600 additions
and
491 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ button { | |
} | ||
} | ||
|
||
mat-icon { | ||
mat-icon, mat-spinner { | ||
display: inline-block; | ||
margin-right: 15px; | ||
} | ||
|
8 changes: 6 additions & 2 deletions
8
...ire-manager-src/src/app/components/pages/login/initial-setup/initial-setup.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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<app-dialog [headline]="'settings.password.initial-config.title' | translate" [dialog]="dialogRef"> | ||
<app-password [forInitialConfig]="true"></app-password> | ||
<app-dialog | ||
[headline]="'settings.password.initial-config.title' | translate" | ||
[dialog]="dialogRef" | ||
[disableDismiss]="disableDismiss" | ||
> | ||
<app-password [forInitialConfig]="true" (workingState)="disableDismiss=$event"></app-password> | ||
</app-dialog> |
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
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
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
16 changes: 8 additions & 8 deletions
16
static/skywire-manager-src/src/app/components/pages/node/charts/charts.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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
<div class="small-rounded-elevated-box chart"> | ||
<app-line-chart [data]="data.sentHistory"></app-line-chart> | ||
<div class="small-rounded-elevated-box chart" *ngIf="trafficData"> | ||
<app-line-chart [data]="trafficData.sentHistory"></app-line-chart> | ||
<div class="info"> | ||
<span class="text">{{ 'common.uploaded' | translate }}</span> | ||
<span class="rate"> | ||
<span class="value">{{ data.totalSent | autoScale:{ showValue: true } }}</span> | ||
<span class="unit">{{ data.totalSent | autoScale:{ showUnit: true } }}</span> | ||
<span class="value">{{ trafficData.totalSent | autoScale:{ showValue: true } }}</span> | ||
<span class="unit">{{ trafficData.totalSent | autoScale:{ showUnit: true } }}</span> | ||
</span> | ||
</div> | ||
</div> | ||
|
||
<div class="small-rounded-elevated-box chart"> | ||
<app-line-chart [data]="data.receivedHistory"></app-line-chart> | ||
<div class="small-rounded-elevated-box chart" *ngIf="trafficData"> | ||
<app-line-chart [data]="trafficData.receivedHistory"></app-line-chart> | ||
<div class="info"> | ||
<span class="text">{{ 'common.downloaded' | translate }}</span> | ||
<span class="rate"> | ||
<span class="value">{{ data.totalReceived | autoScale:{ showValue: true } }}</span> | ||
<span class="unit">{{ data.totalReceived | autoScale:{ showUnit: true } }}</span> | ||
<span class="value">{{ trafficData.totalReceived | autoScale:{ showValue: true } }}</span> | ||
<span class="unit">{{ trafficData.totalReceived | autoScale:{ showUnit: true } }}</span> | ||
</span> | ||
</div> | ||
</div> |
25 changes: 5 additions & 20 deletions
25
static/skywire-manager-src/src/app/components/pages/node/charts/charts.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 |
---|---|---|
@@ -1,30 +1,15 @@ | ||
import { Component, OnInit, OnDestroy } from '@angular/core'; | ||
import { Subscription } from 'rxjs'; | ||
import { Component, Input } from '@angular/core'; | ||
|
||
import { TrafficData, NodeService } from 'src/app/services/node.service'; | ||
import { TrafficData } from 'src/app/services/single-node-data.service'; | ||
|
||
/** | ||
* Shows 2 line graps with the recent data upload/download activity of a node. | ||
* Shows 2 line graphs with the recent data upload/download activity of a node. | ||
*/ | ||
@Component({ | ||
selector: 'app-charts', | ||
templateUrl: './charts.component.html', | ||
styleUrls: ['./charts.component.scss'] | ||
}) | ||
export class ChartsComponent implements OnInit, OnDestroy { | ||
data: TrafficData; | ||
|
||
private dataSubscription: Subscription; | ||
|
||
constructor(private nodeService: NodeService) { } | ||
|
||
ngOnInit() { | ||
this.dataSubscription = this.nodeService.specificNodeTrafficData.subscribe(data => { | ||
this.data = data; | ||
}); | ||
} | ||
|
||
ngOnDestroy() { | ||
this.dataSubscription.unsubscribe(); | ||
} | ||
export class ChartsComponent { | ||
@Input() trafficData: TrafficData; | ||
} |
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
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
2 changes: 1 addition & 1 deletion
2
static/skywire-manager-src/src/app/components/pages/node/node-info/node-info.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 |
---|---|---|
@@ -1 +1 @@ | ||
<app-node-info-content [nodeInfo]="node"></app-node-info-content> | ||
<app-node-info-content [nodeInfo]="node" [trafficData]="trafficData"></app-node-info-content> |
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
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
Oops, something went wrong.