import { Component, Inject } from 'ng-metadata/core';
const templateUrl = require('./config-setup-app.component.html');
declare var window: any;
/**
* Initial Screen and Choice in the Config App
*/
@Component({
selector: 'config-setup-app',
templateUrl: templateUrl,
})
export class ConfigSetupAppComponent {
private state
: 'choice'
| 'setup'
| 'load'
| 'populate'
| 'download'
| 'deploy';
private loadedConfig = false;
private isKubernetes: boolean = false;
constructor(@Inject('ApiService') private apiService) {
this.state = 'choice';
if (window.__is_kubernetes) {
this.isKubernetes = true;
}
private chooseSetup(): void {
this.apiService.scStartNewConfig()
.then(() => {
this.state = 'setup';
.catch(this.apiService.errorDisplay(
'Could not initialize new setup. Please report this error'
));
private chooseLoad(): void {
this.state = 'load';
this.loadedConfig = true;
private choosePopulate(): void {
this.state = 'populate';
private configLoaded(): void {
private setupCompleted(): void {
this.state = 'download';
private chooseDeploy(): void {
this.state = 'deploy';