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 10:55:47 +03:00
parent 733558ab6d
commit 12fa21fe29

View File

@ -299,6 +299,22 @@ proc GetWorkTreeItems {par} {
return $item_id
}
proc GetWorkTreeRow {} {
set work_tree_id [.frm_work.tree_work selection]
#puts "$work_tree_id"
set work_tree_values_list [.frm_work.tree_work item $work_tree_id -values]
set column_list [.frm_work.tree_work cget -columns]
set l1 [llength $column_list]
set l2 [llength $work_tree_values_list]
if {$l1 == $l2} {
for {set i 0} {$i <= $l1 } {incr i} {
lappend lst "[lindex $column_list $i] : [lindex $work_tree_values_list $i]"
}
} else {
return
}
return $lst
}
namespace eval Run {} {}
# Получение данных по кластерам
@ -1345,7 +1361,7 @@ proc Add::addin {tree host values} {
foreach v $var_list {set $v "no"; puts $v}
unset var_list
set frm [AddToplevel "Компонента" addin_grey_64]
set frm [AddToplevel "Внешняя компонента" addin_grey_64]
label $frm.lbl_name -text "Имя"
entry $frm.ent_name
@ -1909,22 +1925,37 @@ proc Edit::profiles {tree host values} {
}
proc Edit::directory {tree host values} {
return
global default active_cluster profile_name \
agent_user agent_pwd cluster_user cluster_pwd auth
set lst [GetWorkTreeRow]
set frm [Add::directory $tree $host $profile_name]
$frm configure -text "Редактирование виртуального каталога"
FormFieldsDataInsert $frm [list $lst]
$frm.ent_alias configure -state disable
}
proc Edit::addin {tree host values} {
return
Edit::acl $tree $host addin "Редактирование внешней компоненты"
}
proc Edit::module {tree host values} {
return
Edit::acl $tree $host module "Редактирование"
}
proc Edit::com {tree host values} {
return
Edit::acl $tree $host com "Редактирование COM-класса"
}
proc Edit::app {tree host values} {
return
Edit::acl $tree $host app "Редактирование приложения"
}
proc Edit::inet {tree host values} {
return
Edit::acl $tree $host inet "Редактирование ссылки"
}
proc Edit::acl {tree host item descr} {
global default active_cluster profile_name \
agent_user agent_pwd cluster_user cluster_pwd auth
set lst [GetWorkTreeRow]
set frm [Add::$item $tree $host $profile_name]
$frm configure -text $descr
FormFieldsDataInsert $frm [list $lst]
$frm.ent_name configure -state disable
}
proc Del {} {
@ -2242,8 +2273,3 @@ proc Del::app {tree host profile_name} {
proc Del::inet {tree host profile_name} {
Del::acl $host inet [GetWorkTreeItems "name"] $profile_name
}