Skip to content

Commit

Permalink
fix #14
Browse files Browse the repository at this point in the history
  • Loading branch information
LazarenkoA committed Mar 24, 2022
1 parent aa9ea39 commit cc352f1
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 99 deletions.
1 change: 1 addition & 0 deletions .idea/prometheus_1C_exporter.iml

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

150 changes: 58 additions & 92 deletions .idea/workspace.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion explorers/AvailablePerformance.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (this *ExplorerAvailablePerformance) readData() (string, error) {

param = append(param, "process")
param = append(param, "list")
this.appendLogPass(param)
param = this.appendLogPass(param)
param = append(param, fmt.Sprintf("--cluster=%v", this.GetClusterID()))

cmdCommand := exec.Command(this.settings.RAC_Path(), param...)
Expand Down
3 changes: 2 additions & 1 deletion explorers/BaseExplorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,14 @@ func (this *BaseRACExplorer) formatResult(strIn string) map[string]string {
return result
}

func (this *BaseRACExplorer) appendLogPass(param []string) {
func (this *BaseRACExplorer) appendLogPass(param []string) []string {
if login := this.settings.RAC_Login(); login != "" {
param = append(param, fmt.Sprintf("--cluster-user=%v", login))
if pwd := this.settings.RAC_Pass(); pwd != "" {
param = append(param, fmt.Sprintf("--cluster-pwd=%v", pwd))
}
}
return param
}

func normalizeEncoding(str string) string {
Expand Down
2 changes: 1 addition & 1 deletion explorers/Connects.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (this *ExplorerConnects) getConnects() (connData []map[string]string, err e

param = append(param, "connection")
param = append(param, "list")
this.appendLogPass(param)
param = this.appendLogPass(param)

param = append(param, fmt.Sprintf("--cluster=%v", this.GetClusterID()))

Expand Down
4 changes: 2 additions & 2 deletions explorers/ExplorerCheckSheduleJob.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (this *ExplorerCheckSheduleJob) getInfoBase(baseGuid, basename string) (map

param = append(param, "infobase")
param = append(param, "info")
this.appendLogPass(param)
param = this.appendLogPass(param)

param = append(param, fmt.Sprintf("--cluster=%v", this.GetClusterID()))
param = append(param, fmt.Sprintf("--infobase=%v", baseGuid))
Expand Down Expand Up @@ -226,7 +226,7 @@ func (this *ExplorerCheckSheduleJob) fillBaseList() error {
param = append(param, "infobase")
param = append(param, "summary")
param = append(param, "list")
this.appendLogPass(param)
param = this.appendLogPass(param)
param = append(param, fmt.Sprintf("--cluster=%v", this.GetClusterID()))

if result, err := this.run(exec.Command(this.settings.RAC_Path(), param...)); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion explorers/ExplorerClientLic.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (this *ExplorerClientLic) getLic() (licData []map[string]string, err error)

param = append(param, "session")
param = append(param, "list")
this.appendLogPass(param)
param = this.appendLogPass(param)

param = append(param, "--licenses")
param = append(param, fmt.Sprintf("--cluster=%v", this.GetClusterID()))
Expand Down
2 changes: 1 addition & 1 deletion explorers/Sessions.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (this *ExplorerSessions) getSessions() (sesData []map[string]string, err er

param = append(param, "session")
param = append(param, "list")
this.appendLogPass(param)
param = this.appendLogPass(param)

param = append(param, fmt.Sprintf("--cluster=%v", this.GetClusterID()))

Expand Down

0 comments on commit cc352f1

Please sign in to comment.