2018-03-31 03:30:30 +08:00
|
|
|
import {Component} from '@angular/core';
|
|
|
|
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';
|
|
|
|
import {NavigationService} from '../../model/navigation.service';
|
|
|
|
import {SettingsComponent} from '../_abstract/abstract.settings.component';
|
|
|
|
import {DatabaseSettingsService} from './database.settings.service';
|
|
|
|
import {I18n} from '@ngx-translate/i18n-polyfill';
|
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,
|
2018-03-30 08:30:23 +08:00
|
|
|
notification: NotificationService,
|
|
|
|
i18n: I18n) {
|
2018-03-31 03:30:30 +08:00
|
|
|
super(i18n('Database'), _authService, _navigation, _settingsService, notification, i18n, 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;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|