Skip to content

Commit

Permalink
logic to handle when select none for kube
Browse files Browse the repository at this point in the history
  • Loading branch information
mesh committed Feb 29, 2024
1 parent cd26899 commit 67523d8
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 40 deletions.
14 changes: 5 additions & 9 deletions build/common/src/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/common/src/utils.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hzn-cli",
"version": "0.8.1",
"version": "0.8.2",
"description": "Open Horizon CLI toolkit helps streamline the process of preparing node agents and perform tasks between orgs environments",
"main": "./build/index.js",
"bin": {
Expand Down
53 changes: 24 additions & 29 deletions src/common/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export class Utils {
}
proceedWithAutoInstall(params: IAutoParam, setup: SetupEnvironment, purge = true) {
return new Observable((observer) => {
// console.log('hzn_css', pEnv.HZN_CSS, typeof pEnv.HZN_CSS, Boolean(pEnv.HZN_CSS))
console.log('proceedWithAutoInstall', setup)
this.purgeManagementHub(purge) // Leverage this function to cleanup and install prerequisites, maynot need preInstallHznCli anymore
.subscribe({
complete: () => {
Expand Down Expand Up @@ -429,7 +429,8 @@ export class Utils {
observer.complete()
} else if(setup == SetupEnvironment.autoSetupAllInOne || setup == SetupEnvironment.autoSetupCliInContainer || setup == SetupEnvironment.autoSetupAnaxInContainer || setup == SetupEnvironment.autoSetupContainer || setup == SetupEnvironment.autoSetupOpenHorizonMesh) {
const purge = setup != SetupEnvironment.autoSetupOpenHorizonMesh;
let configJson
let configJson;
console.log('autoRun', setup)
this.updateConfig(configFile)
.subscribe({
next: (json) => {
Expand Down Expand Up @@ -1045,38 +1046,32 @@ export class Utils {
setupOpenHorizonMesh(params: IAutoParam, anax: string) {
return new Observable((observer) => {
const pEnv = process.env;
//this.installCliOnly(anax)
//.subscribe({
// complete: () => {
const k8s = params.k8s;
let arg = '';
let $shell: any;
if(k8s == 'K3S') {
$shell = this.installK3s(params);
} else if(k8s == 'K8S') {
const k8s = params.k8s;
let arg = '';
let $shell: any;
if(k8s == 'K3S') {
$shell = this.installK3s(params);
} else if(k8s == 'K8S') {

}
if($shell) {
$shell
} else {
$shell = of();
}
if($shell) {
$shell
.subscribe({
complete: ()=> {
this.registerMeshAgent()
.subscribe({
complete: ()=> {
this.registerMeshAgent()
.subscribe({
complete: () => {
observer.next();
observer.complete();
},
error: (err) => observer.error(err)
})
complete: () => {
observer.next();
observer.complete();
},
error: (err) => observer.error(err)
})
}
//},
// error: (err) => {
// observer.error(err)
// }
//})
},
error: (err) => observer.error(err)
})
}
})
}
installCliOnly(anax: string) {
Expand Down

0 comments on commit 67523d8

Please sign in to comment.