@@ -33,25 +33,21 @@ export class GuideUtmstackComponent implements OnInit {
3333 private federationConnectionService : FederationConnectionService ) {
3434 }
3535
36- ngOnInit ( ) : void {
37- this . ip = window . location . host . includes ( ':' ) ? window . location . host . split ( ':' ) [ 0 ] : window . location . host ;
38- this . getToken ( ) ;
39- this . loadArchitectures ( ) ;
40- }
36+ ngOnInit ( ) {
37+ this . getToken ( ) ;
38+ }
4139
42- getToken ( ) {
43- this . federationConnectionService . getToken ( ) . subscribe ( response => {
44- if ( response . body !== null && response . body !== '' ) {
45- this . token = response . body ;
46- } else {
47- this . token = '' ;
48- }
49- this . vars = {
50- V_IP : this . ip ,
51- V_TOKEN : this . token
52- } ;
53- } ) ;
54- }
40+
41+ getToken ( ) {
42+ this . federationConnectionService . getToken ( ) . subscribe ( response => {
43+ if ( response . body !== null && response . body !== '' ) {
44+ this . token = response . body ;
45+ } else {
46+ this . token = '' ;
47+ }
48+ this . loadArchitectures ( ) ;
49+ } ) ;
50+ }
5551
5652 configValidChange ( $event : boolean ) {
5753 this . configValidity = ! $event ;
@@ -81,13 +77,13 @@ export class GuideUtmstackComponent implements OnInit {
8177 getCommandUbuntu ( installerName : string ) : string {
8278 const ip = window . location . host . includes ( ':' ) ? window . location . host . split ( ':' ) [ 0 ] : window . location . host ;
8379
84- return `sudo bash -c " apt update -y && \
80+ return `sudo bash -c ' apt update -y && \
8581 apt install wget -y && \
8682 mkdir -p /opt/utmstack-collector && \
8783 wget --no-check-certificate -P /opt/utmstack-collector \
8884 https://${ ip } :9001/private/dependencies/collector/${ installerName } && \
8985 chmod -R 777 /opt/utmstack-collector/${ installerName } && \
90- /opt/utmstack-collector/${ installerName } install ${ ip } <secret>${ this . token } </secret> yes" ` ;
86+ /opt/utmstack-collector/${ installerName } install ${ ip } <secret>${ this . token } </secret>' yes' ` ;
9187 }
9288
9389
0 commit comments