Update dockerman.patch

This commit is contained in:
kiddin9 authored and GitHub committed 2026-10-30 20:52:40 +08:00
1 parent 8da5d996a7
commit f470897df5
1 file changed
+36
+36
View File
@@ -1,3 +1,39 @@
--- a/luci-app-dockerman/htdocs/luci-static/resources/view/dockerman/overview.js
+++ b/luci-app-dockerman/htdocs/luci-static/resources/view/dockerman/overview.js
@@ -110,9 +110,30 @@ return dm2.dv.extend({
isLocal = true;
if (info_response?.code !== 200) {
- return E('div', {}, [ info_response?.body?.message ]);
+ return E('div', { 'class': 'cbi-section' }, [
+ E('h3', {}, _('Docker Daemon Status')),
+ E('div', { 'class': 'alert-message warning', style: 'margin-bottom: 15px;' },
+ info_response?.body?.message || _('Failed to connect to Docker daemon.')
+ ),
+ E('p', {}, _('The Docker daemon appears to be stopped. You can attempt to start it below:')),
+ E('div', { style: 'display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px;' }, [
+ E('button', {
+ 'class': 'btn cbi-button-action positive',
+ 'click': () => {
+ this.handleAction('dockerd', 'start').then((success) => {
+ if (success) {
+ setTimeout(() => location.reload(), 1500);
+ }
+ });
+ }
+ }, [_('Start')]),
+ E('button', {
+ 'class': 'btn cbi-button-action neutral',
+ 'click': () => location.reload()
+ }, [_('Refresh')])
+ ])
+ ]);
}
-
this.parseHeaders(version_response.headers, version_headers);
this.parseBody(version_response.body, version_body);
this.parseBody(info_response.body, info_body);
--- a/luci-app-dockerman/root/usr/share/luci/menu.d/luci-app-dockerman.json
+++ b/luci-app-dockerman/root/usr/share/luci/menu.d/luci-app-dockerman.json
@@ -1,7 +1,7 @@