This topic is under construction for the July 2020 release of LabKey Server.

Premium Feature — This feature is available with the Professional and Enterprise Editions of LabKey Server. It requires the addition of the moduleEditor module to your distribution. Learn more or contact LabKey.

File-based modules (i.e. modules that do not contain Java code) can be loaded and updated by an administrator using the user interface without needing to start and stop a production server. This feature makes it easier to update queries, reports, and views that can be maintained through a file based module.

Create Your Module

Create a file based module containing the resources needed. Typically you would create your module on a development machine, and build it, generating a file named [MODULE_NAME].module.

If you would like a small module to test this feature in isolation, as shown in the walkthrough on this page, download:

If you need help learning to create modules, try this tutorial:

Add Module to Server

On your LabKey Server, add your new module by name as follows. You must be a site admin or have the Platform Developer role to add modules.

  • Select (Admin) > Site > Admin Console.
  • Click the Module Information tab.
  • Click Module Details above the list of current modules.
  • Click Create New Empty Module.
  • Enter the name of your new module and click Submit.

You will now see your module listed. Notice the module type shown is "SimpleModule". At this point the module is empty.

Next, use the reloading mechanism to populate this empty module with your content.

Reload Module

To reload the module on the server, use Update Module from the module details page of the admin console. Note that you do this to populate an empty module as well as to load changed content in the future.

  • On the (Admin) > Site > Admin Console > Module Information > Module Details page, find the row for your module.
  • Click the Update Module link for the module.
  • Click Choose File or Browse, and select the .module file to load. Note that the name of the module file must be in all lower case. In our example, it is "anewmodule.module".
  • Click Submit.

Now your module can be enabled and used on your server.

Use Your Module

Without starting and stopping the server, your module is now available to be used. Navigate to the folder where you want to use the resources it contains and enable it:

  • Select (Admin) > Folder > Management.
  • Click the Folder Type tab.
  • Check the box for your module name and click Update Folder.
  • You can now use the contents.
    • If you used our "aNewModule" module, you can now add a web part of the "A New Web Part" type.

Edit Your Module

If you are able to access the filesystem of your module directly, you can make changes to the files in the "build/deploy/modules/[MODULE_NAME]" directory and see them reflected on your instance without rebuilding or reloading the module.

If you are not working on the same file system, make changes locally, regenerate the revised .module file and then use the Update Module link on the module details page to reload the new content.

Manage Loaded Module

On the Module Details page, on the right side of the row for your module, there are links to:

  • Update Module: Load new information for the module, either by way of a new archive or from the file structure.
  • Delete Module: Delete the module from the server. Note that deleting a module removes it from the server, and deletes the content in the "build/deploy/modules" subdirectory. It also may cause the webapp to reload.

Related Topics

Discussion

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand all collapse all