Server Manager 2 Howto incorporate a legacy contrib

From SME Server
Jump to navigationJump to search

Introduction

There are 3 possibilities for incorporating an existing (legacy) contrib into Server manager 2:

  1. Re-code the contrib into the Mojolicious environment in which SM2 is written. This is documented here.
  2. Code up a "dummy" perl panel using mojolicious (see example below) which is inserted uatomatically into the menu and calls the "embedded.html.ep" template file.
  3. Just import the current contrib and access it through the "Legacy" category on the menu.

This page explains (2) and (3) in a bit more detail.

Code up a dummy page which calls the legacy panel

If you want to be able to control the position and category in the menu for the legacy contrib then you'll need to create a perl program in: the directory:

/usr/share/smanager/SrvMngr/Controller


Here is an example for the smeserver-userpanel contrib:

package SrvMngr::Controller::Userpanelaccess;

#----------------------------------------------------------------------
# heading     : User management
# description : User Panel Access
# navigation  : 2000 150
# menu        : 
#----------------------------------------------------------------------
# name   : userpanelaccess,    method : get,   url : /userpanelaccess,     ctlact : Userpanelaccess#main
#
# routes : end
#----------------------------------------------------------------------

use strict;
use warnings;

use Mojo::Base 'Mojolicious::Controller';

use Locale::gettext;
use SrvMngr::I18N;
use SrvMngr qw(theme_list init_session);

#use SrvMngr::Model::Main;


sub main {

    my $c = shift;
    $c->app->log->info($c->log_req);

    my $title = $c->l('User panel access');
    $c->stash( title => $title, modul => 'https://mailserver.bjsystems.co.uk/server-manager/cgi-bin/userpanelaccess', height => 600 );
    $c->render(template => 'embedded');

}
1;

This file will need to be here:

/usr/share/smanager/SrvMngr/Controller/Userpanelaccess.pm
Screenshot from 2024-02-29 12-25-32.png

Note the menu entries at the top, and the route specification (the capitalisation and case matching is important here)

Also note the full URL for the SM1 (legacy) contrib, and also the window length (it defaults to 600px if you do not specify).

This all that is necessary to customise the menu entry for a legacy contrib.


Just install the contribs rpm and call it from the "Legacy" category

Screenshot from 2024-02-29 12-25-15.png

Server manager 2 will scan for installed contribs, and any that are not fully compatible with Mojolicious will just load the menu entry, using the package name as a link, under the "Legacy" category, normally at the bottom of the menu stack.



The need to login into Server Manager 1

If the legacy contrib does not show after clicking on the menu entry (either for mode (2) or (3) above), then it is probably that you are not logged into SM1. This can be achieved using the button in the top border of SM2 titled "Legacy SM". You can almost certainly use the same credentials that you used to go into SM2. Unfortunately the two programs use different login mechanisms.

Bugs

Please raise bugs under the SME-Server section in bugzilla

and select the component or use this link


Below is an overview of the current issues for this package:

IDProductVersionStatusSummary (189 tasks)
13378SME Server 11.X11.rc1CONFIRMEDSoftware Install panel still shows update as needed for a period after the update is run
13377SME Server 11.X11.rc1CONFIRMEDErrors in system log relating to lex files for dk, ja and il
13374SME Server 11.X11.rc1RESOLVED"Locale lexicon missing for" shown in logs for some JS and util routes.
13373SME Server 11.X11.rc1VERIFIEDSoftware Install panel "Use of uninitialized value in concatenation"
13370SME Server 11.X11.rc1RESOLVEDdnf plugin temp event does not include restart of smanager.
13368SME Server 11.X11.rc1CONFIRMEDJapanese lex file missing menu entries
13366SME Server 11.X11.rc1RESOLVED"Legacy" and "Current User" section headings are not localised.
13361SME Server 11.X11.rc1RESOLVEDSome (new?) menu entries do not have translations in the lex files.
13330SME Server 11.X11.rc1RESOLVEDEmail setting panel - delivery will clear the password in the DB if the delegate server password is blank when save is clicked
13328SME Server 11.X11.rc1CONFIRMEDviewlogfiles tries to display VERY long files and hangs -> proxy error
13319SME Server 11.X11.rc1RESOLVEDLetsencrypt panel shows CSP failure
13317SME Server 11.X11.rc1RESOLVEDJavascript failures on console log for status panel
13316SME Server 11.X11.rc1RESOLVEDMany of the lex files for the initial panel have SM1 link to image
13314SME Server 11.X11.rc1CONFIRMEDIf there is no lex file for a specific language and that language is the browser choice, then the menu is also displayed in english.
13313SME Server 11.X11.rc1RESOLVEDswt_THEME is missing from lex files for danish and probably from most other non en files
13304SME Server 11.X11.rc1RESOLVEDLocale flag not always shown successfully on the top panel
13303SME Server 11.X11.rc1CONFIRMEDUnder firefox a legacy panel click which results in a login request is shown new browser tab, instead of re-using the original.
13283SME Server 11.X11.rc1RESOLVEDRemove "yum" and Replace by "dnf" in al lex files
13266SME Server 11.X11.rc1CONFIRMEDNeed individual group membership panel for SM2 in User mode
13265SME Server 11.X11.rc1CONFIRMEDNeed individual backup panel for SM2 in User mode.
13253SME Server 11.X11.rc1RESOLVEDUpdate jquery datatable to version 2.3.4
13247SME Server 11.X11.rc1VERIFIEDLogout button looks strange
13246SME Server 11.X11.rc1CONFIRMEDSmanager debug mode
13243SME Server 11.X11.rc1RESOLVEDdebugging portforwarding template error
13238SME Server 11.X11.rc1VERIFIEDMenu section headings should not be links
13210SME Server 11.X11.rc1CONFIRMEDAdd password strength indication to password reset/set panel
13207SME Server 11.X11.beta1RESOLVEDHostnames and addresses panel must blank MAC address and IP address(es) when Host type set to "Self"
13185SME Server 11.X11.beta1RESOLVEDAdd CSS to position multiple submit buttons on panel
13184SME Server 11.X11.beta1RESOLVEDChange how the "Please Wait" is displayed on Submit pressed.
13176SME Server 11.X11.beta1RESOLVEDunsafe inline in login page
13175SME Server 11.X11.beta1RESOLVEDtkt login page redirected as 307 and proto http
13130SME Server 11.X11.beta1RESOLVEDpppoe fails to recconect after update: interface or tty missing
13113SME Server 11.X11.beta1RESOLVEDSM2 login and logout buttons do not work on text based browser
13112SME Server 11.X11.beta1RESOLVEDreconfigure state is displayed without being logged in
13110SME Server 11.X11.beta1RESOLVEDServer Manager Software Updates runs updates, then still tells that there are updates
13106SME Server 11.X11.beta1RESOLVEDSoftware Update panel: Arrange for result of the dnf run to be streamed to panel
13105SME Server 11.X11.beta1RESOLVEDnew server manager LTE - window for port number in network menu is not large enough for 5 wide digits
13103SME Server 11.X11.beta1RESOLVEDRe-Format Template files for default theme to make them more readable.
13101SME Server 11.X11.beta1CONFIRMEDAfter running a Backup to Desktop and saving the backup, button stays at Please wait and cursor stays spinning
13100SME Server 11.X11.beta1CONFIRMEDSummary of potential sizes on Backup screen is well wrong
13099SME Server 11.X11.rc1RESOLVEDMissing argument in sprintf Viewlogfiles.pm line 213
13097SME Server 11.X11.beta1VERIFIEDRestart or shutdown function fails with theme AdminLTE
13095SME Server 11.X11.beta1VERIFIEDUpdate from AdminLTE theme fail with blank page
13090SME Server 11.X11.beta1VERIFIEDAdd text to explain rules for password (which have changed for SME11)
13086SME Server 11.X11.beta1UNCONFIRMEDHostnames and addresses broken in Beta1
13082SME Server 11.X11.alpha1VERIFIEDLogin to SM2 with non admin, shows all menu entries but does not let you obey them
13080SME Server 11.X11.alpha1RESOLVEDEmail Settings panel: Some Lex strings without prefix and with very long id
13078SME Server 11.X11.alpha1RESOLVEDTypos in Error Message (lex) Ids in Datetime, UserAccounts, groups and Userpassword panels
13076SME Server 11.X11.alpha1RESOLVEDNutUPS menu item, no UPS attached, change Nut Status to enabled and save, Proxy error
13073SME Server 11.X11.alpha1RESOLVEDGroup panel: Error message in logs on entry
13068SME Server 11.X11.alpha1RESOLVEDUser Accounts panel: Align the group membership table to the right under the others
13064SME Server 11.X11.alpha1RESOLVEDBusy Cursor no longer shows on Submit for all SM2 panels
13062SME Server 11.X11.alpha1RESOLVEDAdd code in top level theme template to pull in panel specific css and js files.
13061SME Server 11.X11.alpha1RESOLVEDUpgrading smeserver-manager package after install does not always update Lex -> <lang>.pm files
13060SME Server 11.X11.alpha1CONFIRMEDRemoteAccess and Proxy Settings panels needs refactoring for Success and Error notification
13058SME Server 11.X11.alpha1CONFIRMEDRe-factor Samba Workgroup panel to return to main screen with success or error messge
13057SME Server 11.X11.alpha1VERIFIEDExtra white line under theme selector in the default theme
13056SME Server 11.X11.alpha1RESOLVEDUserAccounts panel - Setting Admin email to "forward" allows email to be blank
13047SME Server 11.X11.alpha1CONFIRMEDUnable to use SM2 after a backup restore or setting datetime manual
13044SME Server 11.X11.alpha1VERIFIED<local network panel> Adding one that already exists gives error message with vars!
13043SME Server 11.X11.alpha1RESOLVEDPort forwarding panel - error when sucess results blank
13041SME Server 11.X11.alpha1RESOLVEDUse of uninitialized value $ret{"vars"} in split at template partials/_ln_list.html.ep lin
13040SME Server 11.X11.alpha1CONFIRMEDMissing return button on some panels
13039SME Server 11.X11.alpha1RESOLVEDServer-manager Update flag-by-locale.js
13036SME Server 11.X11.alpha1RESOLVEDneed to convert DB call to DB::UTF8
13035SME Server 11.X11.alpha1RESOLVEDneed to convert DB call to DB::UTF8
13031SME Server 11.X11.alpha1RESOLVEDAdd sub getYear_list to datetime.pm
13027SME Server 11.X11.alpha1RESOLVEDsmanager open and write in db files as iso-8859
13026SME Server 11.X11.alpha1RESOLVEDDirectory ldap page has cache issue
12997SME Server 11.X11.alpha1VERIFIEDwebmail should not show on main menu or in user accounts browse if webmail not enabled
12996SME Server 11.X11.alpha1RESOLVEDReview and modify the categories/headings and position of admin menu entries.
12995SME Server 11.X11.alpha1CONFIRMEDTool tip shows "Account Locked" when it is not (see image)
12991SME Server 11.X11.alpha1VERIFIEDAdd a message on the Reset Password form giving the current rules (according to the DB entry PasswordStrength)
12989SME Server 11.X11.alpha1CONFIRMEDWorkstation Restore when reboot is selected when offered SM2 errros to a Proxy Error screen and fails to reboot
12988SME Server 11.X11.alpha1RESOLVEDUnder smanager Remote Access Secure shell access value does not match config show sshd value
12985SME Server 11.X11.alpha1VERIFIEDSM2 adding port forwarding rule fails
12974SME Server 11.X11.alpha1VERIFIEDclamav config panel takes a long time even if "Never" and "Disabled" are set
12971SME Server 11.X11.alpha1CONFIRMEDRemote Access panel does not work the same way as other panels
12970SME Server 11.X11.alpha1VERIFIEDDB Cacheing problem in Port forwarding panel
12969SME Server 11.X11.alpha1CONFIRMEDError message in Local Networks panel is inconsistent with the rest of SM2
12967SME Server 11.X11.alpha1RESOLVEDRationalise the css
12953SME Server 11.X11.alpha1VERIFIEDAdd systemd-analyze plot >boot.svg to Report a bug panel
12951SME Server 11.X11.alpha1RESOLVEDMail log analysis panel needs re-write for Postfix.
12950SME Server 11.X11.alpha1CONFIRMEDMaster entry - Need audit of all panels and languages and the coverage between them
12949SME Server 11.X11.alpha1RESOLVEDPanel for SM2 for Nut UPS package.
12947SME Server 11.X11.alpha1CONFIRMEDDesktop Backup does not allow anything after until screen is refreshed.
12946SME Server 11.X11.alpha1RESOLVED"Argument "" isn't numeric" Error message on every refresh of SM2 screen
12943SME Server 11.X11.alpha1RESOLVEDWarning message about order of parameters to tar on desktop backup
12934SME Server 11.X11.alpha1RESOLVEDServer -Error on Backup to desktop
12933SME Server 11.X11.alpha1RESOLVEDWorkstation Backup/restore settings not returning changes after resetting
12932SME Server 11.X11.alpha1RESOLVEDLetsencrypt certificate 'check one domain' gives 'server error'
12927SME Server 11.X11.alpha1CONFIRMEDRemote Access access setting ftp to Public Access entire interne fails
12924SME Server 11.X11.alpha1CONFIRMEDNFR: allow smanager setting for ftp Anonymous access
12923SME Server 11.X11.alpha1RESOLVEDstatus select field can not be set to current value
12910SME Server 11.X11.alpha1RESOLVEDWebmail / Roundcube access from user panel and menu does not work if local DNS not used.
12908SME Server 11.X11.alpha1VERIFIEDsm2 v50 - Variable "$config" is not imported at template webhosting.html.ep line 6.
12907SME Server 11.X11.alpha1RESOLVEDSM2 V50 - Server-Error on Review Configuration
12905SME Server 11.X11.alpha1RESOLVEDMake SM2 db opening specific to the route, rather than opening only once
12903SME Server 11.X11.alpha1CONFIRMEDThe jDatatable tables do not reflect the current locale in terms of language etc. Only show English
12901SME Server 11.X11.alpha1RESOLVEDLocale not consistently applied
Warnings were generated during the execution of function
  1. Report truncated - count greater than max allowed 101 > 100


Changelog

Only released version in smeserver are listed here.