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 (67 tasks)
12608SME Server 11.XunspecifiedCONFIRMEDAH01215: CGI::param called in list context can lead to vulnerabilities
12498SME Server 10.X10.1RESOLVEDRegression - menu restore does not work
12491SME Server 11.XunspecifiedCONFIRMEDMail Log analysis - qmail-q based options need to run as root or qmail
12488SME Server 10.X10.1RESOLVEDLegacy contribs (ones not converted to SM2 / mojo code) are left in the menu at the end and appear in a new browser window / tab
12485SME Server 11.XunspecifiedCONFIRMEDRun the server manager perl files through the prettifier.
12484SME Server 11.XunspecifiedCONFIRMEDMake sure that the categories/sections in the menu are in the same order.
12483SME Server 10.X10.1RESOLVEDhos_ERROR_CREATING_HOST on adding new hostname
12482SME Server 11.XunspecifiedCONFIRMEDMake login by ordinary user show correct menu
12480SME Server 10.X10.1RESOLVEDNFR: Suppress the version number in the footer unless user logged in.
12479SME Server 10.X10.1RESOLVEDClick on "add domain" and it goes to corporate DNS Settings.
12478SME Server 10.X10.1RESOLVEDAfter creating I-bay it was not visible in the ibay list.
12476SME Server 10.X10.1RESOLVEDRe-organise menu as per discussions on Rocket
12472SME Server 10.X10.1UNCONFIRMEDSM2 XTGeoipRev=enabled != displays as ==
12471SME Server 10.X10.1UNCONFIRMEDSM2 email-filtering spam settings display or change incorrectly
12467SME Server 10.X10.1RESOLVEDIcon not shown when second page selected on dataTable table
12466SME Server 10.X10.1RESOLVEDAdd export buttons to tables in SM2 default theme.
12465SME Server 10.X10.1RESOLVEDUpdate smeserver-manager-jsquery to fix left alignment of tables
12464SME Server 10.X10.1RESOLVEDServer Manager 2 needs to save and restore menu organisation
12459SME Server 10.X10.0RESOLVEDCreate rpm - smeserver-manager-jquery
12458SME Server 10.X10.1RESOLVEDUpdate SM2 to use jquery plugin dataTable for tables
12457SME Server 10.X10.1RESOLVEDExperiment with making tables sortable and filterable and paged - using jquery.
12446SME Server 11.XunspecifiedCONFIRMEDInitial screen - immediately after install - fails to show translated message
12444SME Server 11.XunspecifiedCONFIRMEDProxy Error following software update
12442SME Server 10.X10.1RESOLVEDDefault theme for SM2 submit button does not reflect hover or click
12428SME Server 10.X10.1RESOLVEDSM2 Login button does not highlight when you press it. - default Theme
12392SME Server 10.X10.1VERIFIEDDomains panel does not show borders around table of domains
12387SME Server 11.XunspecifiedCONFIRMEDServer Manager 2 should open unconverted contribs/panels in the current page, possibly within an iframe
12294SME Server 10.X10.1VERIFIEDCorrect Requires in systemd service file
12245SME Server 11.XunspecifiedCONFIRMEDMenu formatting with Server Manager 2 and AdminLTE
12209SME Server 10.X10.0VERIFIEDOnly show Reconfigure button and message after an update if UnsavedChanges='yes'
12112SME Server 10.X10.0VERIFIEDupdate to httpd 2.4 syntax (SM2)
11989SME Server 10.X10.0RESOLVEDRollup changes including AdminLTE 3.1
11906SME Server 10.X10.0RESOLVEDSort out spacing in menu when small fonts selected
11881SME Server 10.X10.0RESOLVEDBrowser Error in js for AdminLTE version extraction
11880SME Server 10.X10.0RESOLVEDBrowser error on non login pages (smeserver-manager-AdminLTE)
11863SME Server 10.X10.0RESOLVEDUpdate css and checkbox for dark mode
11861SME Server 10.X10.0VERIFIEDUpdate to AdminLTE 3.2
11846SME Server 10.X10.0RESOLVEDWarning from Browser when jquery loaded - unable to find .map file
11833SME Server 10.X10.0RESOLVEDMore formatting
11830SME Server 10.X10.0RESOLVEDUpdate Datetime and reboot ep files to help AdminLTE
11827SME Server 10.X10.0VERIFIEDFix format of datetime panel
11826SME Server 10.X10.0RESOLVEDMore format changes to make it compatible
11825SME Server 10.X10.0RESOLVEDReview configuration panel - In Server-Gateway, External IP and DHCP range not properly displayed
11824SME Server 10.X10.0RESOLVEDUser and Hostnames list does not act responsivly as window is made smaller
11823SME Server 10.X10.0RESOLVEDIn Review Configuration - IP address not show correctly for Server Gateway
11822SME Server 10.X10.0RESOLVEDIn Review Configuration virtual domains not aligned.
11821SME Server 10.X10.0RESOLVEDMail log file analysis shows blank
11817SME Server 11.XunspecifiedCONFIRMEDGet Breadcrumb trail working
11816SME Server 10.X10.0VERIFIEDAdd Forgotten Password link to login panel
11815SME Server 10.X10.0RESOLVEDBring Group add and update panels into line with others
11810SME Server 11.XunspecifiedCONFIRMEDLicense panel is left truncated, does not flow.
11809SME Server 11.XunspecifiedCONFIRMEDLack of a space after full stop and comma in English version of Server Manager2 panel descriptions in some places.
11793SME Server 10.X10.1RESOLVEDFor smeserver-manager - add module class to div id="module"
11785SME Server 10.X10.0RESOLVEDSort out alignment of descriptions and inputs on panels, and make work for mobile screens
11783SME Server 10.X10.0RESOLVEDBring update event into line with smanager update event
11782SME Server 10.X10.0RESOLVEDFix up Configuration Review panel
11781SME Server 10.X10.0RESOLVEDUpdate login screen and add password visibility
11780SME Server 10.X10.0RESOLVEDAdd in dummy classes to div in each ep file for future themes
11708SME Server 10.X10.0RESOLVEDCSRF security check should fully protect smeserver-manager
11623SME Server 10.X10.0rc1RESOLVEDUpdate default.ep.html to new contribs-header and remove heading from status line
11572SME Server 10.X10.0rc1RESOLVEDUpdate to AdminLTE 3.1
11571SME Server 10.X10.0rc1RESOLVEDTheme switch no longer works.
11478SME Server 11.XunspecifiedCONFIRMEDConfiguration report (under Server Manager/Report a bug) Includes some parts of the standard install
11185SME Server 10.X10.0a5RESOLVEDNew version for smeserver-manager
10926SME Server 10.X10.0a4VERIFIEDCSRF time-out during yum update in server-manager
7463SME Server 11.XunspecifiedCONFIRMEDHeadingWeight Wrong in Server Panel navigation scripts
5382SME Server 11.XunspecifiedCONFIRMEDHostnames/addresses panel doesn't reject same IP with different mac


Changelog

Only released version in smeserver are listed here.