Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e30bdb64cb | |||
| 75f93e43ad | |||
| a5795d381c | |||
| fdc53ce76d | |||
| 1ee52979de | |||
| 1b68e9e478 | |||
| f4085d7ea6 | |||
| 01e11d1600 | |||
| 9d1b6d01a4 | |||
| ad7d974654 | |||
| 7c87c8ec3f | |||
| 801e00e310 | |||
| b6d67ed68a | |||
| 7b34bca639 | |||
| 91140076db | |||
| 94b0e1760b | |||
| 679f5e986d | |||
| 176f67dd30 | |||
| 46275d81a8 | |||
| 75e004b416 | |||
| c96bfaf646 | |||
| 0183c34a0d |
@@ -9,7 +9,7 @@
|
||||
<display-name>Package - MokoWaaS</display-name>
|
||||
<org>MokoConsulting</org>
|
||||
<description>White-label identity, security hardening, and tenant restriction layer for WaaS-managed Joomla environments</description>
|
||||
<version>02.32.03</version>
|
||||
<version>02.32.10</version>
|
||||
<license spdx="GPL-3.0-or-later">GNU General Public License v3</license>
|
||||
</identity>
|
||||
<governance>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# FILE INFORMATION
|
||||
# DEFGROUP: Gitea.Workflow
|
||||
# INGROUP: moko-platform.Automation
|
||||
# VERSION: 02.32.03
|
||||
# VERSION: 02.32.10
|
||||
# BRIEF: Auto-create feature branch when an issue is opened
|
||||
|
||||
name: "Universal: Issue Branch"
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
INGROUP: MokoWaaS.Documentation
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
PATH: ./CHANGELOG.md
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
BRIEF: Version history using `Keep a Changelog`
|
||||
-->
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
DEFGROUP: Joomla.Plugin
|
||||
INGROUP: MokoWaaS.Documentation
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
PATH: ./CODE_OF_CONDUCT.md
|
||||
BRIEF: Reference + packaging repo for Moko Consulting Developer GPT Other Default
|
||||
-->
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
DEFGROUP: mokoconsulting-tech.MokoWaaSBrand
|
||||
INGROUP: MokoStandards.Governance
|
||||
REPO: https://github.com/mokoconsulting-tech/MokoWaaSBrand
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
PATH: /GOVERNANCE.md
|
||||
BRIEF: Project governance rules, roles, and decision process for MokoWaaSBrand
|
||||
-->
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
INGROUP: MokoWaaS.Documentation
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
PATH: ./LICENSE.md
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
BRIEF: Project license (GPL-3.0-or-later)
|
||||
-->
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
DEFGROUP: Joomla.Plugin
|
||||
INGROUP: MokoWaaS
|
||||
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
PATH: /README.md
|
||||
BRIEF: MokoWaaS platform plugin for Joomla
|
||||
-->
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ DEFGROUP: [PROJECT_NAME]
|
||||
INGROUP: [PROJECT_NAME].Documentation
|
||||
REPO: [REPOSITORY_URL]
|
||||
PATH: /SECURITY.md
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
BRIEF: Security vulnerability reporting and handling policy
|
||||
-->
|
||||
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
INGROUP: MokoWaaS.Build
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
FILE: build-guide.md
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
PATH: /docs/guides/
|
||||
BRIEF: Build and packaging guide for the MokoWaaS system plugin
|
||||
NOTE: Defines environment setup, repository layout, packaging rules, and release preparation
|
||||
-->
|
||||
|
||||
# MokoWaaS Build Guide (VERSION: 02.32.03)
|
||||
# MokoWaaS Build Guide (VERSION: 02.32.10)
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
DEFGROUP: Joomla.Plugin
|
||||
INGROUP: MokoWaaS.Guides
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
PATH: /docs/guides/configuration-guide.md
|
||||
BRIEF: Configuration guide for the MokoWaaS system plugin
|
||||
NOTE: Defines plugin parameters, expected behaviors, and recommended defaults
|
||||
-->
|
||||
|
||||
# MokoWaaS Configuration Guide (VERSION: 02.32.03)
|
||||
# MokoWaaS Configuration Guide (VERSION: 02.32.10)
|
||||
|
||||
## 1. Objective
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
DEFGROUP: Joomla.Plugin
|
||||
INGROUP: MokoWaaS.Guides
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
PATH: /docs/guides/installation-guide.md
|
||||
BRIEF: Installation guide for the MokoWaaS system plugin
|
||||
NOTE: First document in the guide set
|
||||
-->
|
||||
|
||||
# MokoWaaS Installation Guide (VERSION: 02.32.03)
|
||||
# MokoWaaS Installation Guide (VERSION: 02.32.10)
|
||||
|
||||
## Introduction
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
DEFGROUP: Joomla.Plugin
|
||||
INGROUP: MokoWaaS.Guides
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
PATH: /docs/guides/operations-guide.md
|
||||
BRIEF: Operational guide for administering and managing the MokoWaaS system plugin
|
||||
NOTE: Defines lifecycle, responsibilities, and operational behaviors
|
||||
-->
|
||||
|
||||
# MokoWaaS Operations Guide (VERSION: 02.32.03)
|
||||
# MokoWaaS Operations Guide (VERSION: 02.32.10)
|
||||
|
||||
## Introduction
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
DEFGROUP: Joomla.Plugin
|
||||
INGROUP: MokoWaaS.Guides
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
PATH: /docs/guides/rollback-and-recovery-guide.md
|
||||
BRIEF: Rollback and recovery guide for restoring stable operation after plugin related incidents
|
||||
NOTE: Completes the core guide set for WaaS plugin governance
|
||||
-->
|
||||
|
||||
# MokoWaaS Rollback and Recovery Guide (VERSION: 02.32.03)
|
||||
# MokoWaaS Rollback and Recovery Guide (VERSION: 02.32.10)
|
||||
|
||||
## Introduction
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
DEFGROUP: Joomla.Plugin
|
||||
INGROUP: MokoWaaS.Guides
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
PATH: /docs/guides/testing-guide.md
|
||||
BRIEF: Testing guide for MokoWaaS v02.01.08
|
||||
NOTE: Covers manual test procedures for language overrides, install/uninstall, and configuration
|
||||
-->
|
||||
|
||||
# MokoWaaS Testing Guide (VERSION: 02.32.03)
|
||||
# MokoWaaS Testing Guide (VERSION: 02.32.10)
|
||||
|
||||
## 1. Prerequisites
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
DEFGROUP: Joomla.Plugin
|
||||
INGROUP: MokoWaaS.Guides
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
PATH: /docs/guides/troubleshooting-guide.md
|
||||
BRIEF: Troubleshooting guide for diagnosing and resolving issues related to the MokoWaaS plugin
|
||||
NOTE: Designed for administrators and WaaS operations teams
|
||||
-->
|
||||
|
||||
# MokoWaaS Troubleshooting Guide (VERSION: 02.32.03)
|
||||
# MokoWaaS Troubleshooting Guide (VERSION: 02.32.10)
|
||||
|
||||
## Introduction
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
DEFGROUP: Joomla.Plugin
|
||||
INGROUP: MokoWaaS.Guides
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
PATH: /docs/guides/upgrade-and-versioning-guide.md
|
||||
BRIEF: Guide for updating, versioning, and maintaining the MokoWaaS plugin
|
||||
NOTE: Defines release flow, version rules, and upgrade validation
|
||||
-->
|
||||
|
||||
# MokoWaaS Upgrade and Versioning Guide (VERSION: 02.32.03)
|
||||
# MokoWaaS Upgrade and Versioning Guide (VERSION: 02.32.10)
|
||||
|
||||
## Introduction
|
||||
|
||||
|
||||
+2
-2
@@ -10,13 +10,13 @@
|
||||
DEFGROUP: Joomla.Plugin
|
||||
INGROUP: MokoWaaS.Documentation
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
PATH: /docs/index.md
|
||||
BRIEF: Master index of all documentation for the MokoWaaS plugin
|
||||
NOTE: Automatically maintained index for all guide canvases
|
||||
-->
|
||||
|
||||
# MokoWaaS Documentation Index (VERSION: 02.32.03)
|
||||
# MokoWaaS Documentation Index (VERSION: 02.32.10)
|
||||
|
||||
## Introduction
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
INGROUP: MokoWaaS
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
PATH: /docs/plugin-basic.md
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
BRIEF: Baseline documentation for the MokoWaaS system plugin
|
||||
NOTE: Foundational reference for internal and external stakeholders
|
||||
-->
|
||||
|
||||
# MokoWaaS Plugin Overview (VERSION: 02.32.03)
|
||||
# MokoWaaS Plugin Overview (VERSION: 02.32.10)
|
||||
|
||||
## Introduction
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ DEFGROUP: MokoWaaS.Documentation
|
||||
INGROUP: MokoStandards.Templates
|
||||
REPO: https://github.com/mokoconsulting-tech/MokoWaaS
|
||||
PATH: /docs/update-server.md
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.10
|
||||
BRIEF: How this extension's Joomla update server file (update.xml) is managed
|
||||
-->
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
DEFGROUP: Joomla.Component
|
||||
INGROUP: MokoWaaS
|
||||
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.04
|
||||
PATH: /mokowaas.xml
|
||||
BRIEF: Component manifest for MokoWaaS admin dashboard and REST API
|
||||
-->
|
||||
@@ -20,13 +20,7 @@
|
||||
<license>GPL-3.0-or-later</license>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>02.32.10</version>
|
||||
<description>MokoWaaS admin dashboard and REST API. Provides a control panel for managing MokoWaaS feature plugins, site health monitoring, and remote management endpoints.</description>
|
||||
|
||||
<namespace path="src">Moko\Component\MokoWaaS</namespace>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
; MokoWaaS CPanel Module
|
||||
; Copyright (C) 2026 Moko Consulting. All rights reserved.
|
||||
; License: GPL-3.0-or-later
|
||||
|
||||
MOD_MOKOWAAS_CPANEL="MokoWaaS"
|
||||
MOD_MOKOWAAS_CPANEL_DESC="Displays MokoWaaS feature plugin status and site health on the admin dashboard."
|
||||
|
||||
MOD_MOKOWAAS_CPANEL_SHOW_HEALTH_LABEL="Show Health Status"
|
||||
MOD_MOKOWAAS_CPANEL_SHOW_PLUGINS_LABEL="Show Feature Plugins"
|
||||
MOD_MOKOWAAS_CPANEL_OPEN_DASHBOARD="Control Panel"
|
||||
MOD_MOKOWAAS_CPANEL_DEBUG="Debug ON"
|
||||
MOD_MOKOWAAS_CPANEL_OFFLINE="Offline"
|
||||
MOD_MOKOWAAS_CPANEL_HEALTH_OK="All Systems OK"
|
||||
MOD_MOKOWAAS_CPANEL_HEALTH_ERROR="Database Error"
|
||||
MOD_MOKOWAAS_CPANEL_PLUGINS_SUMMARY="%d of %d features enabled"
|
||||
@@ -0,0 +1,3 @@
|
||||
; MokoWaaS CPanel Module - System strings
|
||||
MOD_MOKOWAAS_CPANEL="MokoWaaS"
|
||||
MOD_MOKOWAAS_CPANEL_DESC="Displays MokoWaaS feature plugin status and site health on the admin dashboard."
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="module" client="administrator" method="upgrade">
|
||||
<name>mod_mokowaas_cpanel</name>
|
||||
<author>Moko Consulting</author>
|
||||
<creationDate>2026-06-02</creationDate>
|
||||
<copyright>Copyright (C) 2026 Moko Consulting. All rights reserved.</copyright>
|
||||
<license>GPL-3.0-or-later</license>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||
<version>02.32.10</version>
|
||||
<description>MOD_MOKOWAAS_CPANEL_DESC</description>
|
||||
<namespace path="src">Moko\Module\MokoWaaSCpanel</namespace>
|
||||
|
||||
<files>
|
||||
<folder module="mod_mokowaas_cpanel">services</folder>
|
||||
<folder>src</folder>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
|
||||
<languages folder="language">
|
||||
<language tag="en-GB">en-GB/mod_mokowaas_cpanel.ini</language>
|
||||
<language tag="en-GB">en-GB/mod_mokowaas_cpanel.sys.ini</language>
|
||||
</languages>
|
||||
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field name="show_health" type="radio" default="1"
|
||||
label="MOD_MOKOWAAS_CPANEL_SHOW_HEALTH_LABEL"
|
||||
layout="joomla.form.field.radio.switcher">
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
<field name="show_plugins" type="radio" default="1"
|
||||
label="MOD_MOKOWAAS_CPANEL_SHOW_PLUGINS_LABEL"
|
||||
layout="joomla.form.field.radio.switcher">
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* @package MokoWaaS
|
||||
* @subpackage mod_mokowaas_cpanel
|
||||
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
|
||||
* @license GNU General Public License version 3 or later; see LICENSE
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Extension\Service\Provider\HelperFactory;
|
||||
use Joomla\CMS\Extension\Service\Provider\Module;
|
||||
use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory;
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
|
||||
return new class implements ServiceProviderInterface
|
||||
{
|
||||
public function register(Container $container): void
|
||||
{
|
||||
$container->registerServiceProvider(new ModuleDispatcherFactory('\\Moko\\Module\\MokoWaaSCpanel'));
|
||||
$container->registerServiceProvider(new HelperFactory('\\Moko\\Module\\MokoWaaSCpanel\\Administrator\\Helper'));
|
||||
$container->registerServiceProvider(new Module());
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* @package MokoWaaS
|
||||
* @subpackage mod_mokowaas_cpanel
|
||||
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
|
||||
* @license GNU General Public License version 3 or later; see LICENSE
|
||||
*/
|
||||
|
||||
namespace Moko\Module\MokoWaaSCpanel\Administrator\Dispatcher;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Dispatcher\AbstractModuleDispatcher;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Helper\HelperFactoryAwareInterface;
|
||||
use Joomla\CMS\Helper\HelperFactoryAwareTrait;
|
||||
use Joomla\Database\DatabaseInterface;
|
||||
|
||||
class Dispatcher extends AbstractModuleDispatcher implements HelperFactoryAwareInterface
|
||||
{
|
||||
use HelperFactoryAwareTrait;
|
||||
|
||||
protected function getLayoutData()
|
||||
{
|
||||
$data = parent::getLayoutData();
|
||||
|
||||
$db = Factory::getContainer()->get(DatabaseInterface::class);
|
||||
$helper = $this->getHelperFactory()->getHelper('CpanelHelper');
|
||||
|
||||
$data['siteInfo'] = $helper->getSiteInfo($db);
|
||||
$data['plugins'] = $helper->getFeaturePlugins($db);
|
||||
$data['healthOk'] = $helper->isDatabaseOk($db);
|
||||
$data['counts'] = $helper->getCounts($db);
|
||||
$data['disk'] = $helper->getDiskInfo();
|
||||
$data['currentIp'] = $helper->getCurrentIp();
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
/**
|
||||
* @package MokoWaaS
|
||||
* @subpackage mod_mokowaas_cpanel
|
||||
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
|
||||
* @license GNU General Public License version 3 or later; see LICENSE
|
||||
*/
|
||||
|
||||
namespace Moko\Module\MokoWaaSCpanel\Administrator\Helper;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Version;
|
||||
use Joomla\Database\DatabaseInterface;
|
||||
|
||||
class CpanelHelper
|
||||
{
|
||||
/**
|
||||
* Get basic site info for the cpanel card header.
|
||||
*/
|
||||
public function getSiteInfo(DatabaseInterface $db): object
|
||||
{
|
||||
$config = Factory::getConfig();
|
||||
|
||||
$query = $db->getQuery(true)
|
||||
->select($db->quoteName('manifest_cache'))
|
||||
->from($db->quoteName('#__extensions'))
|
||||
->where($db->quoteName('element') . ' = ' . $db->quote('pkg_mokowaas'))
|
||||
->where($db->quoteName('type') . ' = ' . $db->quote('package'));
|
||||
$db->setQuery($query);
|
||||
$pkgCache = json_decode($db->loadResult() ?? '{}');
|
||||
|
||||
return (object) [
|
||||
'mokowaas_version' => $pkgCache->version ?? '',
|
||||
'joomla_version' => (new Version())->getShortVersion(),
|
||||
'php_version' => PHP_VERSION,
|
||||
'debug' => (bool) $config->get('debug'),
|
||||
'offline' => (bool) $config->get('offline'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get MokoWaaS system feature plugins with their enabled state.
|
||||
*/
|
||||
public function getFeaturePlugins(DatabaseInterface $db): array
|
||||
{
|
||||
$query = $db->getQuery(true)
|
||||
->select([
|
||||
$db->quoteName('name'),
|
||||
$db->quoteName('element'),
|
||||
$db->quoteName('enabled'),
|
||||
])
|
||||
->from($db->quoteName('#__extensions'))
|
||||
->where($db->quoteName('type') . ' = ' . $db->quote('plugin'))
|
||||
->where($db->quoteName('folder') . ' = ' . $db->quote('system'))
|
||||
->where('(' . $db->quoteName('element') . ' = ' . $db->quote('mokowaas')
|
||||
. ' OR ' . $db->quoteName('element') . ' LIKE ' . $db->quote('mokowaas\\_%') . ')')
|
||||
->order($db->quoteName('element') . ' ASC');
|
||||
$db->setQuery($query);
|
||||
|
||||
return $db->loadObjectList() ?: [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Quick database connectivity check.
|
||||
*/
|
||||
public function isDatabaseOk(DatabaseInterface $db): bool
|
||||
{
|
||||
try
|
||||
{
|
||||
$db->setQuery('SELECT 1');
|
||||
$db->loadResult();
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (\Throwable $e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get content and system counts.
|
||||
*/
|
||||
public function getCounts(DatabaseInterface $db): object
|
||||
{
|
||||
$counts = (object) [
|
||||
'articles' => 0,
|
||||
'users' => 0,
|
||||
'extensions' => 0,
|
||||
'updates' => 0,
|
||||
];
|
||||
|
||||
try
|
||||
{
|
||||
$db->setQuery($db->getQuery(true)->select('COUNT(*)')->from($db->quoteName('#__content')));
|
||||
$counts->articles = (int) $db->loadResult();
|
||||
|
||||
$db->setQuery($db->getQuery(true)->select('COUNT(*)')->from($db->quoteName('#__users')));
|
||||
$counts->users = (int) $db->loadResult();
|
||||
|
||||
$db->setQuery($db->getQuery(true)->select('COUNT(*)')->from($db->quoteName('#__extensions'))->where($db->quoteName('enabled') . ' = 1'));
|
||||
$counts->extensions = (int) $db->loadResult();
|
||||
|
||||
$db->setQuery($db->getQuery(true)->select('COUNT(*)')->from($db->quoteName('#__updates'))->where($db->quoteName('extension_id') . ' != 0'));
|
||||
$counts->updates = (int) $db->loadResult();
|
||||
}
|
||||
catch (\Throwable $e)
|
||||
{
|
||||
// Silent
|
||||
}
|
||||
|
||||
return $counts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get disk usage info.
|
||||
*/
|
||||
public function getDiskInfo(): object
|
||||
{
|
||||
$free = @disk_free_space(JPATH_ROOT);
|
||||
$total = @disk_total_space(JPATH_ROOT);
|
||||
|
||||
return (object) [
|
||||
'free_mb' => $free !== false ? round($free / 1048576) : null,
|
||||
'total_mb' => $total !== false ? round($total / 1048576) : null,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current visitor's IP address.
|
||||
*/
|
||||
public function getCurrentIp(): string
|
||||
{
|
||||
return $_SERVER['REMOTE_ADDR'] ?? '';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
/**
|
||||
* @package MokoWaaS
|
||||
* @subpackage mod_mokowaas_cpanel
|
||||
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
|
||||
* @license GNU General Public License version 3 or later; see LICENSE
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
|
||||
$siteInfo = $siteInfo ?? (object) [];
|
||||
$plugins = $plugins ?? [];
|
||||
$healthOk = $healthOk ?? true;
|
||||
$counts = $counts ?? (object) ['articles' => 0, 'users' => 0, 'extensions' => 0, 'updates' => 0];
|
||||
$disk = $disk ?? (object) ['free_mb' => null, 'total_mb' => null];
|
||||
$currentIp = $currentIp ?? '';
|
||||
$showHealth = $params->get('show_health', 1);
|
||||
$showPlugins = $params->get('show_plugins', 1);
|
||||
$token = Session::getFormToken();
|
||||
|
||||
$enabledCount = 0;
|
||||
$totalCount = count($plugins);
|
||||
|
||||
foreach ($plugins as $p)
|
||||
{
|
||||
if ($p->enabled)
|
||||
{
|
||||
$enabledCount++;
|
||||
}
|
||||
}
|
||||
|
||||
$labels = [
|
||||
'mokowaas' => 'Core',
|
||||
'mokowaas_firewall' => 'Firewall',
|
||||
'mokowaas_tenant' => 'Tenant',
|
||||
'mokowaas_devtools' => 'DevTools',
|
||||
'mokowaas_monitor' => 'Monitor',
|
||||
];
|
||||
|
||||
$diskPct = ($disk->total_mb && $disk->total_mb > 0)
|
||||
? round((($disk->total_mb - ($disk->free_mb ?? 0)) / $disk->total_mb) * 100)
|
||||
: null;
|
||||
$diskColor = ($diskPct !== null && $diskPct > 90) ? 'bg-danger' : (($diskPct !== null && $diskPct > 75) ? 'bg-warning' : 'bg-success');
|
||||
?>
|
||||
|
||||
<div class="mod-mokowaas-cpanel p-3">
|
||||
<!-- Header row -->
|
||||
<div class="d-flex align-items-center justify-content-between mb-3">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<span class="icon-shield-alt" aria-hidden="true" style="font-size:1.25rem;color:#1a2744"></span>
|
||||
<strong>MokoWaaS</strong>
|
||||
<span class="badge bg-primary"><?php echo htmlspecialchars($siteInfo->mokowaas_version ?? ''); ?></span>
|
||||
<?php if (!empty($siteInfo->debug)): ?>
|
||||
<span class="badge bg-warning text-dark">Debug</span>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($siteInfo->offline)): ?>
|
||||
<span class="badge bg-danger">Offline</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<a href="<?php echo Route::_('index.php?option=com_mokowaas'); ?>" class="btn btn-sm btn-primary">
|
||||
<span class="icon-cogs" aria-hidden="true"></span>
|
||||
<?php echo Text::_('MOD_MOKOWAAS_CPANEL_OPEN_DASHBOARD'); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php if ($showHealth): ?>
|
||||
<!-- Health + stats row -->
|
||||
<div class="row g-2 mb-3">
|
||||
<div class="col-6 col-md-3">
|
||||
<div class="border rounded p-2 text-center h-100">
|
||||
<?php if ($healthOk): ?>
|
||||
<span class="icon-check-circle text-success d-block" style="font-size:1.5rem"></span>
|
||||
<small class="text-success fw-bold">Healthy</small>
|
||||
<?php else: ?>
|
||||
<span class="icon-exclamation-circle text-danger d-block" style="font-size:1.5rem"></span>
|
||||
<small class="text-danger fw-bold">DB Error</small>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3">
|
||||
<div class="border rounded p-2 text-center h-100">
|
||||
<span class="fw-bold d-block" style="font-size:1.25rem"><?php echo $counts->articles; ?></span>
|
||||
<small class="text-muted">Articles</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3">
|
||||
<div class="border rounded p-2 text-center h-100">
|
||||
<span class="fw-bold d-block" style="font-size:1.25rem"><?php echo $counts->users; ?></span>
|
||||
<small class="text-muted">Users</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3">
|
||||
<div class="border rounded p-2 text-center h-100">
|
||||
<?php if ($counts->updates > 0): ?>
|
||||
<span class="fw-bold d-block text-warning" style="font-size:1.25rem"><?php echo $counts->updates; ?></span>
|
||||
<small class="text-warning">Updates</small>
|
||||
<?php else: ?>
|
||||
<span class="icon-check d-block text-success" style="font-size:1.25rem"></span>
|
||||
<small class="text-muted">Up to date</small>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Disk + IP row -->
|
||||
<div class="d-flex flex-wrap align-items-center gap-3 mb-3 small text-muted">
|
||||
<?php if ($diskPct !== null): ?>
|
||||
<div class="d-flex align-items-center gap-1">
|
||||
<span class="icon-hdd" aria-hidden="true"></span>
|
||||
<span>Disk <?php echo $diskPct; ?>%</span>
|
||||
<div class="progress" style="width:60px;height:6px">
|
||||
<div class="progress-bar <?php echo $diskColor; ?>" style="width:<?php echo $diskPct; ?>%"></div>
|
||||
</div>
|
||||
<span><?php echo number_format(($disk->free_mb ?? 0) / 1024, 1); ?> GB free</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($currentIp): ?>
|
||||
<div>
|
||||
<span class="icon-globe" aria-hidden="true"></span>
|
||||
Your IP: <code><?php echo htmlspecialchars($currentIp); ?></code>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="ms-auto">
|
||||
Joomla <?php echo htmlspecialchars($siteInfo->joomla_version ?? ''); ?> / PHP <?php echo htmlspecialchars($siteInfo->php_version ?? ''); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($showPlugins && !empty($plugins)): ?>
|
||||
<!-- Feature plugin badges -->
|
||||
<div class="d-flex align-items-center gap-2 mb-3">
|
||||
<small class="text-muted"><?php echo Text::sprintf('MOD_MOKOWAAS_CPANEL_PLUGINS_SUMMARY', $enabledCount, $totalCount); ?></small>
|
||||
<div class="d-flex flex-wrap gap-1">
|
||||
<?php foreach ($plugins as $p): ?>
|
||||
<?php
|
||||
$label = $labels[$p->element] ?? $p->element;
|
||||
$badge = $p->enabled ? 'bg-success' : 'bg-secondary';
|
||||
$icon = $p->enabled ? 'icon-check' : 'icon-times';
|
||||
?>
|
||||
<span class="badge <?php echo $badge; ?>" title="<?php echo htmlspecialchars($p->name); ?>">
|
||||
<span class="<?php echo $icon; ?>" aria-hidden="true"></span>
|
||||
<?php echo htmlspecialchars($label); ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Quick action buttons -->
|
||||
<div class="d-flex flex-wrap gap-2">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" id="mokowaas-cpanel-cache"
|
||||
data-url="<?php echo Route::_('index.php?option=com_mokowaas&task=display.clearCache&format=json'); ?>"
|
||||
data-token="<?php echo $token; ?>">
|
||||
<span class="icon-trash" aria-hidden="true"></span> Clear Cache
|
||||
</button>
|
||||
<a href="<?php echo Route::_('index.php?option=com_installer&view=update'); ?>" class="btn btn-sm btn-outline-secondary">
|
||||
<span class="icon-refresh" aria-hidden="true"></span> Check Updates
|
||||
</a>
|
||||
<?php if ($counts->updates > 0): ?>
|
||||
<a href="<?php echo Route::_('index.php?option=com_installer&view=update'); ?>" class="btn btn-sm btn-warning">
|
||||
<span class="icon-upload" aria-hidden="true"></span> <?php echo $counts->updates; ?> Update<?php echo $counts->updates > 1 ? 's' : ''; ?> Available
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var btn = document.getElementById('mokowaas-cpanel-cache');
|
||||
if (!btn) return;
|
||||
btn.addEventListener('click', function() {
|
||||
var el = this;
|
||||
var url = el.dataset.url;
|
||||
var token = el.dataset.token;
|
||||
el.disabled = true;
|
||||
var icon = el.querySelector('span');
|
||||
var origClass = icon ? icon.className : '';
|
||||
if (icon) icon.className = 'icon-spinner icon-spin';
|
||||
var fd = new FormData();
|
||||
fd.append(token, '1');
|
||||
fetch(url, {method:'POST', body:fd, headers:{'X-Requested-With':'XMLHttpRequest'}})
|
||||
.then(function(r){return r.json()})
|
||||
.then(function(d){
|
||||
if (d.success) Joomla.renderMessages({message:['Cache cleared.']});
|
||||
else Joomla.renderMessages({error:[d.message||'Failed']});
|
||||
})
|
||||
.catch(function(){Joomla.renderMessages({error:['Network error']})})
|
||||
.finally(function(){
|
||||
el.disabled = false;
|
||||
if (icon) icon.className = origClass;
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -22,7 +22,7 @@
|
||||
* DEFGROUP: Joomla.Plugin
|
||||
* INGROUP: MokoWaaS
|
||||
* REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* PATH: /src/Extension/MokoWaaS.php
|
||||
* NOTE: Handles Joomla system events for rebranding functionality
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* FILE INFORMATION
|
||||
* DEFGROUP: Joomla.Plugin
|
||||
* INGROUP: MokoWaaS
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* PATH: /src/Field/AllowedIpsField.php
|
||||
* BRIEF: Custom form field that displays the current IP whitelist
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* FILE INFORMATION
|
||||
* DEFGROUP: Joomla.Plugin
|
||||
* INGROUP: MokoWaaS
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* PATH: /src/Field/CopyableTokenField.php
|
||||
* BRIEF: Read-only token field with a copy-to-clipboard button
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* FILE INFORMATION
|
||||
* DEFGROUP: Joomla.Plugin
|
||||
* INGROUP: MokoWaaS
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* PATH: /src/Field/CurrentIpField.php
|
||||
* BRIEF: Read-only field that displays the current user's IP address
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* FILE INFORMATION
|
||||
* DEFGROUP: Joomla.Plugin
|
||||
* INGROUP: MokoWaaS
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* PATH: /src/Field/DemoTaskInfoField.php
|
||||
* BRIEF: Read-only field showing scheduled task info with link to manage it
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* FILE INFORMATION
|
||||
* DEFGROUP: Joomla.Plugin
|
||||
* INGROUP: MokoWaaS
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* PATH: /src/Field/NextResetField.php
|
||||
* BRIEF: Read-only field showing next reset time from Joomla scheduled task
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* FILE INFORMATION
|
||||
* DEFGROUP: Joomla.Plugin
|
||||
* INGROUP: MokoWaaS
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* PATH: /src/Field/SnapshotTablesField.php
|
||||
* BRIEF: Multi-select list field that loads DB tables with sensible defaults
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: MokoWaaS
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS
|
||||
* PATH: /src/packages/plg_system_mokowaas/Service/ContentSyncReceiver.php
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* BRIEF: Receiver-side content sync — applies incoming payload to local DB
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: MokoWaaS
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS
|
||||
* PATH: /src/packages/plg_system_mokowaas/Service/ContentSyncService.php
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* BRIEF: Sender-side content sync — builds payload and pushes to remote sites
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: MokoWaaS
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS
|
||||
* PATH: /src/packages/plg_system_mokowaas/Service/DemoResetService.php
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* BRIEF: Content-only snapshot/restore for demo site reset
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
DEFGROUP: Joomla.Plugin
|
||||
INGROUP: MokoWaaS
|
||||
REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
VERSION: 02.32.03
|
||||
VERSION: 02.32.04
|
||||
PATH: /src/mokowaas.xml
|
||||
BRIEF: Plugin manifest for MokoWaaS system plugin
|
||||
NOTE: Defines installation metadata, files, and configuration for Joomla
|
||||
@@ -30,13 +30,7 @@
|
||||
<license>GNU General Public License version 3 or later; see LICENSE.md</license>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>02.32.10</version>
|
||||
<description>This plugin rebrands the Joomla system interface with MokoWaaS identity. It applies language overrides and ensures consistent branding across the platform.</description>
|
||||
<namespace path=".">Moko\Plugin\System\MokoWaaS</namespace>
|
||||
<scriptfile>script.php</scriptfile>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* DEFGROUP: Joomla.Plugin
|
||||
* INGROUP: MokoWaaS
|
||||
* REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* PATH: /src/script.php
|
||||
* BRIEF: Installation script for MokoWaaS plugin
|
||||
* NOTE: Handles installation, update, and uninstallation tasks including language override deployment
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* DEFGROUP: Joomla.Plugin
|
||||
* INGROUP: MokoWaaS
|
||||
* REPO: https://github.com/mokoconsulting-tech/mokowaas
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* PATH: /src/services/provider.php
|
||||
* BRIEF: Service provider for dependency injection in Joomla 5.x
|
||||
* NOTE: Registers the plugin with Joomla's DI container
|
||||
|
||||
@@ -8,13 +8,7 @@
|
||||
<license>GPL-3.0-or-later</license>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>02.32.10</version>
|
||||
<description>PLG_SYSTEM_MOKOWAAS_DEVTOOLS_DESC</description>
|
||||
<namespace path="src">Moko\Plugin\System\MokoWaaSDevTools</namespace>
|
||||
|
||||
|
||||
@@ -8,13 +8,7 @@
|
||||
<license>GPL-3.0-or-later</license>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>02.32.10</version>
|
||||
<description>PLG_SYSTEM_MOKOWAAS_FIREWALL_DESC</description>
|
||||
<namespace path="src">Moko\Plugin\System\MokoWaaSFirewall</namespace>
|
||||
|
||||
|
||||
@@ -8,13 +8,7 @@
|
||||
<license>GPL-3.0-or-later</license>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>02.32.10</version>
|
||||
<description>PLG_SYSTEM_MOKOWAAS_MONITOR_DESC</description>
|
||||
<namespace path="src">Moko\Plugin\System\MokoWaaSMonitor</namespace>
|
||||
|
||||
|
||||
@@ -8,13 +8,7 @@
|
||||
<license>GPL-3.0-or-later</license>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>02.32.10</version>
|
||||
<description>PLG_SYSTEM_MOKOWAAS_TENANT_DESC</description>
|
||||
<namespace path="src">Moko\Plugin\System\MokoWaaSTenant</namespace>
|
||||
|
||||
|
||||
@@ -12,20 +12,8 @@
|
||||
<license>GNU General Public License version 3 or later; see LICENSE</license>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>02.32.10</version>
|
||||
<version>02.32.10</version>
|
||||
<description>PLG_TASK_MOKOWAASDEMO_DESC</description>
|
||||
<namespace path="src">Moko\Plugin\Task\MokoWaaSDemo</namespace>
|
||||
|
||||
|
||||
@@ -12,13 +12,7 @@
|
||||
<license>GNU General Public License version 3 or later; see LICENSE</license>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>02.32.10</version>
|
||||
<description>PLG_TASK_MOKOWAASSYNC_DESC</description>
|
||||
<namespace path="src">Moko\Plugin\Task\MokoWaaSSync</namespace>
|
||||
|
||||
|
||||
@@ -7,20 +7,8 @@
|
||||
<license>GPL-3.0-or-later</license>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>02.32.10</version>
|
||||
<version>02.32.10</version>
|
||||
<description>Joomla Web Services API routes for MokoWaaS site management — health checks, cache, updates, backups, and site info.</description>
|
||||
<namespace path="src">Moko\Plugin\WebServices\MokoWaaS</namespace>
|
||||
<files>
|
||||
|
||||
@@ -7,20 +7,8 @@
|
||||
<license>GPL-3.0-or-later</license>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>02.32.10</version>
|
||||
<version>02.32.10</version>
|
||||
<description>Joomla Web Services API routes for Perfect Publisher (com_autotweet) — channels, posts, requests, rules, and feeds.</description>
|
||||
<namespace path="src">Moko\Plugin\WebServices\PerfectPublisher</namespace>
|
||||
<files>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* INGROUP: MokoWaaS
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS
|
||||
* PATH: /src/packages/plg_webservices_perfectpublisher/services/provider.php
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* BRIEF: DI service provider for Perfect Publisher Web Services plugin
|
||||
*/
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* INGROUP: MokoWaaS
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS
|
||||
* PATH: /src/packages/plg_webservices_perfectpublisher/src/Extension/PerfectPublisherApi.php
|
||||
* VERSION: 02.32.03
|
||||
* VERSION: 02.32.10
|
||||
* BRIEF: Web Services API plugin for Perfect Publisher (com_autotweet)
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,13 +2,7 @@
|
||||
<extension type="package" method="upgrade">
|
||||
<name>Package - MokoWaaS</name>
|
||||
<packagename>mokowaas</packagename>
|
||||
<version>
|
||||
┌────────────────────────────────────────────────────────────────────┐
|
||||
│ version_read v04.00.15 │
|
||||
│ Read version — manifest.xml is canonical, falls back to README.md and Joomla XML│
|
||||
└────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
02.32.02-dev</version>
|
||||
<version>02.32.10</version>
|
||||
<creationDate>2026-06-02</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
@@ -25,6 +19,7 @@
|
||||
<file type="plugin" id="plg_system_mokowaas_devtools" group="system">plg_system_mokowaas_devtools.zip</file>
|
||||
<file type="plugin" id="plg_system_mokowaas_monitor" group="system">plg_system_mokowaas_monitor.zip</file>
|
||||
<file type="component" id="com_mokowaas">com_mokowaas.zip</file>
|
||||
<file type="module" id="mod_mokowaas_cpanel" client="administrator">mod_mokowaas_cpanel.zip</file>
|
||||
<file type="plugin" id="plg_webservices_mokowaas" group="webservices">plg_webservices_mokowaas.zip</file>
|
||||
<file type="plugin" id="plg_webservices_perfectpublisher" group="webservices">plg_webservices_perfectpublisher.zip</file>
|
||||
<file type="plugin" id="plg_task_mokowaasdemo" group="task">plg_task_mokowaasdemo.zip</file>
|
||||
|
||||
@@ -49,6 +49,9 @@ class Pkg_MokowaasInstallerScript
|
||||
// Migrate params from core plugin to feature plugins (one-time)
|
||||
$this->migrateFeatureParams();
|
||||
|
||||
// Set up cpanel module on the admin dashboard
|
||||
$this->setupCpanelModule();
|
||||
|
||||
// Mark MokoWaaS extensions as protected (prevents disable/uninstall at framework level)
|
||||
$this->protectExtensions();
|
||||
|
||||
@@ -210,6 +213,7 @@ class Pkg_MokowaasInstallerScript
|
||||
$db->quote('mokowaas_devtools'),
|
||||
$db->quote('mokowaas_monitor'),
|
||||
$db->quote('com_mokowaas'),
|
||||
$db->quote('mod_mokowaas_cpanel'),
|
||||
$db->quote('mokowaasdemo'),
|
||||
$db->quote('mokowaassync'),
|
||||
$db->quote('perfectpublisher'),
|
||||
@@ -428,6 +432,80 @@ class Pkg_MokowaasInstallerScript
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* One-time migration of params from the monolithic core plugin to
|
||||
* the new feature plugins. Copies security, tenant, and dev params.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 02.32.00
|
||||
*/
|
||||
private function setupCpanelModule(): void
|
||||
{
|
||||
try
|
||||
{
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Enable the module
|
||||
$query = $db->getQuery(true)
|
||||
->update($db->quoteName('#__extensions'))
|
||||
->set($db->quoteName('enabled') . ' = 1')
|
||||
->where($db->quoteName('type') . ' = ' . $db->quote('module'))
|
||||
->where($db->quoteName('element') . ' = ' . $db->quote('mod_mokowaas_cpanel'));
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
// Check if a module instance already exists in #__modules
|
||||
$query = $db->getQuery(true)
|
||||
->select('COUNT(*)')
|
||||
->from($db->quoteName('#__modules'))
|
||||
->where($db->quoteName('module') . ' = ' . $db->quote('mod_mokowaas_cpanel'));
|
||||
$db->setQuery($query);
|
||||
|
||||
if ((int) $db->loadResult() > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Create the module instance on the cpanel position
|
||||
$module = (object) [
|
||||
'title' => 'MokoWaaS',
|
||||
'note' => '',
|
||||
'content' => '',
|
||||
'ordering' => 0,
|
||||
'position' => 'top',
|
||||
'checked_out' => null,
|
||||
'checked_out_time' => null,
|
||||
'publish_up' => null,
|
||||
'publish_down' => null,
|
||||
'published' => 1,
|
||||
'module' => 'mod_mokowaas_cpanel',
|
||||
'access' => 6, // Super Users only
|
||||
'showtitle' => 1,
|
||||
'params' => '{"show_health":"1","show_plugins":"1"}',
|
||||
'client_id' => 1, // Administrator
|
||||
'language' => '*',
|
||||
];
|
||||
|
||||
$db->insertObject('#__modules', $module, 'id');
|
||||
$moduleId = (int) $module->id;
|
||||
|
||||
if ($moduleId)
|
||||
{
|
||||
// Assign to all admin pages
|
||||
$map = (object) [
|
||||
'moduleid' => $moduleId,
|
||||
'menuid' => 0, // 0 = all pages
|
||||
];
|
||||
$db->insertObject('#__modules_menu', $map);
|
||||
}
|
||||
}
|
||||
catch (\Throwable $e)
|
||||
{
|
||||
Log::add('CPanel module setup error: ' . $e->getMessage(), Log::WARNING, 'mokowaas');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* One-time migration of params from the monolithic core plugin to
|
||||
* the new feature plugins. Copies security, tenant, and dev params.
|
||||
|
||||
Reference in New Issue
Block a user