diff --git a/.github/diy/patches/dockerman.patch b/.github/diy/patches/dockerman.patch index 8e68dc8dd..a339190b6 100644 --- a/.github/diy/patches/dockerman.patch +++ b/.github/diy/patches/dockerman.patch @@ -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 @@