Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,31 @@ return dm2.dv.extend({
let isLocal = false;
if (!docker_ep || docker_ep.length === 0 || docker_ep.map(e => e.includes('.sock')).filter(Boolean).length == 1)
isLocal = true;

if (info_response?.code !== 200) {
return E('div', {}, [ info_response?.body?.message ]);
}

if (info_response?.code !== 200) {
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);
info_body.push(...formatInfoBody(info_response.body));
Expand Down
14 changes: 14 additions & 0 deletions applications/luci-app-dockerman/po/zh_Hans/dockerman.po
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,21 @@ msgstr "全局设置"
#: applications/luci-app-dockerman/htdocs/luci-static/resources/view/dockerman/configuration.js:23
msgid "Globals"
msgstr "全局"
#: applications/luci-app-dockerman/htdocs/luci-static/resources/view/dockerman/overview.js:229
msgid "Docker Daemon Status"
msgstr "Docker 守护进程状态"

#: applications/luci-app-dockerman/htdocs/luci-static/resources/view/dockerman/overview.js:229
msgid "Failed to connect to Docker daemon."
msgstr "无法连接到 Docker 守护进程。"

#: applications/luci-app-dockerman/htdocs/luci-static/resources/view/dockerman/overview.js:229
msgid "The Docker daemon appears to be stopped. You can attempt to start it below:"
msgstr "Docker 守护进程似乎已停止。您可以在下方尝试启动它:"

#: applications/luci-app-dockerman/htdocs/luci-static/resources/view/dockerman/overview.js:229
msgid "Refresh"
msgstr "刷新"
#: applications/luci-app-dockerman/htdocs/luci-static/resources/view/dockerman/overview.js:262
msgid "Go to relevant configuration page"
msgstr "进入相关配置页面"
Expand Down
Loading