1
0
mirror of https://bitbucket.org/svk28/rac-gui synced 2024-12-04 18:46:52 +00:00

Исправлены ошибки при добавлении ИБ

Реализованы процедуры добавления элементов профиля безопасности
This commit is contained in:
Sergey Kalinin 2018-07-20 06:50:00 +03:00
parent 07dd503666
commit 4dfa7e2a66

View File

@ -658,25 +658,25 @@ proc Run::rule {tree host values} {
}
proc Run::directory {tree host values} {
Run::acl $tree $host $values directory
Run::acl $host $values directory
}
proc Run::com {tree host values} {
Run::acl $tree $host $values com
Run::acl $host $values com
}
proc Run::addin {tree host values} {
Run::acl $tree $host $values addin
Run::acl $host $values addin
}
proc Run::module {tree host values} {
Run::acl $tree $host $values module
Run::acl $host $values module
}
proc Run::app {tree host values} {
Run::acl $tree $host $values app
Run::acl $host $values app
}
proc Run::inet {tree host values} {
Run::acl $tree $host $values inet
Run::acl $host $values inet
}
proc Run::acl {tree host values mode} {
proc Run::acl {host values mode} {
global active_cluster cluster_user cluster_pwd profile_name
if {$cluster_user ne "" && $cluster_pwd ne ""} {
set auth "--cluster-user=$cluster_user --cluster-pwd=$cluster_pwd"
@ -1028,7 +1028,7 @@ proc Add::infobases {tree host values} {
--locale=[.add.frm.ent_locale get] \
--db-user=[.add.frm.ent_db_user get] \
--db-pwd=[.add.frm.ent_db_pwd get] \
--descr=\"[.add.frm.ent_descr get]\" \
--descr=[regsub -all -- " " [.add.frm.ent_descr get] "\\ "] \
--date-offset=$date_offset \
--security-level=$security_level \
--scheduled-jobs-deny=$scheduled_jobs_deny \
@ -1264,7 +1264,7 @@ proc Add::profile {tree host values} {
RunCommand "profile update \
--cluster=$active_cluster $auth \
--name=[.add.frm.ent_name get] \
--descr=[.add.frm.ent_descr get] \
--descr=[regsub -all -- " " [.add.frm.ent_descr get] "\\ "] \
--config=$config \
--priv=$priv \
--crypto=$crypto \
@ -1317,12 +1317,12 @@ proc Add::directory {tree host values} {
.add.frm_btn.btn_ok configure -command {
RunCommand "profile acl directory update \
--cluster=$active_cluster $auth \
--name=$profile_name \
--alias=[.add.frm.ent_alias get] \
--descr=[.add.frm.ent_descr get] \
--physicalPath=[.add.frm.ent_descr get] \
RunCommand "profile --cluster=$active_cluster $auth \
acl --name=$profile_name \
directory update \
\"--alias=[regsub -all -- " " [.add.frm.ent_alias get] "\\ "]\" \
\"--descr=[regsub -all -- " " [.add.frm.ent_descr get] "\\ "]\" \
\"--physicalPath=[regsub -all -- " " [.add.frm.ent_physicalPath get] "\\ "]\" \
--allowedRead=$allowedRead \
--allowedWrite=$allowedWrite \
$host"
@ -1361,11 +1361,11 @@ proc Add::addin {tree host values} {
grid $frm.ent_hash -row 2 -column 1 -sticky nw -padx 5 -pady 5
.add.frm_btn.btn_ok configure -command {
RunCommand "profile acl addin update \
--cluster=$active_cluster $auth \
--name=$profile_name \
--name=[.add.frm.ent_name get] \
--descr=[.add.frm.ent_descr get] \
RunCommand "profile --cluster=$active_cluster $auth \
acl --name=$profile_name \
addin update \
\"--name=[regsub -all -- " " [.add.frm.ent_name get] "\\ "]\" \
\"--descr=[regsub -all -- " " [.add.frm.ent_descr get] "\\ "]\" \
--hash=[.add.frm.ent_hash get] \
$host"
Run::addin $tree $host $profile_name
@ -1402,11 +1402,11 @@ proc Add::module {tree host values} {
grid $frm.ent_hash -row 2 -column 1 -sticky nw -padx 5 -pady 5
.add.frm_btn.btn_ok configure -command {
RunCommand "profile acl module update \
--cluster=$active_cluster $auth \
--name=$profile_name \
--name=[.add.frm.ent_name get] \
--descr=[.add.frm.ent_descr get] \
RunCommand "profile --cluster=$active_cluster $auth \
acl --name=$profile_name \
module update \
\"--name=[regsub -all -- " " [.add.frm.ent_name get] "\\ "]\" \
\"--descr=[regsub -all -- " " [.add.frm.ent_descr get] "\\ "]\" \
--hash=[.add.frm.ent_hash get] \
$host"
Run::module $tree $host $profile_name
@ -1452,12 +1452,11 @@ proc Add::com {tree host values} {
.add.frm_btn.btn_ok configure -command {
RunCommand "profile acl com update \
--cluster=$active_cluster $auth \
--name=$profile_name \
--name=[.add.frm.ent_name get] \
--descr=[.add.frm.ent_descr get] \
--fileName=[.add.frm.ent_fileName get] \
RunCommand "profile --cluster=$active_cluster $auth \
acl --name=$profile_name com update \
\"--name=[regsub -all -- " " [.add.frm.ent_name get] "\\ "]\" \
\"--descr=[regsub -all -- " " [.add.frm.ent_descr get] "\\ "]\" \
\"--fileName=[regsub -all -- " " [.add.frm.ent_fileName get] "\\ "]\" \
--id=[.add.frm.ent_id get] \
--host=[.add.frm.ent_host get] \
$host"
@ -1495,12 +1494,11 @@ proc Add::app {tree host values} {
grid $frm.ent_wild -row 2 -column 1 -sticky nw -padx 5 -pady 5
.add.frm_btn.btn_ok configure -command {
RunCommand "profile acl app update \
--cluster=$active_cluster $auth \
--name=$profile_name \
--name=[.add.frm.ent_name get] \
--descr=[.add.frm.ent_descr get] \
--wild=[.add.frm.ent_wild get] \
RunCommand "profile --cluster=$active_cluster $auth \
acl --name=$profile_name app update \
\"--name=[regsub -all -- " " [.add.frm.ent_name get] "\\ "]\" \
\"--descr=[regsub -all -- " " [.add.frm.ent_descr get] "\\ "]\" \
\"--wild=[regsub -all -- " " [.add.frm.ent_wild get] "\\ "]\" \
$host"
Run::app $tree $host $profile_name
destroy .add
@ -1528,7 +1526,7 @@ proc Add::inet {tree host values} {
label $frm.lbl_protocol -justify left -anchor nw -text "Протокол"
entry $frm.ent_protocol
label $frm.lbl_url -justify left -anchor nw -text "Адрес (URL)"
entry $frm.url
entry $frm.ent_url
label $frm.lbl_port -justify left -anchor nw -text "Порт"
entry $frm.ent_port
$frm.ent_port insert end 0
@ -1546,13 +1544,12 @@ proc Add::inet {tree host values} {
.add.frm_btn.btn_ok configure -command {
RunCommand "profile acl inet update \
--cluster=$active_cluster $auth \
--name=$profile_name \
--name=[.add.frm.ent_name get] \
--descr=[.add.frm.ent_descr get] \
RunCommand "profile --cluster=$active_cluster $auth \
acl --name=$profile_name inet update \
\"--name=[regsub -all -- " " [.add.frm.ent_name get] "\\ "]\" \
\"--descr=[regsub -all -- " " [.add.frm.ent_descr get] "\\ "]\" \
--protocol=[.add.frm.ent_protocol get] \
--url=[.add.frm.ent_url get] \
\"--url=[regsub -all -- " " [.add.frm.ent_url get] "\\ "]\" \
--port=[.add.frm.ent_port get] \
$host"
Run::inet $tree $host $profile_name
@ -1892,7 +1889,7 @@ proc Edit::profile {tree host values} {
RunCommand "profile update \
--cluster=$active_cluster $auth \
--name=[.add.frm.ent_name get] \
--descr=[.add.frm.ent_descr get] \
\"--descr=[regsub -all -- " " [.add.frm.ent_descr get] "\\ "]\" \
--config=$config \
--priv=$priv \
--crypto=$crypto \
@ -1909,6 +1906,7 @@ proc Edit::profile {tree host values} {
proc Edit::profiles {tree host values} {
return
}
proc Del {} {
global active_cluster host
set tree .frm_tree.tree
@ -2196,7 +2194,7 @@ proc Del::acl {host type name profile_name} {
-icon question -type yesno ]
switch -- $answer {
yes {
set lst [RunCommand "profile acl $type remove $item --cluster=$active_cluster --name=$profile_name $auth $host"]
set lst [RunCommand "profile --cluster=$active_cluster acl --name=$profile_name $type remove $item $auth $host"]
#.frm_tree.tree delete "profile::$values"
.frm_work.tree_work delete [ .frm_work.tree_work children {}]
Run::$type .frm_tree.tree $host $active_cluster
@ -2226,3 +2224,4 @@ proc Del::inet {tree host profile_name} {