From 3e6ee19d7fb7c79557cbd89d590413ff549f7df7 Mon Sep 17 00:00:00 2001 From: Sergey Kalinin Date: Fri, 3 Aug 2018 08:23:19 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=87=D0=B8=D1=81=D1=82=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/function.tcl | 48 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/lib/function.tcl b/lib/function.tcl index 54cd7a5..c5dd76e 100644 --- a/lib/function.tcl +++ b/lib/function.tcl @@ -1,4 +1,4 @@ -#des########################################## +########################################## # Rac GUI # Distributed under GNU Public License # Author: Sergey Kalinin svk@nuk-svk.ru @@ -17,7 +17,7 @@ set server "" proc TreePress {tree} { global host server active_cluster infobase - set id [$tree selection] + set id [$tree selection] SetGlobalVarFromTreeItems $tree $id set values [$tree item $id -values] set key [lindex [split $id "::"] 0] @@ -377,7 +377,7 @@ proc Run::infobases {tree host values} { set auth "" } set lst [RunCommand "infobase summary --cluster=$active_cluster $auth list $host"] - puts $lst + #puts $lst foreach info_bases_list $lst { foreach i $info_bases_list { set base_list [split $i ":"] @@ -1247,17 +1247,21 @@ proc Add::profile {tree host values} { global default active_cluster server agent_user agent_pwd cluster_user cluster_pwd auth global config priv crypto right_extension right_extension_definition_roles \ all_modules_extension modules_available_for_extension modules_not_available_for_extension + if {$cluster_user ne "" && $cluster_pwd ne ""} { set auth "--cluster-user=$cluster_user --cluster-pwd=$cluster_pwd" } else { set auth "" } set var_list {config priv crypto right_extension all_modules_extension } - foreach v $var_list {set $v "off"; puts $v} + foreach v $var_list { + set $v "off" + } set var_list {right_extension_definition_roles modules_available_for_extension modules_not_available_for_extension} - foreach v $var_list {set $v 0; puts $v} + foreach v $var_list { + set $v 0 + } unset var_list - puts ">>>$right_extension_definition_roles" set frm [AddToplevel [::msgcat::mc "Security profile"] security_grey_64] @@ -1345,7 +1349,9 @@ proc Add::directory {tree host values} { set auth "" } set var_list {allowedRead allowedWrite} - foreach v $var_list {set $v "no"; puts $v} + foreach v $var_list { + set $v "no" + } unset var_list set frm [AddToplevel [::msgcat::mc "Virtual directory"] directory_grey_64] @@ -1398,7 +1404,9 @@ proc Add::addin {tree host values} { set auth "" } set var_list {allowedRead allowedWrite} - foreach v $var_list {set $v "no"; puts $v} + foreach v $var_list { + set $v "no" + } unset var_list set frm [AddToplevel [::msgcat::mc "Available add-in"] addin_grey_64] @@ -1439,7 +1447,9 @@ proc Add::module {tree host values} { set auth "" } set var_list {allowedRead allowedWrite} - foreach v $var_list {set $v "no"; puts $v} + foreach v $var_list { + set $v "no" + } unset var_list set frm [AddToplevel [::msgcat::mc "External module"] module_grey_64] @@ -1480,7 +1490,9 @@ proc Add::com {tree host values} { set auth "" } set var_list {allowedRead allowedWrite} - foreach v $var_list {set $v "no"; puts $v} + foreach v $var_list { + set $v "no" + } unset var_list set frm [AddToplevel [::msgcat::mc "COM class"] com_grey_64] @@ -1531,7 +1543,9 @@ proc Add::app {tree host values} { set auth "" } set var_list {allowedRead allowedWrite} - foreach v $var_list {set $v "no"; puts $v} + foreach v $var_list { + set $v "no" + } unset var_list set frm [AddToplevel [::msgcat::mc "Application"] app_grey_64] @@ -1571,7 +1585,9 @@ proc Add::inet {tree host values} { set auth "" } set var_list {allowedRead allowedWrite} - foreach v $var_list {set $v "no"; puts $v} + foreach v $var_list { + set $v "no" + } unset var_list set frm [AddToplevel [::msgcat::mc "Internet resource"] link_grey_64] @@ -1625,8 +1641,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 + #puts $key + #puts $values if {$values eq "" || $key eq ""} {return} Edit::$key $tree $host $values } @@ -1938,6 +1954,10 @@ proc Edit::profile {tree host values} { } else { set auth "" } + set lst [GetWorkTreeRow] + if {$lst eq ""} { + return + } set frm [Add::profile $tree $host $values] wm title .add [::msgcat::mc "Edit record"]