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 11:23:20 +03:00
parent 12fa21fe29
commit f892599936
2 changed files with 17 additions and 3 deletions

View File

@ -301,7 +301,9 @@ proc GetWorkTreeItems {par} {
proc GetWorkTreeRow {} {
set work_tree_id [.frm_work.tree_work selection]
#puts "$work_tree_id"
if {$work_tree_id eq ""} {
return
}
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]
@ -1581,6 +1583,8 @@ proc Edit {} {
set id [.frm_tree.tree selection]
set values [.frm_tree.tree item $id -values]
set key [lindex [split $id "::"] 0]
puts $key
puts $values
if {$values eq "" || $key eq ""} {return}
Edit::$key $tree $host $values
}
@ -1952,11 +1956,18 @@ 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]
if {$lst eq ""} {
return
}
set frm [Add::$item $tree $host $profile_name]
$frm configure -text $descr
FormFieldsDataInsert $frm [list $lst]
$frm.ent_name configure -state disable
}
proc Edit::connections {tree host values} {return}
proc Edit::processes {tree host values} {return}
proc Edit::locks {tree host values} {return}
proc Edit::sessions {tree host values} {return}
proc Del {} {
global active_cluster host
@ -2226,6 +2237,10 @@ proc Del::profiles {tree host values} {
proc Del::acl {host type name profile_name} {
global active_cluster agent_user agent_pwd cluster_user cluster_pwd auth
if {$name eq ""} {
return
}
if {$cluster_user ne "" && $cluster_pwd ne ""} {
set auth "--cluster-user=$cluster_user --cluster-pwd=$cluster_pwd"
} else {

View File

@ -78,6 +78,7 @@ set tree_work [
# table rows background colors
$tree_work tag configure dark -background $color(dark_table_bg)
$tree_work tag configure light -background $color(light_table_bg)
bind $tree_work <Double-ButtonPress-1> Edit
#$tree_work heading par -text "Параметр" -anchor center
#$tree_work heading val -text "Значение" -anchor center
@ -97,5 +98,3 @@ pack $frm_tree $frm_work -side left -expand true -fill both
#.panel add $frm_tool -weight 1
.panel add $frm_tree -weight 1
.panel add $frm_work -weight 1