New UI System Maintenance Page
The New UI's system maintenance page capability is available in EnterWorks versions 10.4.3 and later.
When you perform system maintenance, if you want to prevent users from logging into EnterWorks, you can configure the New UI to display a system maintenance page instead of the typical EnterWorks login page. The system maintenance page has no log in capabilities and it states that EnterWorks is undergoing system maintenance. EnterWorks provides a standard system maintenance page, but you can replace the standard page with your own custom HTML page.
The topics covered here are:
Overview
The enable-web-server-service
handles the New UI. In order
to configure EnterWorks to display the maintenance page, you will copy the
enable-web-server-service
to create a new service
called enable-web-server-maintenance-service
that will
reference the maintenance page instead of the typical login page. You will
then stop the enable-web-server-service
and start the new
enable-web-server-maintenance-service
. Then the
following URLs will then be served by the maintenance service:
<your-protocol>://<host>/enable2020
-
<your-protocol>://<host>:<your-UI-port>
-
<your-protocol>://<host>/
Configuring the maintenance page will result in the following:
-
Users attempting to log into the New UI will be see the maintenance page and will not be able to log in.
-
Users who are already logged into the New UI will not be able to initiate any new actions using the New UI. If they refresh the screen, they will be directed to the system maintenance page.
-
If a user has initiated a process through the New UI that has not finished before the system maintenance page has been enabled, depending on the process, it may or it may not complete.
Since the Classic UI is not handled by the
enable-web-server-service
, configuring the
maintenance page will not affect the Classic UI. Users can still access
the Classic UI in the usual manner.
Configure the New UI's System Maintenance Page Capability
To configure the system maintenance page capability:
- If you are using the standard EnterWorks maintenance page, obtain the MaintenancePage.zip file and unzip it to:
The<drive>:\EWSoftware\MaintenancePage\
MaintenancePage.zip
contains:-
index.html
-
styles.css
-
the
icons
folder which contains images
-
- Or, if you are using a custom maintenance page, copy the HTML page
and any associated files
to:
<drive>:\EWSoftware\MaintenancePage\
- Copy the maintenance HTML page and any associated files to the
following folder, creating the folder if necessary:
<drive>:\Enterworks\enable2020\www\MaintenancePage\
- Go to the
folder:
<drive>:\Enterworks\enable2020\services\install\
- Copy:
to a new file named:create-enable-web-server-service.cmd
create-enable-web-server-maintenance-service.cmd
- Edit the
create-enable-web-server-maintenance-service.cmd
script as described below. Theenable-web-server-maintenance-service
uses the same executable as theenable-web-server-service
. To see a full listing of all the service's parameters, run the following in a command line:create-enable-web-server-service.cmd -h
- Change the service name to be
enable-web-server-maintenance-service
by changing the name as shown in the following settings. (Make sure to replace<drive>
with your actual drive.)NET STOP enable-web-server-maintenance-service sc delete enable-web-server-maintenance-service sc create enable-web-server-maintenance-service binpath=^"<drive>:\Enterworks\enable2020\services\bin\enable2020-web-server-service.exe ^
Note: Do not change the name of the service executable in the
binpath
setting. The newenable2020-web-server-maintenance-service
uses the same executable as the originalenable2020-web-server-service
:enable2020-web-server-service.exe
- The following settings determine if the maintenance page is
enabled or disabled. Set the following flag. If it doesn't exist in the file, add it:
Setting Default value -maintenanceMode
false
-maintenancePath
<drive>:\Enterworks\enable\2020\www\MaintenancePage
-maintenanceHtmlFile
index.html
-maintenanceMode=true ^
- In a previous step of the instructions, you were instructed
to copy the HTML files to the folder that is the default value
for the setting
-maintenancePath
. Since this value will always only ever be the default value, you do not need to set this setting. - Set the
-maintenanceHtmlFile
setting to the name of your HTML file, including the extension, as shown below. If this setting is not already in the file, add it. The name of the standard EnterWorks system maintenance page isindex.html
, which is the default value of this flag. Technically, you do not need to set this setting if your file is namedindex.html
, however to make future maintenance easier, it is strongly suggested that you include this setting.-maintenanceHtmlFile=<name-of-your-html-page-file> ^
- Here is an example of how these settings might look in your
create-enable-web-server-maintenance-service.cmd
file. Note that the other settings in your file may look different than the example.NET STOP enable-web-server-maintenance-service sc delete enable-web-server-maintenance-service sc create enable-web-server-maintenance-service binpath=^"D:\Enterworks\enable2020\services\bin\enable2020-web-server-service.exe ^ -rabbitServer=enable2020:enable2020@<put-your-hostname-here> ^ -epimHost=<put-your-hostname-here>:8090 ^ -port=80 ^ -cliBuildFolder=D:\Enterworks\enable2020\enable2020 ^ -uploadFolder=D:\Enterworks\enable2020\services\uploads ^ -epxHost=<put-your-hostname-here> ^ -sessionDbFile=D:\Enterworks\enable2020\sessions\enable2020-session.db ^ -loggingLevel=INFO ^ -logDir=D:\Enterworks\logs\enable2020 ^ -exchange=enable2020 ^ -esBrokerQueue=elasticSearchBroker ^ -webcmBrokerQueue=webcmBrokered ^ -enableDamQueue=enableDam ^ -enableApiQueue=enableApi ^ -channelReadinessQueue=enableChannelReadiness ^ -epxBrokerQueue=epxBrokerQueue ^ -disableAdmin=false ^ -disableReport=false ^ -disableSystem=false ^ -customProxies=/language;https://translation.googleapis.com ^ -customPaths=/custom;D:/Enterworks/enable2020/custom ^ -maintenanceMode=true ^ -maintenanceHtmlFile=your-custom-index.htm" pause
- Change the service name to be
- Save and exit the
create-web-server-maintenance-service.cmd
file. - Create the service by using the
create-enable-web-server-maintenance-service.cmd
script.
The maintenance page capability is now configured. In order for the maintenance page to appear, you must enable the maintenance page.
Enable the New UI's System Maintenance Page
In order to enable the New UI's system maintenance page, you must have
created the enable-web-server-maintenance-service
, (see
Configure the New UI's System Maintenance Page
Capability).
To enable the New UI's maintenance page:
- Stop the
enable-web-server-service
. - Start the
enable-web-server-maintenance-service
. - Check that the
enable-web-server-maintenance-service
service is running correctly by going to your New UI's URLs and verifying that the system maintenance page is appearing.-
<your-protocol>://<host>/enable2020
-
<your-protocol>://<host>:<your-UI-port>
-
<your-protocol>://<host>/
http://<host>:80
-
The system maintenance page is now enabled.
Disable the New UI's System Maintenance Page
To disable the New UI's maintenance page:
- Stop the
enable-web-server-maintenance-service
. - Start the
enable-web-server-service
. - Check that the
enable-web-server-service
service is running correctly by going to your New UI's URLs and verifying that the typical EnterWorks login page is appearing.-
<your-protocol>://<host>/enable2020
-
<your-protocol>://<host>:<your-UI-port>
-
<your-protocol>://<host>/
http://<host>:80
-
The system maintenance page is now disabled.