1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/settings/database/database.settings.component.ts

41 lines
1.4 KiB
TypeScript
Raw Normal View History

2017-07-14 05:39:09 +08:00
import {Component} from "@angular/core";
2017-07-08 18:43:42 +08:00
import {AuthenticationService} from "../../model/network/authentication.service";
import {DataBaseConfig, DatabaseType} from "../../../../common/config/private/IPrivateConfig";
import {Utils} from "../../../../common/Utils";
import {NotificationService} from "../../model/notification.service";
2017-07-14 05:39:09 +08:00
import {NavigationService} from "../../model/navigation.service";
import {SettingsComponent} from "../_abstract/abstract.settings.component";
import {DatabaseSettingsService} from "./database.settings.service";
2017-07-08 18:43:42 +08:00
@Component({
selector: 'settings-database',
templateUrl: './database.settings.component.html',
2017-07-15 18:47:11 +08:00
styleUrls: ['./database.settings.component.css',
'./../_abstract/abstract.settings.component.css'],
2017-07-08 18:43:42 +08:00
providers: [DatabaseSettingsService],
})
2017-07-14 05:39:09 +08:00
export class DatabaseSettingsComponent extends SettingsComponent<DataBaseConfig> {
2017-07-15 20:27:12 +08:00
2017-07-08 18:43:42 +08:00
public types: Array<any> = [];
public DatabaseType: any;
2017-07-14 05:39:09 +08:00
constructor(_authService: AuthenticationService,
_navigation: NavigationService,
2017-07-15 20:27:12 +08:00
_settingsService: DatabaseSettingsService,
2017-07-14 05:39:09 +08:00
notification: NotificationService) {
2017-07-15 23:29:40 +08:00
super("Database", _authService, _navigation, _settingsService, notification, s => s.Server.database);
2017-07-08 18:43:42 +08:00
}
ngOnInit() {
2017-07-14 05:39:09 +08:00
super.ngOnInit();
2017-07-08 18:43:42 +08:00
this.types = Utils
.enumToArray(DatabaseType);
this.DatabaseType = DatabaseType;
}
}