-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Save locations, statistics, and filter collapse (#158)
* keep track of all save locations * show all save locations in drop-down menu * same drop-down options when moving torrents * toggle filters * add statistics info in a modal * fix some random typo
- Loading branch information
1 parent
d993035
commit 6d8a318
Showing
16 changed files
with
227 additions
and
13 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
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
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
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
Empty file.
97 changes: 97 additions & 0 deletions
97
src/app/modals/statistics-dialog/statistics-dialog.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,97 @@ | ||
<div [ngClass]="{'dark-theme': isDarkTheme | async}"> | ||
<div class="mat-dialog-inner-container mat-app-background statistics_container"> | ||
<div class="col"> | ||
<h2 mat-dialog-title>Statistics</h2> | ||
|
||
<section> | ||
<h4><b>User Statistics</b></h4> | ||
|
||
<div class="stat_item"> | ||
<p>All-time upload:</p> | ||
<p>{{ units_helper.GetFileSizeString(inputData.alltime_ul) }}</p> | ||
</div> | ||
|
||
<div class="stat_item"> | ||
<p>All-time download:</p> | ||
<p>{{ units_helper.GetFileSizeString(inputData.alltime_dl) }}</p> | ||
</div> | ||
|
||
<div class="stat_item"> | ||
<p>All-time share ratio:</p> | ||
<p>{{ inputData.global_ratio }}</p> | ||
</div> | ||
|
||
<div class="stat_item"> | ||
<p>Session waste:</p> | ||
<p>{{ units_helper.GetFileSizeString(inputData.total_wasted_session) }}</p> | ||
</div> | ||
|
||
<div class="stat_item"> | ||
<p>Connected peers:</p> | ||
<p>{{ inputData.total_peer_connections }}</p> | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<h4><b>Cache Statistics</b></h4> | ||
|
||
<div class="stat_item"> | ||
<p>Read cache hits:</p> | ||
<p>{{ inputData.read_cache_hits }}%</p> | ||
</div> | ||
|
||
<div class="stat_item"> | ||
<p>Total buffer size:</p> | ||
<p>{{ units_helper.GetFileSizeString(inputData.total_buffers_size) }}</p> | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<h4><b>Performance Statistics</b></h4> | ||
|
||
<div class="stat_item"> | ||
<p>Write cache overload:</p> | ||
<p>{{ inputData.write_cache_overload }}%</p> | ||
</div> | ||
|
||
<div class="stat_item"> | ||
<p>Read cache overload:</p> | ||
<p>{{ inputData.read_cache_overload }}%</p> | ||
</div> | ||
|
||
<div class="stat_item"> | ||
<p>Queued I/O jobs:</p> | ||
<p>{{ inputData.queued_io_jobs }}</p> | ||
</div> | ||
|
||
<div class="stat_item"> | ||
<p>Average time in queue:</p> | ||
<p>{{ inputData.average_time_queue }}ms</p> | ||
</div> | ||
|
||
<div class="stat_item"> | ||
<p>Total queued size:</p> | ||
<p>{{ units_helper.GetFileSizeString(inputData.total_queued_size) }}</p> | ||
</div> | ||
</section> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
.statistics_container { | ||
width: 350px; | ||
} | ||
|
||
b { font-weight: 500; } | ||
h4 { margin-bottom: 10px; } | ||
section { margin-bottom: 5px; } | ||
|
||
.stat_item { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
|
||
padding: 0 10px; | ||
} | ||
</style> |
24 changes: 24 additions & 0 deletions
24
src/app/modals/statistics-dialog/statistics-dialog.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,24 @@ | ||
import { Component, Inject, OnInit } from '@angular/core'; | ||
import { MAT_DIALOG_DATA } from '@angular/material/dialog'; | ||
import { Observable } from 'rxjs'; | ||
import { ThemeService } from 'src/app/services/theme.service'; | ||
import { UnitsHelperService } from 'src/app/services/units-helper.service'; | ||
|
||
@Component({ | ||
selector: 'app-statistics-dialog', | ||
templateUrl: './statistics-dialog.component.html', | ||
styleUrls: ['./statistics-dialog.component.css'] | ||
}) | ||
export class StatisticsDialogComponent implements OnInit { | ||
public isDarkTheme: Observable<boolean>; | ||
public inputData: any; // Data passed in to this component | ||
|
||
constructor(private theme: ThemeService, public units_helper: UnitsHelperService, @Inject(MAT_DIALOG_DATA) inputData) { | ||
this.inputData = inputData; | ||
} | ||
|
||
ngOnInit(): void { | ||
this.isDarkTheme = this.theme.getThemeSubscription(); | ||
} | ||
|
||
} |
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.