1 |
brianr |
1.1 |
diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Legacypanel.pm smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Legacypanel.pm |
2 |
|
|
--- smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Legacypanel.pm 1970-01-01 01:00:00.000000000 +0100 |
3 |
|
|
+++ smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Legacypanel.pm 2024-02-28 15:05:00.000000000 +0000 |
4 |
|
|
@@ -0,0 +1,41 @@ |
5 |
|
|
+package SrvMngr::Controller::Legacypanel; |
6 |
|
|
+ |
7 |
|
|
+#---------------------------------------------------------------------- |
8 |
|
|
+# name : legacypanel, method : get, url : /legacypanel, ctlact : Legacypanel#main |
9 |
|
|
+# |
10 |
|
|
+# routes : end |
11 |
|
|
+#---------------------------------------------------------------------- |
12 |
|
|
+ |
13 |
|
|
+use strict; |
14 |
|
|
+use warnings; |
15 |
|
|
+ |
16 |
|
|
+use Mojo::Base 'Mojolicious::Controller'; |
17 |
|
|
+ |
18 |
|
|
+use Locale::gettext; |
19 |
|
|
+use SrvMngr::I18N; |
20 |
|
|
+use SrvMngr qw(theme_list init_session); |
21 |
|
|
+ |
22 |
|
|
+#use SrvMngr::Model::Main; |
23 |
|
|
+ |
24 |
|
|
+ |
25 |
|
|
+sub main { |
26 |
|
|
+ |
27 |
|
|
+ my $c = shift; |
28 |
|
|
+ $c->app->log->info($c->log_req); |
29 |
|
|
+ |
30 |
|
|
+ my $title = $c->l('legacy panel'); |
31 |
|
|
+ my $legacy_url = $c->param('url'); |
32 |
|
|
+ my $legacy_height = $c->param('height') | 600; |
33 |
|
|
+ $c->stash( title => $title, modul => $legacy_url, height => $legacy_height ); |
34 |
|
|
+ $c->render(template => 'embedded'); |
35 |
|
|
+ |
36 |
|
|
+} |
37 |
|
|
+ |
38 |
|
|
+sub getlegacyurl { |
39 |
|
|
+ my $c = shift; |
40 |
|
|
+ my $url = shift; |
41 |
|
|
+ return "/smanager/legacypanel?url=$url"; |
42 |
|
|
+} |
43 |
|
|
+ |
44 |
|
|
+ |
45 |
|
|
+1; |
46 |
|
|
diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Userpanelaccess.pm smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Userpanelaccess.pm |
47 |
|
|
--- smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Userpanelaccess.pm 1970-01-01 01:00:00.000000000 +0100 |
48 |
|
|
+++ smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Userpanelaccess.pm 2024-02-28 08:59:00.000000000 +0000 |
49 |
|
|
@@ -0,0 +1,38 @@ |
50 |
|
|
+package SrvMngr::Controller::Userpanelaccess; |
51 |
|
|
+ |
52 |
|
|
+#---------------------------------------------------------------------- |
53 |
|
|
+# heading : User management |
54 |
|
|
+# description : User Panel Access |
55 |
|
|
+# navigation : 2000 150 |
56 |
|
|
+# menu : |
57 |
|
|
+#---------------------------------------------------------------------- |
58 |
|
|
+# name : userpanelaccess, method : get, url : /userpanelaccess, ctlact : Userpanelaccess#main |
59 |
|
|
+# |
60 |
|
|
+# routes : end |
61 |
|
|
+#---------------------------------------------------------------------- |
62 |
|
|
+ |
63 |
|
|
+use strict; |
64 |
|
|
+use warnings; |
65 |
|
|
+ |
66 |
|
|
+use Mojo::Base 'Mojolicious::Controller'; |
67 |
|
|
+ |
68 |
|
|
+use Locale::gettext; |
69 |
|
|
+use SrvMngr::I18N; |
70 |
|
|
+use SrvMngr qw(theme_list init_session); |
71 |
|
|
+ |
72 |
|
|
+#use SrvMngr::Model::Main; |
73 |
|
|
+ |
74 |
|
|
+ |
75 |
|
|
+sub main { |
76 |
|
|
+ |
77 |
|
|
+ my $c = shift; |
78 |
|
|
+ $c->app->log->info($c->log_req); |
79 |
|
|
+ |
80 |
|
|
+ my $title = $c->l('User panel access'); |
81 |
|
|
+ $c->stash( title => $title, modul => 'https://mailserver.bjsystems.co.uk/server-manager/cgi-bin/userpanelaccess', height => 600 ); |
82 |
|
|
+ $c->render(template => 'embedded'); |
83 |
|
|
+ |
84 |
|
|
+} |
85 |
|
|
+ |
86 |
|
|
+ |
87 |
|
|
+1; |
88 |
|
|
diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr.pm smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr.pm |
89 |
|
|
--- smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr.pm 2024-02-28 13:42:46.931260616 +0000 |
90 |
|
|
+++ smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr.pm 2024-02-28 11:38:00.000000000 +0000 |
91 |
|
|
@@ -609,7 +609,9 @@ |
92 |
|
|
|
93 |
|
|
foreach my $file (keys %files_hash) |
94 |
|
|
{ |
95 |
|
|
- my $heading = 'Unknown'; |
96 |
|
|
+ #my $heading = 'Unknown'; |
97 |
|
|
+ my $heading = 'Legacy'; |
98 |
|
|
+ |
99 |
|
|
my $description = $file; |
100 |
|
|
my $headingWeight = 99999; |
101 |
|
|
my $descriptionWeight = 99999; |
102 |
|
|
diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/embedded.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/embedded.html.ep |
103 |
|
|
--- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/embedded.html.ep 1970-01-01 01:00:00.000000000 +0100 |
104 |
|
|
+++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/embedded.html.ep 2024-02-28 17:00:00.000000000 +0000 |
105 |
|
|
@@ -0,0 +1,23 @@ |
106 |
|
|
+% layout 'default', title => "Sme server 2 - embedded"; |
107 |
|
|
+ |
108 |
|
|
+% content_for 'module' => begin |
109 |
|
|
+ |
110 |
|
|
+<div id='module' class='module module-panel'> |
111 |
|
|
+ % if ($config->{debug} == 1) { |
112 |
|
|
+ <p> |
113 |
|
|
+ %= dumper $c->current_route |
114 |
|
|
+ </p> |
115 |
|
|
+ % } |
116 |
|
|
+ % if ( stash 'error' ) { |
117 |
|
|
+ <br><div class=sme-error> |
118 |
|
|
+ %= $c->render_to_string(inline => stash 'error') |
119 |
|
|
+ </div> |
120 |
|
|
+ %} |
121 |
|
|
+ <h1> Embedded - <%=$title %></h1><br> |
122 |
|
|
+ <p>If the legacy panel does not appear, then you may not be logged into the original Server manager.<br />You can log in by clicking <a href="/server-manager" target='_blank'>here</a>. Or by clicking on the "Legacy SM" button at the top of the window.</p> |
123 |
|
|
+ % my $height = $c->stash('height') | '600px'; |
124 |
|
|
+ % if ($height !~ /px$/) { $height = $height.'px';} |
125 |
|
|
+ <object id="legacy-embedded" class="legacy-embedded" data="<%=$c->stash('modul') %>" style="width:99%;height:<%= $height %>;" title="<%= $c->stash('title') %>" type="text/html" ><%= $c->stash('title') %> not found</object> |
126 |
|
|
+</div> |
127 |
|
|
+ |
128 |
|
|
+%end |
129 |
|
|
diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep |
130 |
|
|
--- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep 2024-02-28 13:42:46.998262549 +0000 |
131 |
|
|
+++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep 2024-02-28 15:51:00.000000000 +0000 |
132 |
|
|
@@ -31,22 +31,6 @@ |
133 |
|
|
%= stylesheet '/js/buttons.print.min.js' |
134 |
|
|
|
135 |
|
|
%= stylesheet '/css/sme-jquery-overrides.css' |
136 |
|
|
- |
137 |
|
|
- |
138 |
|
|
- <!--><script src="https://cdn.datatables.net/buttons/2.4.2/js/dataTables.buttons.min.js"></script> |
139 |
|
|
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script> |
140 |
|
|
- <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script> |
141 |
|
|
- <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script> |
142 |
|
|
- <script src="https://cdn.datatables.net/buttons/2.4.2/js/buttons.html5.min.js"></script> |
143 |
|
|
- <script src="https://cdn.datatables.net/buttons/2.4.2/js/buttons.print.min.js"></script> |
144 |
|
|
- --> |
145 |
|
|
- |
146 |
|
|
- |
147 |
|
|
- <!-- ><link href="https://cdn.datatables.net/v/dt/dt-1.13.8/datatables.min.css" rel="stylesheet"> |
148 |
|
|
- <script src="https://cdn.datatables.net/v/dt/dt-1.13.8/datatables.min.js"></script> |
149 |
|
|
- <link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css"> |
150 |
|
|
- <script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>--> |
151 |
|
|
- |
152 |
|
|
|
153 |
|
|
</head> |
154 |
|
|
|
155 |
|
|
diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_header.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_header.html.ep |
156 |
|
|
--- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_header.html.ep 2024-02-28 13:42:46.912260068 +0000 |
157 |
|
|
+++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_header.html.ep 2024-02-28 16:51:00.000000000 +0000 |
158 |
|
|
@@ -3,9 +3,9 @@ |
159 |
|
|
<div id="h2e11"> |
160 |
|
|
<a target='_blank' href="http://www.koozali.org"><img src="images/smeserver_logo.jpg" height="40" alt="SME Server"></a> |
161 |
|
|
</div> |
162 |
|
|
- <div id="h2e12"><h5><a href="initial">Server Manager</a> |
163 |
|
|
- <a href="/server-manager" target='_blank'>    (Prev SM)</a></h5> |
164 |
|
|
- </div> |
165 |
|
|
+<!-- <div id="h2e12"><h5><a href="initial">Server Manager</a> |
166 |
|
|
+ <a href="/server-manager" target='_blank'>    (Prev SM)</a></h5> --> |
167 |
|
|
+ <div id="h2e12" style="float:right;"><br><a href="/server-manager" target='_blank'><button style="background-color:#98d36e;font-weight:bold;color:#063;">Legacy SM</button></a></div> |
168 |
|
|
</div> |
169 |
|
|
|
170 |
|
|
<div id="h2l2" class="infobar"> |
171 |
|
|
diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_navig2.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_navig2.html.ep |
172 |
|
|
--- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_navig2.html.ep 2024-02-28 13:42:46.998262549 +0000 |
173 |
|
|
+++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_navig2.html.ep 2024-02-28 14:57:00.000000000 +0000 |
174 |
|
|
@@ -21,7 +21,11 @@ |
175 |
|
|
% $href = '/smanager/' . $file2; |
176 |
|
|
% } else { |
177 |
|
|
% $target = 'main'; |
178 |
|
|
-% $href = '/server-manager' . $_->{'FILENAME'}; |
179 |
|
|
+%# $href = '/server-manager' . $_->{'FILENAME'}; |
180 |
|
|
+%# $href = $c->getlegacyurl($c,'/server-manager' . $_->{'FILENAME'}); |
181 |
|
|
+% my $host = $c->req->url->to_abs->host; |
182 |
|
|
+% $href = "/smanager/legacypanel?url=https://$host/server-manager" . $_->{'FILENAME'}; |
183 |
|
|
+% |
184 |
|
|
% } |
185 |
|
|
<div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>' |
186 |
|
|
id='sme<%= $cc %>' href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div> |