Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-2138

Add option to module groups to force module limits

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.0-b1
    • Component/s: Modules
    • Labels:
      None

      Description

      An option needs to be added to the core for the add/edit module group pages that are generated for modules.

      A checkbox should appear under the Add Order option for module groups called "Force *** Limits" where *** is the module row noun (e.g. "Server" from Module::moduleRowName)

      This checkbox is to be used by modules at their sole discretion to determine whether to treat any limits as hard limits or soft limits. A hard limit cannot be exceeded at all, while a soft limit can be exceeded if there is no other choice.

      Consider the cPanel module and it's "First non-full server" Add Order. The module will attempt to add the account to a server with free space according to its account limit setting, but if all servers are full, it will choose one of the servers to add the account onto, thus exceeding it's own account limit. This is the soft limit.

      A hard limit would fail to add the account altogether if all servers in the group have reached their account limits, as no module will be retrieved to add it to via Module::selectModuleRow and an error will be returned during creation.

      Limits only apply when the package uses a specific module row group, rather than choosing a specific module row.

      Update the table:
      `module_groups`, add column `force_limits` tinyint(1) unsigned, (0 or 1)

      Files to update:
      /app/controllers/admin_company_modules.php

      • AddGroup
      • EditGroup

      /app/models/module_manager.php

      • AddGroup
      • EditGroup
      • getGroup
      • getGroups

      /app/views/admin/default/admin_company_modules_addgroup.pdt
      /app/views/admin/default/admin_company_modules_editgroup.pdt

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              jonathan Jonathan Reissmueller
              Reporter:
              tyson Tyson Phillips (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/Jul/17

                Agile