From 7426f036fbfc959cb9eaaa1484b5b4d4ab6bc961 Mon Sep 17 00:00:00 2001 From: Sergey Date: Sat, 24 Aug 2019 14:54:32 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BD=D1=8B=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B8=20?= =?UTF-8?q?=D0=BD=D0=B0=20json=20=D0=B8=20tcllib?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/control | 3 ++- lib/function.tcl | 45 +-------------------------------------------- rac_gui.spec | 3 ++- rac_gui.tcl | 4 +--- 4 files changed, 6 insertions(+), 49 deletions(-) diff --git a/debian/control b/debian/control index 6971366..f9ab902 100644 --- a/debian/control +++ b/debian/control @@ -9,8 +9,9 @@ Vcs-Git: https://bitbucket.org/svk28/rac-gui.git Package: rac-gui Architecture: any -Depends: tcl(>=8.6), tk(>=8.6), tcllib, ${misc:Depends} +Depends: tcl(>=8.6), tk(>=8.6), ${misc:Depends} Description: This program is a GUI for 1C RAC util. Rac-GUI is a graphical user interface for 1C rac (remote access controll) programm. 1C RAC is a software for 1C-servers cluster management. + diff --git a/lib/function.tcl b/lib/function.tcl index 5457257..4525890 100644 --- a/lib/function.tcl +++ b/lib/function.tcl @@ -340,50 +340,6 @@ proc GetWorkTreeRow {} { return $lst } -proc JsonGet {json args} { - foreach key $args { - if {[dict exists $json $key]} { - set json [dict get $json $key] - } elseif {[string is integer $key]} { - if {$key >= 0 && $key < [llength $json]} { - set json [lindex $json $key] - } else { - error "can't get item number $key from {$json}" - } - } else { - error "can't get \"$key\": no such key in {$json}" - } - } - return $json -} - -proc CreateInfoBasesJSONfile {} { - global default dir - set info_base_json_file [file join $dir(work) infobases.lst] - set jsonStr { \ - { - "servers":[ - { "server-id": "server_id1", - "clusters": [ - {"cluster-id": "cluster_id_1", "infobases": [ - {"infobase-uid": "infobase_uid_1", "infobase-user":"infobase_user", "infobase-pwd":"infobase_pwd"}, - {"infobase-uid": "infobase_uid_2", "infobase-user":"infobase_user", "infobase-pwd":"infobase_pwd"}] - } - ] - }, - { "server-id": "server_id2", - "clusters": [ - {"cluster-id": "cluster_id_1", "infobases": [ - {"infobase-uid": "infobase_uid_1", "infobase-user":"infobase_user", "infobase-pwd":"infobase_pwd"}, - {"infobase-uid": "infobase_uid_2", "infobase-user":"infobase_user", "infobase-pwd":"infobase_pwd"}] - } - ]} - ]} -} - - -} - namespace eval Run {} {} # Получение данных по кластерам @@ -2479,3 +2435,4 @@ proc Del::inet {tree host profile_name} { + diff --git a/rac_gui.spec b/rac_gui.spec index 3a04474..e9fe8de 100644 --- a/rac_gui.spec +++ b/rac_gui.spec @@ -7,7 +7,7 @@ Group: System Url: https://bitbucket.org/svk28/rac-gui BuildArch: noarch Source: %name-%version-%release.tar.gz -Requires: tcl => 8.6.8, tk >= 8.6.8, tcllib +Requires: tcl => 8.6.8, tk >= 8.6.8 %description This program ia a grafics user interface for 1C rac util. @@ -69,3 +69,4 @@ install -p -m644 lib/msg/*.* $RPM_BUILD_ROOT%_datadir/%name/lib/msg/ * Mon Aug 06 2018 Sergey Kalinin 1.0.0 - Initial release + diff --git a/rac_gui.tcl b/rac_gui.tcl index 1ee51db..ff9b599 100755 --- a/rac_gui.tcl +++ b/rac_gui.tcl @@ -3,8 +3,7 @@ exec wish "$0" -- "$@" package require msgcat -package require json -package require json::write + ###################################################### # Rac GUI @@ -115,4 +114,3 @@ if [file exists [file join $dir(work) 1c_srv.cfg]] { # option add *ScrollableFrame.Background $editor(bg) interactive # option add *ScrolledWindow.Background $editor(bg) interactive -CreateInfoBasesJSONfile