Добавлена процедура редактирования по двойному клику в списке
Добавлены заглушки при нажатии кнопки редактирования на нередактируемых элементах
This commit is contained in:
parent
12fa21fe29
commit
f892599936
|
@ -301,7 +301,9 @@ proc GetWorkTreeItems {par} {
|
||||||
|
|
||||||
proc GetWorkTreeRow {} {
|
proc GetWorkTreeRow {} {
|
||||||
set work_tree_id [.frm_work.tree_work selection]
|
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 work_tree_values_list [.frm_work.tree_work item $work_tree_id -values]
|
||||||
set column_list [.frm_work.tree_work cget -columns]
|
set column_list [.frm_work.tree_work cget -columns]
|
||||||
set l1 [llength $column_list]
|
set l1 [llength $column_list]
|
||||||
|
@ -1581,6 +1583,8 @@ proc Edit {} {
|
||||||
set id [.frm_tree.tree selection]
|
set id [.frm_tree.tree selection]
|
||||||
set values [.frm_tree.tree item $id -values]
|
set values [.frm_tree.tree item $id -values]
|
||||||
set key [lindex [split $id "::"] 0]
|
set key [lindex [split $id "::"] 0]
|
||||||
|
puts $key
|
||||||
|
puts $values
|
||||||
if {$values eq "" || $key eq ""} {return}
|
if {$values eq "" || $key eq ""} {return}
|
||||||
Edit::$key $tree $host $values
|
Edit::$key $tree $host $values
|
||||||
}
|
}
|
||||||
|
@ -1952,11 +1956,18 @@ proc Edit::acl {tree host item descr} {
|
||||||
global default active_cluster profile_name \
|
global default active_cluster profile_name \
|
||||||
agent_user agent_pwd cluster_user cluster_pwd auth
|
agent_user agent_pwd cluster_user cluster_pwd auth
|
||||||
set lst [GetWorkTreeRow]
|
set lst [GetWorkTreeRow]
|
||||||
|
if {$lst eq ""} {
|
||||||
|
return
|
||||||
|
}
|
||||||
set frm [Add::$item $tree $host $profile_name]
|
set frm [Add::$item $tree $host $profile_name]
|
||||||
$frm configure -text $descr
|
$frm configure -text $descr
|
||||||
FormFieldsDataInsert $frm [list $lst]
|
FormFieldsDataInsert $frm [list $lst]
|
||||||
$frm.ent_name configure -state disable
|
$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 {} {
|
proc Del {} {
|
||||||
global active_cluster host
|
global active_cluster host
|
||||||
|
@ -2226,6 +2237,10 @@ proc Del::profiles {tree host values} {
|
||||||
|
|
||||||
proc Del::acl {host type name profile_name} {
|
proc Del::acl {host type name profile_name} {
|
||||||
global active_cluster agent_user agent_pwd cluster_user cluster_pwd auth
|
global active_cluster agent_user agent_pwd cluster_user cluster_pwd auth
|
||||||
|
if {$name eq ""} {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if {$cluster_user ne "" && $cluster_pwd ne ""} {
|
if {$cluster_user ne "" && $cluster_pwd ne ""} {
|
||||||
set auth "--cluster-user=$cluster_user --cluster-pwd=$cluster_pwd"
|
set auth "--cluster-user=$cluster_user --cluster-pwd=$cluster_pwd"
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -78,6 +78,7 @@ set tree_work [
|
||||||
# table rows background colors
|
# table rows background colors
|
||||||
$tree_work tag configure dark -background $color(dark_table_bg)
|
$tree_work tag configure dark -background $color(dark_table_bg)
|
||||||
$tree_work tag configure light -background $color(light_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 par -text "Параметр" -anchor center
|
||||||
#$tree_work heading val -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_tool -weight 1
|
||||||
.panel add $frm_tree -weight 1
|
.panel add $frm_tree -weight 1
|
||||||
.panel add $frm_work -weight 1
|
.panel add $frm_work -weight 1
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user