2018-05-03 19:17:08 -04:00
|
|
|
import {Component, OnInit} from '@angular/core';
|
2018-03-30 15:30:30 -04: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';
|
|
|
|
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 12:43:42 +02:00
|
|
|
|
|
|
|
@Component({
|
2018-05-03 19:17:08 -04:00
|
|
|
selector: 'app-settings-database',
|
2017-07-08 12:43:42 +02:00
|
|
|
templateUrl: './database.settings.component.html',
|
2017-07-15 12:47:11 +02:00
|
|
|
styleUrls: ['./database.settings.component.css',
|
|
|
|
'./../_abstract/abstract.settings.component.css'],
|
2017-07-08 12:43:42 +02:00
|
|
|
providers: [DatabaseSettingsService],
|
|
|
|
})
|
2018-05-03 19:17:08 -04:00
|
|
|
export class DatabaseSettingsComponent extends SettingsComponent<DataBaseConfig> implements OnInit {
|
2017-07-15 14:27:12 +02:00
|
|
|
|
2018-12-07 22:06:13 +01:00
|
|
|
public types: { key: number, value: string }[] = [];
|
2017-07-08 12:43:42 +02:00
|
|
|
public DatabaseType: any;
|
|
|
|
|
2017-07-13 23:39:09 +02:00
|
|
|
constructor(_authService: AuthenticationService,
|
|
|
|
_navigation: NavigationService,
|
2017-07-15 14:27:12 +02:00
|
|
|
_settingsService: DatabaseSettingsService,
|
2018-03-29 20:30:23 -04:00
|
|
|
notification: NotificationService,
|
|
|
|
i18n: I18n) {
|
2018-03-30 15:30:30 -04:00
|
|
|
super(i18n('Database'), _authService, _navigation, _settingsService, notification, i18n, s => s.Server.database);
|
2017-07-08 12:43:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ngOnInit() {
|
2017-07-13 23:39:09 +02:00
|
|
|
super.ngOnInit();
|
2018-12-07 22:06:13 +01:00
|
|
|
this.types = Utils.enumToArray(DatabaseType);
|
2017-07-08 12:43:42 +02:00
|
|
|
this.DatabaseType = DatabaseType;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|