mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-11-08 06:28:29 +01:00
Update dockman
This commit is contained in:
parent
0db7a23c07
commit
98b49f8294
@ -117,6 +117,15 @@ handle.stop_container = function(data)
|
||||
end
|
||||
end
|
||||
|
||||
handle.restart_container = function(data)
|
||||
local res = exec(data.host, "docker restart "..data.id, false)
|
||||
res = res:gsub('[\n\r]+', '')
|
||||
if res == data.id then
|
||||
return result("OK")
|
||||
else
|
||||
return error(res)
|
||||
end
|
||||
end
|
||||
|
||||
handle.rm_container = function(data)
|
||||
local res = exec(data.host, "docker stop "..data.id, false)
|
||||
|
@ -117,6 +117,15 @@ handle.stop_container = function(data)
|
||||
end
|
||||
end
|
||||
|
||||
handle.restart_container = function(data)
|
||||
local res = exec(data.host, "docker restart "..data.id, false)
|
||||
res = res:gsub('[\n\r]+', '')
|
||||
if res == data.id then
|
||||
return result("OK")
|
||||
else
|
||||
return error(res)
|
||||
end
|
||||
end
|
||||
|
||||
handle.rm_container = function(data)
|
||||
local res = exec(data.host, "docker stop "..data.id, false)
|
||||
|
File diff suppressed because one or more lines are too long
@ -7,7 +7,7 @@
|
||||
"author": "Xuan Sang LE",
|
||||
"email": "xsang.le@gmail.com"
|
||||
},
|
||||
"version":"0.1.0-b",
|
||||
"version":"0.1.1-b",
|
||||
"category":"Development",
|
||||
"iconclass":"fa fa-cubes",
|
||||
"mimes":["none"],
|
||||
|
Binary file not shown.
@ -213,6 +213,22 @@ class Dockman extends this.OS.application.BaseApplication
|
||||
return @error r.error if r.error
|
||||
@notify __("Container {0} removed", data.ID)
|
||||
@loadContainer(data.Image, true)
|
||||
},
|
||||
{
|
||||
text: "",
|
||||
iconclass: "bi bi-bootstrap-reboot",
|
||||
onbtclick: () =>
|
||||
sel = @ctnlist.selectedItem
|
||||
return unless sel and sel.data
|
||||
data = sel.data
|
||||
@exec("restart_container", {
|
||||
host: @currenthost.url,
|
||||
id: data.ID
|
||||
})
|
||||
.then (r) =>
|
||||
return @error r.error if r.error
|
||||
@notify __("Container {0} restarted", data.ID)
|
||||
@loadContainer(data.Image, true)
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
"author": "Xuan Sang LE",
|
||||
"email": "xsang.le@gmail.com"
|
||||
},
|
||||
"version":"0.1.0-b",
|
||||
"version":"0.1.1-b",
|
||||
"category":"Development",
|
||||
"iconclass":"fa fa-cubes",
|
||||
"mimes":["none"],
|
||||
|
@ -115,7 +115,7 @@
|
||||
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Dockman/README.md",
|
||||
"category": "Development",
|
||||
"author": "Xuan Sang LE",
|
||||
"version": "0.1.0-b",
|
||||
"version": "0.1.1-b",
|
||||
"dependencies": [],
|
||||
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Dockman/build/release/Dockman.zip"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user