@@ -21,20 +21,17 @@ import {UtmInstanceInfoComponent} from '../utm-instance-info/utm-instance-info.c
2121 templateUrl : './welcome-to-utmstack.component.html' ,
2222 styleUrls : [ './welcome-to-utmstack.component.scss' ]
2323} )
24- export class WelcomeToUtmstackComponent implements OnInit , OnDestroy {
24+ export class WelcomeToUtmstackComponent implements OnInit {
2525 private unsubscriber : Subject < void > = new Subject < void > ( ) ;
2626 accountSetup = true ;
2727 onlineDoc = ONLINE_DOCUMENTATION_BASE ;
2828 inSass : boolean ;
29- isIncompleteConfig = false ;
3029
3130 constructor ( private router : Router ,
3231 private accountService : AccountService ,
3332 private utmGettingStartedService : GettingStartedService ,
3433 private gettingStartedBehavior : GettingStartedBehavior ,
35- private modalService : NgbModal ,
36- private utmConfigParamsService : UtmConfigParamsService ,
37- private toastService : UtmToastService ) {
34+ private modalService : NgbModal ) {
3835
3936 }
4037
@@ -47,42 +44,12 @@ export class WelcomeToUtmstackComponent implements OnInit, OnDestroy {
4744 ) . subscribe ( ( _ ) => {
4845 history . pushState ( null , '' ) ;
4946 } ) ;
50-
51- this . utmConfigParamsService . query ( {
52- page : 0 ,
53- size : 10000 ,
54- 'sectionId.equals' : ApplicationConfigSectionEnum . INSTANCE_REGISTRATION ,
55- sort : 'id,asc'
56- } ) . pipe (
57- map ( res =>
58- res . body . filter ( c => c . confParamShort !== 'utmstack.instance.data'
59- && c . confParamShort !== 'utmstack.instance.auth' ) ) ,
60- tap ( config => this . isIncompleteConfig = config . some ( c => c . confParamValue === '' ) ) ,
61- catchError ( err => {
62- this . toastService . showError ( 'Error' ,
63- 'Error occurred while fetching instance registration configuration' ) ;
64- return of ( [ ] ) ;
65- } )
66- )
67- . subscribe ( ( response ) => {
68- if ( this . isIncompleteConfig ) {
69- this . loadInstanceForm ( response || [ ] ) ;
70- }
71- } ) ;
7247 }
7348
7449 exit ( ) {
7550 this . setUpAdmin ( false ) ;
7651 }
7752
78- loadInstanceForm ( formConfigs : SectionConfigParamType [ ] ) {
79- const modal = this . modalService . open ( UtmInstanceInfoComponent , { centered : true } ) ;
80- modal . componentInstance . formConfigs = formConfigs ;
81-
82- modal . result . then ( ( result ) => {
83- } ) ;
84- }
85-
8653 setUpAdmin ( gettingStarted : boolean ) {
8754 this . accountService . identity ( ) . then ( account => {
8855 const modal = this . modalService . open ( UtmAdminChangeEmailComponent , {
@@ -128,13 +95,4 @@ export class WelcomeToUtmstackComponent implements OnInit, OnDestroy {
12895 ApplicationConfigSectionEnum . DATE_SETTINGS ] ;
12996 }
13097 }
131-
132- isRegister ( ) {
133-
134- }
135-
136- ngOnDestroy ( ) : void {
137- this . unsubscriber . next ( ) ;
138- this . unsubscriber . complete ( ) ;
139- }
14098}
0 commit comments