Добавлены изменения в файлы для пакетов. Добавлена процедура автогенерации конфига на основе списка ИБ кластера
This commit is contained in:
parent
a32447dc05
commit
913a734817
|
@ -29,21 +29,12 @@ localhost:1545 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
192.168.52.45:1545 {
|
}
|
||||||
|
192.168.5.145:1545 {
|
||||||
name "1C test"
|
name "1C test"
|
||||||
rac_cmd "/opt/1C/v8.3/x86_64/rac"
|
rac_cmd "/opt/1C/v8.3/x86_64/rac"
|
||||||
clusters {
|
clusters {
|
||||||
}
|
|
||||||
}
|
}
|
||||||
1csrv:1545 {
|
|
||||||
name "1C SRV"
|
|
||||||
rac_cmd "/opt/1C/v8.3.13_1644/x86_64/rac"
|
|
||||||
clusters {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
18
debian/changelog
vendored
18
debian/changelog
vendored
|
@ -1,9 +1,20 @@
|
||||||
|
rac-gui (1.1.0-1) stable; urgency=medium
|
||||||
|
|
||||||
|
* Added new rac command options
|
||||||
|
* Added HELP dialog
|
||||||
|
* Moved configuration files according to XDG standard
|
||||||
|
* Change 1c-srv.cfg format
|
||||||
|
* Fixed some errors
|
||||||
|
* Added translated method for table headers
|
||||||
|
|
||||||
|
-- Sergey Kalinin <svk@nuk-svk.ru> Wed, 25 Sep 2019 09:00:31 +0300
|
||||||
|
|
||||||
rac-gui (1.0.3-1) stable; urgency=medium
|
rac-gui (1.0.3-1) stable; urgency=medium
|
||||||
|
|
||||||
* CI/CD integration
|
* CI/CD integration
|
||||||
* New server config added
|
* New server config added
|
||||||
|
|
||||||
-- Sergey Kalinin <svk@nuk-svk.ru> Thu, 15 Jul 2019 09:20:31 +0300
|
-- Sergey Kalinin <svk@nuk-svk.ru> Thu, 15 Jul 2019 09:20:31 +0300
|
||||||
|
|
||||||
rac-gui (1.0.2-2) stable; urgency=medium
|
rac-gui (1.0.2-2) stable; urgency=medium
|
||||||
|
|
||||||
|
@ -17,3 +28,4 @@ rac-gui (1.0.1-1) stable; urgency=medium
|
||||||
|
|
||||||
-- Sergey Kalinin <svk@nuk-svk.ru> Mon, 22 Jul 2019 14:56:31 +0300
|
-- Sergey Kalinin <svk@nuk-svk.ru> Mon, 22 Jul 2019 14:56:31 +0300
|
||||||
|
|
||||||
|
|
||||||
|
|
1
debian/docs
vendored
1
debian/docs
vendored
|
@ -2,3 +2,4 @@ README.md
|
||||||
doc/CHANGELOG
|
doc/CHANGELOG
|
||||||
doc/TODO
|
doc/TODO
|
||||||
doc/rac-manual.txt
|
doc/rac-manual.txt
|
||||||
|
doc/racgui_manual.txt
|
|
@ -22,7 +22,6 @@ proc GetInfobasePassword {host cluster infobase} {
|
||||||
return [dict get $servers_list servers $host clusters $cluster infobases $infobase infobase_pwd]
|
return [dict get $servers_list servers $host clusters $cluster infobases $infobase infobase_pwd]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc GetClusterAdmin {host cluster} {
|
proc GetClusterAdmin {host cluster} {
|
||||||
global servers_list
|
global servers_list
|
||||||
if [dict exists $servers_list servers $host clusters $cluster cluster_user] {
|
if [dict exists $servers_list servers $host clusters $cluster cluster_user] {
|
||||||
|
@ -96,32 +95,24 @@ proc SetServersConfigDict {} {
|
||||||
# Сохраянем конфиг
|
# Сохраянем конфиг
|
||||||
proc SaveConfig {} {
|
proc SaveConfig {} {
|
||||||
global dir servers_list
|
global dir servers_list
|
||||||
|
#puts ">>>>>>>>>>> $servers_list <<<<<<<<<<<<"
|
||||||
set file [open [file join $dir(work) 1c_srv_new.cfg] "w"]
|
set file [open [file join $dir(work) 1c_srv_new.cfg] "w"]
|
||||||
set f [open [file join $dir(work) 1c_srv_new_.cfg] "w"]
|
set f [open [file join $dir(work) 1c_srv_new_.cfg] "w"]
|
||||||
if {![dict exists $servers_list servers]} {
|
if {![dict exists $servers_list servers]} {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
set dict [dict get $servers_list servers]
|
set dict [dict get $servers_list servers]
|
||||||
#puts "\n\n[split $dict " "]\n\n"
|
|
||||||
set dict [string map {"\{" "\{\n" "\}" "\n\}"} $dict]
|
set dict [string map {"\{" "\{\n" "\}" "\n\}"} $dict]
|
||||||
regsub -- {(\})} $dict "\}\n" dict
|
regsub -- {(\})} $dict "\}\n" dict
|
||||||
puts "_________"
|
|
||||||
puts $servers_list
|
|
||||||
puts "2_________"
|
|
||||||
puts $dict
|
|
||||||
#ictFormatter [dict get $servers_list servers] "-"
|
|
||||||
#DictFormatter $dict "-"
|
|
||||||
#regexp -all -indices -line -- {\}(.+?)\{} $dict m
|
|
||||||
#puts " \n $m"
|
|
||||||
puts $file $dict
|
puts $file $dict
|
||||||
close $file
|
close $file
|
||||||
#return
|
|
||||||
set file [open [file join $dir(work) 1c_srv_new.cfg] "r"]
|
set file [open [file join $dir(work) 1c_srv_new.cfg] "r"]
|
||||||
|
|
||||||
set str ""
|
set str ""
|
||||||
seek $file 0
|
seek $file 0
|
||||||
set close_brace 0
|
set close_brace 0
|
||||||
set open_brace 0
|
set open_brace 0
|
||||||
|
set indent ""
|
||||||
while {[gets $file line] >=0} {
|
while {[gets $file line] >=0} {
|
||||||
if [regexp -- {\{} $line] {
|
if [regexp -- {\{} $line] {
|
||||||
if {$open_brace == 0} {
|
if {$open_brace == 0} {
|
||||||
|
@ -137,22 +128,16 @@ proc SaveConfig {} {
|
||||||
incr close_brace
|
incr close_brace
|
||||||
}
|
}
|
||||||
if [regexp -nocase -all -- {(\})(.+?\{)} $line match brace phrase] {
|
if [regexp -nocase -all -- {(\})(.+?\{)} $line match brace phrase] {
|
||||||
# puts "> $v1 >>$v2"
|
|
||||||
#append indent " "
|
|
||||||
set line "$brace\n$indent$phrase"
|
set line "$brace\n$indent$phrase"
|
||||||
#set line [string map {"\}" "\}\n"} $line]
|
|
||||||
#regsub -- {\} } $line "\}\n$indent" line
|
|
||||||
}
|
}
|
||||||
if {$open_brace > $close_brace} {
|
if {$open_brace > $close_brace} {
|
||||||
#set line "$indent$line"
|
#set line "$indent$line"
|
||||||
}
|
}
|
||||||
if [regexp -nocase -indices -all -- {((.*?)\s(".*?"))} $line match v1 v2 v3] {
|
if [regexp -nocase -indices -all -- {((.*?)\s(".*?"))} $line match v1 v2 v3] {
|
||||||
puts "> $v1 >>$v2 >>> $v3"
|
|
||||||
set index [lindex [split $v3 " "] 1]
|
set index [lindex [split $v3 " "] 1]
|
||||||
puts $index
|
#puts $index
|
||||||
set last_pair [string trim [string range $line $index+1 end]]
|
set last_pair [string trim [string range $line $index+1 end]]
|
||||||
set line [GetDictFromString $line $indent]
|
set line [GetDictFromString $line $indent]
|
||||||
puts ">$last_pair<"
|
|
||||||
if {$last_pair ne ""} {
|
if {$last_pair ne ""} {
|
||||||
append line "$indent[string trim $last_pair]"
|
append line "$indent[string trim $last_pair]"
|
||||||
}
|
}
|
||||||
|
@ -168,6 +153,8 @@ proc SaveConfig {} {
|
||||||
puts $file $line
|
puts $file $line
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#puts $file $servers_list
|
||||||
|
#file delete -force [file join $dir(work) 1c_srv_new_.cfg]
|
||||||
#file copy -force [file join $dir(work) 1c_srv_new_.cfg] [file join $dir(work) 1c_srv_new.cfg]
|
#file copy -force [file join $dir(work) 1c_srv_new_.cfg] [file join $dir(work) 1c_srv_new.cfg]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,8 +212,3 @@ proc CopyNewConfig {} {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ proc SetGlobalVarFromTreeItems {tree id} {
|
||||||
}
|
}
|
||||||
infobase {
|
infobase {
|
||||||
set infobase $values
|
set infobase $values
|
||||||
#dict set servers_list servers $host clusters $active_cluster infobases $values
|
#puts [dict set servers_list servers $host clusters $active_cluster infobases $values]
|
||||||
}
|
}
|
||||||
profile {
|
profile {
|
||||||
set profile_name $values
|
set profile_name $values
|
||||||
|
@ -493,7 +493,7 @@ proc Run::services {tree host values} {
|
||||||
}
|
}
|
||||||
|
|
||||||
proc Run::infobases {tree host values} {
|
proc Run::infobases {tree host values} {
|
||||||
global active_cluster cluster_user cluster_pwd
|
global active_cluster cluster_user cluster_pwd servers_list
|
||||||
.frm_work.tree_work delete [ .frm_work.tree_work children {}]
|
.frm_work.tree_work delete [ .frm_work.tree_work children {}]
|
||||||
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"
|
||||||
|
@ -520,9 +520,15 @@ proc Run::infobases {tree host values} {
|
||||||
set id [lindex $base($x) 0]
|
set id [lindex $base($x) 0]
|
||||||
if { [$tree exists "infobase::$id"] == 0 } {
|
if { [$tree exists "infobase::$id"] == 0 } {
|
||||||
$tree insert "infobases::$values" end -id "infobase::$id" -text "[lindex $base($x) 1]" -values "$id"
|
$tree insert "infobases::$values" end -id "infobase::$id" -text "[lindex $base($x) 1]" -values "$id"
|
||||||
|
if {![dict exists $servers_list servers $host clusters $active_cluster infobases $id]} {
|
||||||
|
dict set servers_list servers $host clusters $active_cluster \
|
||||||
|
infobases $id "name \"[lindex $base($x) 1]\""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
InsertBaseItems $tree $id
|
InsertBaseItems $tree $id
|
||||||
}
|
}
|
||||||
|
#dict update dictionaryVariable key varName ?key varName ...? body
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
proc Run::infobase {tree host values} {
|
proc Run::infobase {tree host values} {
|
||||||
|
@ -1018,18 +1024,25 @@ proc Add::server {} {
|
||||||
}
|
}
|
||||||
|
|
||||||
.add.frm_btn.btn_ok configure -command {
|
.add.frm_btn.btn_ok configure -command {
|
||||||
|
set msg ""
|
||||||
set server_name "[.add.frm.ent_server_name get]"
|
set server_name "[.add.frm.ent_server_name get]"
|
||||||
set host "[.add.frm.ent_host get]:[.add.frm.ent_port get]"
|
set host "[.add.frm.ent_host get]:[.add.frm.ent_port get]"
|
||||||
set rac_cmd_for_host($host) [.add.frm.ent_path_to_rac get]
|
set rac_cmd_for_host($host) "[.add.frm.ent_path_to_rac get]"
|
||||||
|
if {$rac_cmd_for_host($host) eq ""} {
|
||||||
dict set servers_list servers $host "name \"$server_name\" rac_cmd $rac_cmd_for_host($host) clusters {}"
|
append msg [::msgcat::mc "Command must be"] " 'rac' " \
|
||||||
|
[::msgcat::mc "or"] " 'rac.exe'\n"
|
||||||
|
tk_messageBox -message [::msgcat::mc $msg] -icon question -type ok
|
||||||
|
return
|
||||||
|
}
|
||||||
|
dict set servers_list servers $host "name \"$server_name\" rac_cmd \"$rac_cmd_for_host($host)\" clusters {}"
|
||||||
|
|
||||||
#set host [SaveMainServer [.add.frm.ent_host get] [.add.frm.ent_port get] [.add.frm.ent_path_to_rac get]]
|
#set host [SaveMainServer [.add.frm.ent_host get] [.add.frm.ent_port get] [.add.frm.ent_path_to_rac get]]
|
||||||
#set rac_cmd_for_host($host) [.add.frm.ent_path_to_rac get]
|
#set rac_cmd_for_host($host) [.add.frm.ent_path_to_rac get]
|
||||||
#puts $servers_list
|
#puts $servers_list
|
||||||
.frm_tree.tree insert {} end -id "server::$host" -text "$server_name" -values "$host"
|
.frm_tree.tree insert {} end -id "server::$host" -text "$server_name" -values "$host"
|
||||||
destroy .add
|
destroy .add
|
||||||
SaveConfig
|
unset msg
|
||||||
|
#SaveConfig
|
||||||
return $host
|
return $host
|
||||||
}
|
}
|
||||||
return $frm
|
return $frm
|
||||||
|
@ -2582,3 +2595,4 @@ proc Del::app {tree host profile_name} {
|
||||||
proc Del::inet {tree host profile_name} {
|
proc Del::inet {tree host profile_name} {
|
||||||
Del::acl $host inet [GetWorkTreeItems "name"] $profile_name
|
Del::acl $host inet [GetWorkTreeItems "name"] $profile_name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
rac_gui.spec
10
rac_gui.spec
|
@ -7,7 +7,7 @@ Group: System
|
||||||
Url: https://bitbucket.org/svk28/rac-gui
|
Url: https://bitbucket.org/svk28/rac-gui
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Source: %name-%version-%release.tar.gz
|
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
|
%description
|
||||||
This program ia a grafics user interface for 1C rac util.
|
This program ia a grafics user interface for 1C rac util.
|
||||||
|
@ -59,6 +59,13 @@ install -p -m644 lib/msg/*.* $RPM_BUILD_ROOT%_datadir/%name/lib/msg/
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 25 2019 Sergey Kalinin <svk@nuk-svk.ru> 1.1.0
|
||||||
|
- Added new rac command options
|
||||||
|
- Added HELP dialog
|
||||||
|
- Moved configuration files according to XDG standard
|
||||||
|
- Change 1c-srv.cfg format
|
||||||
|
- Fixed some errors
|
||||||
|
- Added translated method for table headers
|
||||||
|
|
||||||
* Thu Aug 15 2019 Sergey Kalinin <svk@nuk-svk.ru> 1.0.3
|
* Thu Aug 15 2019 Sergey Kalinin <svk@nuk-svk.ru> 1.0.3
|
||||||
- New server config
|
- New server config
|
||||||
|
@ -69,3 +76,4 @@ install -p -m644 lib/msg/*.* $RPM_BUILD_ROOT%_datadir/%name/lib/msg/
|
||||||
|
|
||||||
* Mon Aug 06 2018 Sergey Kalinin <svk@nuk-svk.ru> 1.0.0
|
* Mon Aug 06 2018 Sergey Kalinin <svk@nuk-svk.ru> 1.0.0
|
||||||
- Initial release
|
- Initial release
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user