/[smeserver]/rpms/smeserver-manager/sme10/smeserver-manager-0.1.0-localnetworks-remove-db-call-from-del.patch
ViewVC logotype

Contents of /rpms/smeserver-manager/sme10/smeserver-manager-0.1.0-localnetworks-remove-db-call-from-del.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Sat Nov 21 08:43:46 2020 UTC (3 years, 11 months ago) by michel
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
Error occurred while calculating annotation data.
FILE REMOVED
* Fri Nov 20 2020 Michel Begue <mab974@gmail.com> 0.1.2-2.sme
- Fix smanager-update event name
- Move smanager service to /usr/lib/systemd
- Fix Bugreport file download
- Fix translations missing in 'viewlogfiles'
- Remove Admin auth in httpd configuration
- Add an optional alias for admin sign in.
- Remove systemctl from .spec file

1 diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Localnetworks.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Localnetworks.pm
2 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Localnetworks.pm 2020-03-29 11:09:58.719012315 +0100
3 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Localnetworks.pm 2020-03-25 12:18:00.000000000 +0000
4 @@ -101,6 +101,9 @@
5 if ($network_db) {
6 @localnetworks = $network_db->get_all_by_prop( type => 'network' );
7 }
8 + # Load up ln_datas with values need by template
9 + $ln_datas{subnet} = $rec->prop('Mask');
10 + $ln_datas{router} = $rec->prop('Router');
11 $c->stash( ln_datas => \%ln_datas, localnetworks => \@localnetworks ,ret =>\%ret);
12 }
13
14 @@ -110,6 +113,8 @@
15 $c->stash(localnetwork=>$localnetwork);
16 my $rec = $network_db->get($localnetwork) || die("Failed to get local network in db::$localnetwork");
17 my $subnet = $rec->prop('Mask');
18 + $ln_datas{subnet} = $subnet;
19 + $ln_datas{router} = $rec->prop('Router');
20 my $numhosts = hosts_on_network($localnetwork,$subnet);
21 $ln_datas{localnetwork} = $localnetwork;
22 $ln_datas{deletehosts} = $numhosts>0?1:0;
23 @@ -124,7 +129,7 @@
24 $c->stash( localnetworks => \@localnetworks );
25 }
26
27 - $ln_datas{'trt'} = $trt;
28 + $ln_datas{'trt'} = $trt;
29 $c->stash( title => $title, modul => $modul, ln_datas => \%ln_datas );
30 $c->render( template => 'localnetworks' );
31
32 diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_add.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_add.html.ep
33 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_add.html.ep 2020-03-29 11:10:00.301025598 +0100
34 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_add.html.ep 2020-03-26 09:47:00.000000000 +0000
35 @@ -4,25 +4,29 @@
36 % my %ret;
37 % unless (length($retref)) {%ret = (ret=>"");}
38 % else {%ret = %$retref;}
39 +
40 + % my @vars = split(",",$ret{vars});
41 + % my $var1 = @vars[0];
42 + % my $var2 = @vars[1];
43 + % my $var3 = @vars[2];
44 + % my $var4 = @vars[3];
45 + % my $var5 = @vars[4];
46 + % my $var6 = @vars[5];
47 +
48 %if ($ret{'ret'} eq "") {
49
50 %} elsif (index($ret{ret},"SUCCESS") != -1) {
51 <div class='success'>
52 <h2> Operation Status Report</h2>
53 - %= $c->l($ret{ret},$ret{vars});
54 - </div>
55 - %} else {
56 - <div class='error'>
57 - <h2> Operation Status Report</h2>
58 - %= $c->l($ret{ret},$ret{vars});
59 + %= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
60 </div>
61 + %} else {
62 + <div class='sme-error'>
63 + <h2> Operation Status Report - Error</h2>
64 + %= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
65 + </div>
66 %}
67 -
68 -
69 -
70 - <br ><br>
71 - <br ><br>
72 -
73 + <br />
74 % my $btn = l('ADD');
75 % my $network_db = esmith::NetworksDB->open();
76
77 diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_del.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_del.html.ep
78 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_del.html.ep 2020-03-29 11:10:00.301025598 +0100
79 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_del.html.ep 2020-03-25 11:56:00.000000000 +0000
80 @@ -1,19 +1,15 @@
81 <div id='ln_del'>
82
83 % my $btn = l('REMOVE');
84 - % my $localnetwork = $c->param('localnetwork');
85 - % my $network_db = esmith::NetworksDB->open();
86 - % my $record = $network_db->get($localnetwork);
87 - % my $subnet = $record->prop('Mask');
88 - % my $router = $record->prop('Router');
89 - %#my %ln_datas = $c->stash("ln_datas");
90 % my $deletehosts = $ln_datas->{deletehosts};
91 + % my $subnet = $ln_datas->{subnet};
92 + % my $router = $ln_datas->{router};
93
94 % if ($config->{debug} == 1) {
95 <p>
96 %= dumper $c->current_route
97 %= dumper $c->stash("ret")
98 - %= dumper $c->param("localnetwork");
99 + %= dumper %$ln_datas
100 %= dumper $deletehosts
101 </p>
102 % }
103 diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_list.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_list.html.ep
104 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_list.html.ep 2020-03-29 11:10:00.301025598 +0100
105 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_list.html.ep 2020-03-26 09:51:00.000000000 +0000
106 @@ -8,32 +8,42 @@
107 % unless (length($retref)) {%ret = (ret=>"");}
108 % else {%ret = %$retref;}
109
110 + % if ($config->{debug} == 1) {
111 + <p>
112 + %= dumper "Ret:".$ret{ret};
113 + </p>
114 + %}
115 +
116 + % my @vars = split(",",$ret{vars});
117 + % my $var1 = @vars[0];
118 + % my $var2 = @vars[1];
119 + % my $var3 = @vars[2];
120 + % my $var4 = @vars[3];
121 + % my $var5 = @vars[4];
122 + % my $var6 = @vars[5];
123 +
124 +
125 %if ($ret{ret} eq "") {
126 %=l "ln_FIRSTPAGE_DESC"
127 %} elsif (index($ret{ret},"SUCCESS") != -1) {
128 <div class='success'>
129 <h2> Operation Status Report</h2>
130 - % my @vars = split(",",$ret{vars});
131 - % my $var1 = @vars[0];
132 - % my $var2 = @vars[1];
133 - % my $var3 = @vars[2];
134 - % my $var4 = @vars[3];
135 - % my $var5 = @vars[4];
136 - % my $var6 = @vars[5];
137 %= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
138 </div>
139 %} else {
140 - <div class='error'>
141 - <h2> Operation Status Report</h2>
142 - %= $c->l($ret{ret},$ret{vars})
143 - </div>
144 + <div class='sme-error'>
145 + <h2> Operation Status Report - Error</h2>
146 + %= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6);
147 + </div>
148 %}
149 - <br ><br>
150 + <br><br>
151 %= submit_button "$btn", class => 'action'
152 + <br>
153 % my $numlocalnetworks = @$localnetworks;
154 % if ($numlocalnetworks == 0){
155 %=l 'ln_LOCAL_NETWORK_NONE'
156 % } else {
157 + <br>
158 <table class="sme-border"><tbody>
159 <tr>
160 <th class='sme-border'>

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed