Исправлена ошибка при появлении окна авторизации админа кластера

Добавлены ключи авторизации (юзер и пароль) в вызов RAC при редактировании ИБ
This commit is contained in:
Sergey 2019-11-27 16:29:29 +03:00
parent 7a02dca864
commit 252ef1de42
3 changed files with 27 additions and 9 deletions

13
debian/changelog vendored
View File

@ -1,3 +1,10 @@
rac-gui (1.1.0-2) stable; urgency=medium
* Fixed bug with auth dialog
* Fixed bug with runing rac infobase command with auth parameters
-- Sergey Kalinin <svk@nuk-svk.ru> Wed, 27 Nov 2019 15:54:00 +0300
rac-gui (1.1.0-1) stable; urgency=medium rac-gui (1.1.0-1) stable; urgency=medium
* Added new rac command options * Added new rac command options
@ -7,14 +14,14 @@ rac-gui (1.1.0-1) stable; urgency=medium
* Fixed some errors * Fixed some errors
* Added translated method for table headers * Added translated method for table headers
-- Sergey Kalinin <svk@nuk-svk.ru> Wed, 25 Sep 2019 09:00:31 +0300 -- Sergey Kalinin <svk@nuk-svk.ru> Wed, 25 Sep 2019 09:00:31 +0300
rac-gui (1.0.3-1) stable; urgency=medium rac-gui (1.0.3-1) stable; urgency=medium
* CI/CD integration * CI/CD integration
* New server config added * New server config added
-- Sergey Kalinin <svk@nuk-svk.ru> Thu, 15 Jul 2019 09:20:31 +0300 -- Sergey Kalinin <svk@nuk-svk.ru> Thu, 15 Jul 2019 09:20:31 +0300
rac-gui (1.0.2-2) stable; urgency=medium rac-gui (1.0.2-2) stable; urgency=medium
@ -27,5 +34,3 @@ rac-gui (1.0.1-1) stable; urgency=medium
* Initial release * Initial release
-- Sergey Kalinin <svk@nuk-svk.ru> Mon, 22 Jul 2019 14:56:31 +0300 -- Sergey Kalinin <svk@nuk-svk.ru> Mon, 22 Jul 2019 14:56:31 +0300

View File

@ -883,7 +883,7 @@ proc AddToplevel {lbl img {win_name .add}} {
grid $frm_btn -row 1 -column 1 -sticky sew -padx 0 -pady 0 grid $frm_btn -row 1 -column 1 -sticky sew -padx 0 -pady 0
pack $frm_btn.btn_cancel $frm_btn.btn_ok -side right -padx 5 -pady 5 pack $frm_btn.btn_cancel $frm_btn.btn_ok -side right -padx 5 -pady 5
#pack $frm_btn.btn_ok -side right -padx 2 #pack $frm_btn.btn_ok -side right -padx 2
bind .add <Escape> $cmd bind $win_name <Escape> $cmd
return $frm return $frm
} }
@ -1935,6 +1935,7 @@ proc Edit::infobases {tree host values} {
} }
Edit::infobase $tree $host $infobase Edit::infobase $tree $host $infobase
} }
proc Edit::infobase {tree host values} { proc Edit::infobase {tree host values} {
global default active_cluster infobase agent_user agent_pwd cluster_user cluster_pwd global default active_cluster infobase agent_user agent_pwd cluster_user cluster_pwd
global security_level dbms scheduled_jobs_deny license_distribution date_offset global security_level dbms scheduled_jobs_deny license_distribution date_offset
@ -1944,6 +1945,16 @@ proc Edit::infobase {tree host values} {
} else { } else {
set auth "" set auth ""
} }
#### Проверяем наличие юзера и пароля в конфиге и если есть то используем ####
set infobase_user [GetInfobaseUser $host $active_cluster $values]
set infobase_pwd [GetInfobasePassword $host $active_cluster $values]
if {$infobase_user ne "" && $infobase_pwd ne ""} {
set ib_auth "--infobase-user=$infobase_user --infobase-pwd=$infobase_pwd"
} else {
set ib_auth ""
}
set infobase $values set infobase $values
set frm [Add::infobases $tree $host $values] set frm [Add::infobases $tree $host $values]
@ -2016,14 +2027,14 @@ proc Edit::infobase {tree host values} {
grid $frm.lbl_external_session_manager_required -row 9 -column 2 -sticky nw -padx 5 -pady 5 grid $frm.lbl_external_session_manager_required -row 9 -column 2 -sticky nw -padx 5 -pady 5
grid $frm.check_external_session_manager_required -row 9 -column 3 -sticky nw -padx 5 -pady 5 grid $frm.check_external_session_manager_required -row 9 -column 3 -sticky nw -padx 5 -pady 5
set lst [RunCommand "infobase info --cluster=$active_cluster --infobase=$values $auth $host"] set lst [RunCommand "infobase info --cluster=$active_cluster $auth --infobase=$values $ib_auth $host"]
FormFieldsDataInsert $frm $lst FormFieldsDataInsert $frm $lst
.add.frm_btn.btn_ok configure -command { .add.frm_btn.btn_ok configure -command {
RunCommand "infobase update \ RunCommand "infobase update \
--infobase=$infobase \ --infobase=$infobase \
--infobase-user= \ --infobase-user=$infobase_user \
--infobase-pwd= \ --infobase-pwd=$infobase_pwd \
--dbms=$dbms \ --dbms=$dbms \
--db-server=[.add.frm.ent_db_server get] \ --db-server=[.add.frm.ent_db_server get] \
--db-name=[.add.frm.ent_db_name get] \ --db-name=[.add.frm.ent_db_name get] \
@ -2569,3 +2580,4 @@ proc Del::inet {tree host profile_name} {
Del::acl $host inet [GetWorkTreeItems "name"] $profile_name Del::acl $host inet [GetWorkTreeItems "name"] $profile_name
} }

View File

@ -11,7 +11,7 @@ exec wish "$0" -- "$@"
# Git repos: https://bitbucket.org/svk28/rac-gui # Git repos: https://bitbucket.org/svk28/rac-gui
# #
# Version: 1.1.0 # Version: 1.1.0
# Release: 1 # Release: 2
# #
###################################################### ######################################################
@ -124,3 +124,4 @@ if [file exists [file join $dir(work) 1c_srv_new.cfg]] {
} else { } else {
set servers_list "" set servers_list ""
} }