Skip to content

Commit b57cb73

Browse files
Fix phpMyAdmin Service tab + PHP version save, and DDNS Manager Uninstall
phpMyAdmin has no systemd service of its own (served via existing nginx+PHP-FPM), so the 'Service' tab always showed 'unknown' and Start/Restart did nothing (control_module returns 'No service defined' when mod.service is unset). Removed the Service tab for phpMyAdmin and made PHP Version the default tab. phpMyAdmin's PHP-version dropdown checked /usr/bin/php{v} (CLI binary), but only php{v}-fpm may be installed for non-default versions - leaving the dropdown empty, currentPhp='', and Save always failing with 'Config not found or PHP version missing'. Fixed to check /run/php/php{v}-fpm.sock instead, matching Roundcube's (correct) detection. DDNS Manager's App Store entry has check:'echo found' (always 'installed', by design - it's a built-in core feature, not a package). But this meant the Uninstall button was always shown, and clicking it ran 'apt-get remove ddclient' (unrelated to the actual DDNS feature, which is pure VortexPanel code) then the check still said 'found' - appearing as if uninstall silently failed. Added a 'builtin' flag, threaded through /api/modules, and hidden the Uninstall button for built-in modules in favor of a 'Built-in' badge.
1 parent 2327e48 commit b57cb73

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

panel/routes/modules.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ def is_installed(check_cmd):
434434
'id':'ddns', 'name':'DDNS Manager', 'icon':'🌍', 'category':'DNS',
435435
'desc':'Dynamic DNS — automatic IP update service (Built-in)',
436436
'check':'echo found', # Built-in, always available
437+
'builtin':True,
437438
'versions':[
438439
{'label':'3.11.2 (Latest)', 'value':'latest'},
439440
],
@@ -758,6 +759,7 @@ def list_modules():
758759
'installedVer': installed_ver,
759760
'versions': m.get('versions', []),
760761
'manage': m.get('manage', False),
762+
'builtin': m.get('builtin', False),
761763
'conflict_group': next((g for g,ms in CONFLICT_GROUPS.items() if m['id'] in ms), None),
762764
})
763765
return jsonify({'ok':True, 'modules':result})
@@ -1317,7 +1319,7 @@ def fpm_get(key):
13171319
with open(pma_conf) as f: cc = f.read()
13181320
m = _re.search(r'listen\s+(\d+)', cc)
13191321
if m: port = m.group(1)
1320-
php_versions = [v for v in ['8.5','8.4','8.3','8.2','8.1','8.0','7.4'] if os.path.exists('/usr/bin/php' + v)]
1322+
php_versions = [v for v in ['8.5','8.4','8.3','8.2','8.1','8.0','7.4'] if os.path.exists(f'/run/php/php{v}-fpm.sock')]
13211323
current_php = ''
13221324
if os.path.exists(pma_conf):
13231325
with open(pma_conf) as f: cc = f.read()

web/static/js/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,7 @@ function modulesPage() {
16501650
// For pages that have dedicated full pages, navigate there
16511651

16521652
// For all other apps — show the settings modal
1653-
const defaultTab = {'ddns':'ddns_domains','bind9':'dns_zones','phpmyadmin':'service','roundcube':'rc_overview'}.hasOwnProperty(m.id) ? {'ddns':'ddns_domains','bind9':'dns_zones','phpmyadmin':'service'}[m.id] : 'service';
1653+
const defaultTab = {'ddns':'ddns_domains','bind9':'dns_zones','phpmyadmin':'php_version','roundcube':'rc_overview'}.hasOwnProperty(m.id) ? {'ddns':'ddns_domains','bind9':'dns_zones','phpmyadmin':'php_version'}[m.id] : 'service';
16541654
this.settingsModal = {
16551655
...this.settingsModal,
16561656
show: true, mod: m, tab: defaultTab, rcData: {},
@@ -1786,7 +1786,7 @@ function modulesPage() {
17861786
clamav: ['service','logs'],
17871787
ddns: ['ddns_domains','ddns_server','ddns_log'],
17881788
bind9: ['service','dns_zones','dns_records','dns_config','dns_private','switch_version','logs'],
1789-
phpmyadmin: ['service','php_version','security'],
1789+
phpmyadmin: ['php_version','security'],
17901790
roundcube: ['rc_overview','rc_config','rc_php','rc_logs'],
17911791
docker: ['service','info'],
17921792
};

web/templates/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,8 @@
14521452
<span x-text="m.loading?'…':'+ Add'"></span>
14531453
</button>
14541454
</div>
1455-
<button class="btn btn-danger btn-xs" @click="uninstall(m)" :disabled="m.loading" x-show="m.id!=='php'">
1455+
<span x-show="m.builtin" class="badge badge-gray" style="font-size:10px">Built-in</span>
1456+
<button class="btn btn-danger btn-xs" @click="uninstall(m)" :disabled="m.loading" x-show="m.id!=='php' && !m.builtin">
14561457
<span x-show="m.loading" class="loading-spinner" style="width:9px;height:9px;border-width:1px"></span>
14571458
<span x-text="m.loading?'…':'Uninstall'"></span>
14581459
</button>

0 commit comments

Comments
 (0)