mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Removed the connectionstring from the settings, the request grid count also should stick per user now
This commit is contained in:
parent
5d5665ef5c
commit
8123d3e914
5 changed files with 16 additions and 9 deletions
|
@ -196,9 +196,6 @@ export interface IAbout {
|
|||
ombiDatabaseType: string;
|
||||
externalDatabaseType: string;
|
||||
settingsDatabaseType: string;
|
||||
ombiConnectionString: string;
|
||||
externalConnectionString: string;
|
||||
settingsConnectionString: string;
|
||||
storagePath: string;
|
||||
notSupported: boolean;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ export class MoviesGridComponent implements OnInit, AfterViewInit {
|
|||
|
||||
private storageKey = "Movie_DefaultRequestListSort";
|
||||
private storageKeyOrder = "Movie_DefaultRequestListSortOrder";
|
||||
private storageKeyGridCount = "Movie_DefaultGridCount";
|
||||
|
||||
@Output() public onOpenOptions = new EventEmitter<{ request: any, filter: any, onChange: any }>();
|
||||
|
||||
|
@ -38,6 +39,7 @@ export class MoviesGridComponent implements OnInit, AfterViewInit {
|
|||
}
|
||||
|
||||
public ngOnInit() {
|
||||
const defaultCount = this.storageService.get(this.storageKeyGridCount);
|
||||
const defaultSort = this.storageService.get(this.storageKey);
|
||||
const defaultOrder = this.storageService.get(this.storageKeyOrder);
|
||||
if (defaultSort) {
|
||||
|
@ -46,6 +48,9 @@ export class MoviesGridComponent implements OnInit, AfterViewInit {
|
|||
if (defaultOrder) {
|
||||
this.defaultOrder = defaultOrder;
|
||||
}
|
||||
if(defaultCount) {
|
||||
this.gridCount = defaultCount;
|
||||
}
|
||||
}
|
||||
|
||||
public async ngAfterViewInit() {
|
||||
|
@ -54,6 +59,8 @@ export class MoviesGridComponent implements OnInit, AfterViewInit {
|
|||
// this.dataSource = results.collection;
|
||||
// this.resultsLength = results.total;
|
||||
|
||||
this.storageService.save(this.storageKeyGridCount, this.gridCount);
|
||||
|
||||
this.isAdmin = this.auth.hasRole("admin") || this.auth.hasRole("poweruser");
|
||||
|
||||
// If the user changes the sort order, reset back to the first page.
|
||||
|
|
|
@ -26,6 +26,7 @@ export class TvGridComponent implements OnInit, AfterViewInit {
|
|||
|
||||
private storageKey = "Tv_DefaultRequestListSort";
|
||||
private storageKeyOrder = "Tv_DefaultRequestListSortOrder";
|
||||
private storageKeyGridCount = "Tv_DefaultGridCount";
|
||||
|
||||
@Output() public onOpenOptions = new EventEmitter<{request: any, filter: any, onChange: any}>();
|
||||
|
||||
|
@ -38,6 +39,7 @@ export class TvGridComponent implements OnInit, AfterViewInit {
|
|||
}
|
||||
|
||||
public ngOnInit() {
|
||||
const defaultCount = this.storageService.get(this.storageKeyGridCount);
|
||||
const defaultSort = this.storageService.get(this.storageKey);
|
||||
const defaultOrder = this.storageService.get(this.storageKeyOrder);
|
||||
if (defaultSort) {
|
||||
|
@ -46,10 +48,14 @@ export class TvGridComponent implements OnInit, AfterViewInit {
|
|||
if (defaultOrder) {
|
||||
this.defaultOrder = defaultOrder;
|
||||
}
|
||||
if (defaultCount) {
|
||||
this.gridCount = defaultCount;
|
||||
}
|
||||
}
|
||||
|
||||
public async ngAfterViewInit() {
|
||||
|
||||
this.storageService.save(this.storageKeyGridCount, this.gridCount);
|
||||
this.isAdmin = this.auth.hasRole("admin") || this.auth.hasRole("poweruser");
|
||||
// If the user changes the sort order, reset back to the first page.
|
||||
this.sort.sortChange.subscribe(() => this.paginator.pageIndex = 0);
|
||||
|
|
|
@ -77,17 +77,17 @@
|
|||
|
||||
<div class="mat-row">
|
||||
<div class="mat-cell">Ombi Database</div>
|
||||
<div class="mat-cell">{{about.ombiDatabaseType}} - {{about.ombiConnectionString}}</div>
|
||||
<div class="mat-cell">{{about.ombiDatabaseType}}</div>
|
||||
</div>
|
||||
|
||||
<div class="mat-row">
|
||||
<div class="mat-cell">External Database</div>
|
||||
<div class="mat-cell">{{about.externalDatabaseType}} - {{about.externalConnectionString}}</div>
|
||||
<div class="mat-cell">{{about.externalDatabaseType}}</div>
|
||||
</div>
|
||||
|
||||
<div class="mat-row">
|
||||
<div class="mat-cell">Settings Database</div>
|
||||
<div class="mat-cell">{{about.settingsDatabaseType}} - {{about.settingsConnectionString}}</div>
|
||||
<div class="mat-cell">{{about.settingsDatabaseType}}</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -123,11 +123,8 @@ namespace Ombi.Controllers.V1
|
|||
OsDescription = RuntimeInformation.OSDescription,
|
||||
ProcessArchitecture = RuntimeInformation.ProcessArchitecture.ToString(),
|
||||
ApplicationBasePath = Directory.GetCurrentDirectory(),
|
||||
ExternalConnectionString = dbConfiguration.ExternalDatabase.ConnectionString,
|
||||
ExternalDatabaseType = dbConfiguration.ExternalDatabase.Type,
|
||||
OmbiConnectionString = dbConfiguration.OmbiDatabase.ConnectionString,
|
||||
OmbiDatabaseType = dbConfiguration.OmbiDatabase.Type,
|
||||
SettingsConnectionString = dbConfiguration.SettingsDatabase.ConnectionString,
|
||||
SettingsDatabaseType = dbConfiguration.SettingsDatabase.Type,
|
||||
StoragePath = storage.StoragePath.HasValue() ? storage.StoragePath : "None Specified",
|
||||
NotSupported = Directory.GetCurrentDirectory().Contains("qpkg")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue