refactor(settings): 💄 Added a banner when you are using a SQLite database, to infom that MySQL database configuration is available

This commit is contained in:
tidusjar 2021-11-23 13:57:29 +00:00
commit 1b0a1cc7a0
4 changed files with 44 additions and 13 deletions

View file

@ -82,7 +82,13 @@
"replace": "src/environments/environment.ts", "replace": "src/environments/environment.ts",
"with": "src/environments/environment.hmr.ts" "with": "src/environments/environment.hmr.ts"
} }
] ],
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
} }
} }
}, },

View file

@ -1,6 +1,10 @@
<settings-menu></settings-menu> <settings-menu></settings-menu>
<div class="alert container-alert" role="alert" *ngIf="about && usingSqliteDatabase">
Switching to a MySQL database can drastically improve performance and stability. See how to do that here: <a href="https://docs.ombi.app/guides/migrating-databases/" target="_blank">https://docs.ombi.app/guides/migrating-databases/</a>
</div>
<div *ngIf="about" class="small-middle-container"> <div *ngIf="about" class="small-middle-container">
<legend>About</legend> <legend>About</legend>
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
<div class="mat-table"> <div class="mat-table">

View file

@ -1,4 +1,6 @@
.mat-table { @import "~styles/variables.scss";
.mat-table {
display: block; display: block;
} }
@ -38,3 +40,12 @@
vertical-align: baseline; vertical-align: baseline;
border-radius: 0.25rem; border-radius: 0.25rem;
} }
.container-alert {
margin-left: 3%;
margin-right: 3%;
color: white;
background-color: $ombi-background-accent;
border-color: $warn;
}

View file

@ -1,10 +1,11 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { HubService, SettingsService, SystemService } from "../../services";
import { IAbout, IUpdateModel } from "../../interfaces/ISettings"; import { IAbout, IUpdateModel } from "../../interfaces/ISettings";
import { SettingsService, HubService, SystemService } from "../../services";
import { IConnectedUser } from "../../interfaces"; import { IConnectedUser } from "../../interfaces";
import { UpdateService } from "../../services/update.service";
import { MatDialog } from "@angular/material/dialog"; import { MatDialog } from "@angular/material/dialog";
import { UpdateDialogComponent } from "./update-dialog.component"; import { UpdateDialogComponent } from "./update-dialog.component";
import { UpdateService } from "../../services/update.service";
@Component({ @Component({
templateUrl: "./about.component.html", templateUrl: "./about.component.html",
@ -17,6 +18,15 @@ export class AboutComponent implements OnInit {
public connectedUsers: IConnectedUser[]; public connectedUsers: IConnectedUser[];
public newsHtml: string; public newsHtml: string;
public get usingSqliteDatabase() {
if (this.about.ombiDatabaseType.toLowerCase() === 'sqlite'
|| this.about.externalDatabaseType.toLowerCase() === 'sqlite'
|| this.about.settingsDatabaseType.toLowerCase() === 'sqlite') {
return true;
}
return false;
}
private update: IUpdateModel; private update: IUpdateModel;
constructor(private readonly settingsService: SettingsService, constructor(private readonly settingsService: SettingsService,