Исправлено добавление и редактирование ИБ (экранирование пробелов)
This commit is contained in:
parent
b0c1135678
commit
59d808f5a1
|
@ -1436,3 +1436,4 @@ profile Режим управления профилями безопас
|
|||
(обязательный) имя профиля безопасности
|
||||
|
||||
|
||||
|
||||
|
|
112
lib/function.tcl
112
lib/function.tcl
|
@ -731,7 +731,7 @@ proc Add::infobase {tree host values} {
|
|||
}
|
||||
proc Add::infobases {tree host values} {
|
||||
global default active_cluster
|
||||
global security_level dbms sheduled_jobs_deny create_db license_distribution date_offset db_create
|
||||
global security_level dbms scheduled_jobs_deny create_db license_distribution date_offset db_create
|
||||
#set active_cluster $values
|
||||
# установка значений по умолчанию
|
||||
set license_distribution deny
|
||||
|
@ -756,8 +756,8 @@ proc Add::infobases {tree host values} {
|
|||
entry $frm.ent_db_name
|
||||
label $frm.lbl_db_user -text "Имя пользователя базы данных"
|
||||
entry $frm.ent_db_user
|
||||
label $frm.lbl_db_pass -text "Пароль"
|
||||
entry $frm.ent_db_pass
|
||||
label $frm.lbl_db_pwd -text "Пароль"
|
||||
entry $frm.ent_db_pwd
|
||||
#$frm.ent_host insert end $host
|
||||
label $frm.lbl_locale -text "Язык базы данных"
|
||||
entry $frm.ent_locale
|
||||
|
@ -768,8 +768,8 @@ proc Add::infobases {tree host values} {
|
|||
checkbutton $frm.cb_license_distribution -variable license_distribution -onvalue allow -offvalue deny
|
||||
label $frm.lbl_create_db -text "Создать БД в случае её отсутствия"
|
||||
checkbutton $frm.cb_create_db -variable create_db -onvalue true -offvalue false
|
||||
label $frm.lbl_sheduled_jobs_deny -text "Блокировка регламентных заданий"
|
||||
checkbutton $frm.cb_sheduled_jobs_deny -variable sheduled_jobs_deny -onvalue on -offvalue off
|
||||
label $frm.lbl_scheduled_jobs_deny -text "Блокировка регламентных заданий"
|
||||
checkbutton $frm.cb_scheduled_jobs_deny -variable scheduled_jobs_deny -onvalue on -offvalue off
|
||||
|
||||
grid $frm.lbl_name -row 0 -column 0 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.ent_name -row 0 -column 1 -sticky new -padx 5 -pady 5
|
||||
|
@ -785,8 +785,8 @@ proc Add::infobases {tree host values} {
|
|||
grid $frm.ent_db_name -row 5 -column 1 -sticky new -padx 5 -pady 5
|
||||
grid $frm.lbl_db_user -row 6 -column 0 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.ent_db_user -row 6 -column 1 -sticky new -padx 5 -pady 5
|
||||
grid $frm.lbl_db_pass -row 7 -column 0 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.ent_db_pass -row 7 -column 1 -sticky new -padx 5 -pady 5
|
||||
grid $frm.lbl_db_pwd -row 7 -column 0 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.ent_db_pwd -row 7 -column 1 -sticky new -padx 5 -pady 5
|
||||
grid $frm.lbl_locale -row 8 -column 0 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.ent_locale -row 8 -column 1 -sticky new -padx 5 -pady 5
|
||||
grid $frm.lbl_date_offset -row 9 -column 0 -sticky nw -padx 5 -pady 5
|
||||
|
@ -795,8 +795,8 @@ proc Add::infobases {tree host values} {
|
|||
grid $frm.cb_license_distribution -row 10 -column 1 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.lbl_create_db -row 11 -column 0 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.cb_create_db -row 11 -column 1 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.lbl_sheduled_jobs_deny -row 12 -column 0 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.cb_sheduled_jobs_deny -row 12 -column 1 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.lbl_scheduled_jobs_deny -row 12 -column 0 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.cb_scheduled_jobs_deny -row 12 -column 1 -sticky nw -padx 5 -pady 5
|
||||
|
||||
#set active_cluster $values
|
||||
# Проверяем значение чекбокса и выставляем соответсвющую опцию
|
||||
|
@ -815,11 +815,11 @@ proc Add::infobases {tree host values} {
|
|||
--db-name=[.add.frm.ent_db_name get] \
|
||||
--locale=[.add.frm.ent_locale get] \
|
||||
--db-user=[.add.frm.ent_db_user get] \
|
||||
--db-pwd=[.add.frm.ent_db_pass get] \
|
||||
--db-pwd=[.add.frm.ent_db_pwd get] \
|
||||
--descr=\"[.add.frm.ent_descr get]\" \
|
||||
--date-offset=$date_offset \
|
||||
--security-level=$security_level \
|
||||
--scheduled-jobs-deny=$sheduled_jobs \
|
||||
--scheduled-jobs-deny=$scheduled_jobs_deny \
|
||||
--license-distribution=$license_distribution \
|
||||
--cluster=$active_cluster $host"
|
||||
Run::infobases $tree $host $active_cluster
|
||||
|
@ -1093,10 +1093,18 @@ proc Edit::cluster {tree host values} {
|
|||
}
|
||||
}
|
||||
proc Edit::infobase {tree host values} {
|
||||
global default active_cluster
|
||||
global secure_level dbms sheduled_jobs_deny create_db license_distribution date_offset db_create
|
||||
|
||||
global default active_cluster infobase
|
||||
global security_level dbms scheduled_jobs_deny license_distribution date_offset
|
||||
global sessions_deny
|
||||
set infobase $values
|
||||
set frm [Add::infobases $tree $host $values]
|
||||
|
||||
$frm.lbl_create_db configure -state disable
|
||||
$frm.cb_create_db configure -state disable
|
||||
$frm.lbl_locale configure -state disable
|
||||
$frm.ent_locale configure -state disable
|
||||
|
||||
|
||||
$frm configure -text "Редактирование информационной базы"
|
||||
#set active_cluster $values
|
||||
label $frm.lbl_denied_from -text "Начало интервала времени действия\nрежима блокировки сеансов" \
|
||||
|
@ -1113,19 +1121,18 @@ proc Edit::infobase {tree host values} {
|
|||
label $frm.lbl_permission_code -text "Код разрешения начала сеанса\nвопреки блокировке сеансов" \
|
||||
-justify left -anchor nw
|
||||
entry $frm.ent_permission_code
|
||||
label $frm.lbl_sessions_deny -text "Режим блокировки сеансов"
|
||||
checkbutton $frm.cb_sessions_deny -variable sessions_deny -onvalue on -offvalue off
|
||||
label $frm.lbl_external_session_manager_connection_string \
|
||||
-text "Параметры внешнего управления сеансами"
|
||||
checkbutton $frm.cb_external_session_manager_connection_string \
|
||||
-variable external_session_manager_connection_string -onvalue yes -offvalue no
|
||||
label $frm.lbl_external_session_manager_required -text "Внешнее управление сеансами"
|
||||
checkbutton $frm.cb_external_session_manager_required \
|
||||
-variable external_session_manager_required -onvalue yes -offvalue no
|
||||
entry $frm.ent_external_session_manager_connection_string
|
||||
label $frm.lbl_security_profile -text "Профиль безопасности информационной базы"
|
||||
entry $frm.ent_security_profile
|
||||
label $frm.lbl_safe_mode_security_profile -text "Профиль безопасности внешнего кода"
|
||||
entry $frm.ent_safe_mode_security_profile
|
||||
label $frm.lbl_safe_mode_security_profile_name -text "Профиль безопасности внешнего кода"
|
||||
entry $frm.ent_safe_mode_security_profile_name
|
||||
label $frm.lbl_sessions_deny -text "Режим блокировки сеансов"
|
||||
checkbutton $frm.check_sessions_deny -variable sessions_deny -onvalue on -offvalue off
|
||||
label $frm.lbl_external_session_manager_required -text "Внешнее управление сеансами"
|
||||
checkbutton $frm.check_external_session_manager_required \
|
||||
-variable external_session_manager_required -onvalue yes -offvalue no
|
||||
|
||||
grid $frm.lbl_denied_from -row 0 -column 2 -sticky nsw -padx 5 -pady 5
|
||||
grid $frm.ent_denied_from -row 0 -column 3 -sticky nw -padx 5 -pady 5
|
||||
|
@ -1137,18 +1144,18 @@ proc Edit::infobase {tree host values} {
|
|||
grid $frm.ent_denied_to -row 3 -column 3 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.lbl_permission_code -row 4 -column 2 -sticky nsw -padx 5 -pady 5
|
||||
grid $frm.ent_permission_code -row 4 -column 3 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.lbl_sessions_deny -row 5 -column 2 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.cb_sessions_deny -row 5 -column 3 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.lbl_external_session_manager_required -row 6 -column 2 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.cb_external_session_manager_required -row 6 -column 3 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.lbl_external_session_manager_connection_string \
|
||||
-row 7 -column 2 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.cb_external_session_manager_connection_string \
|
||||
-row 7 -column 3 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.lbl_security_profile -row 8 -column 2 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.ent_security_profile -row 8 -column 3 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.lbl_safe_mode_security_profile -row 9 -column 2 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.ent_safe_mode_security_profile -row 9 -column 3 -sticky nw -padx 5 -pady 5
|
||||
-row 5 -column 2 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.ent_external_session_manager_connection_string \
|
||||
-row 5 -column 3 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.lbl_security_profile -row 6 -column 2 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.ent_security_profile -row 6 -column 3 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.lbl_safe_mode_security_profile_name -row 7 -column 2 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.ent_safe_mode_security_profile_name -row 7 -column 3 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.lbl_sessions_deny -row 8 -column 2 -sticky nw -padx 5 -pady 5
|
||||
grid $frm.check_sessions_deny -row 8 -column 3 -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
|
||||
|
||||
set lst [RunCommand infobase::$values "infobase info --cluster=$active_cluster --infobase=$values $host"]
|
||||
puts $lst
|
||||
|
@ -1173,27 +1180,30 @@ proc Edit::infobase {tree host values} {
|
|||
}
|
||||
|
||||
.add.frm_btn.btn_ok configure -command {
|
||||
if {$create_db eq "true"} {
|
||||
set db_create "--create-database"
|
||||
} else {
|
||||
set db_create ""
|
||||
}
|
||||
|
||||
RunCommand "" "infobase create $db_create \
|
||||
--name=[.add.frm.ent_infobase_name get] \
|
||||
RunCommand "" "infobase update \
|
||||
--infobase=$infobase \
|
||||
--infobase-user= \
|
||||
--infobase-pwd= \
|
||||
--dbms=$dbms \
|
||||
--db-server=[.add.frm.ent_host get] \
|
||||
--db-name=[.add.frm.ent_base_name get] \
|
||||
--locale=[.add.frm.ent_locale get] \
|
||||
--db-server=[.add.frm.ent_db_server get] \
|
||||
--db-name=[.add.frm.ent_db_name get] \
|
||||
--db-user=[.add.frm.ent_db_user get] \
|
||||
--db-pwd=[.add.frm.ent_db_pass get] \
|
||||
--descr=\"[.add.frm.ent_infobase_descr get]\" \
|
||||
--date-offset=$date_offset \
|
||||
--security-level=$secure_level \
|
||||
--scheduled-jobs-deny=$block_shedule \
|
||||
--db-pwd=[.add.frm.ent_db_pwd get] \
|
||||
--descr=[regsub -all -- " " [.add.frm.ent_descr get] "\\ "]\
|
||||
--denied-from=[.add.frm.ent_denied_from get] \
|
||||
--denied-message=[regsub -all -- " " [.add.frm.ent_denied_message get] "\\ "]\
|
||||
--denied-parameter=[regsub -all -- " " [.add.frm.ent_denied_parameter get] "\\ "]\
|
||||
--denied-to=[.add.frm.ent_denied_to get] \
|
||||
--permission-code=[regsub -all -- " " [.add.frm.ent_permission_code get] "\\ "]\
|
||||
--sessions-deny=$sessions_deny \
|
||||
--scheduled-jobs-deny=$scheduled_jobs_deny \
|
||||
--license-distribution=$license_distribution \
|
||||
--external-session-manager-connection-string=[.add.frm.ent_external_session_manager_connection_string get] \
|
||||
--external-session-manager-required=$external_session_manager_required \
|
||||
--security-profile-name=[.add.frm.ent_security_profile get] \
|
||||
--safe-mode-security-profile-name=[.add.frm.ent_safe_mode_security_profile_name get] \
|
||||
--cluster=$active_cluster $host"
|
||||
Run::infobases $tree $host $active_cluster
|
||||
#Run::infobases $tree $host $active_cluster
|
||||
destroy .add
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user