mirror of
https://github.com/unraid/webgui.git
synced 2026-01-23 18:09:02 -06:00
Add in Support & Project Links to Docker Context Menu
Every container added in via CA should already have the Support Link present (if added post 6.3) Majority of apps in CA also have a project link present, but this will only thus far dockerMan hasn't saved that entry on user templates, so the Project link on the context menus will only appear for new containers added after the PR is aproved
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
var eventURL = "/plugins/dynamix.docker.manager/include/Events.php";
|
||||
|
||||
function addDockerContainerContext(container, image, template, started, update, autostart, webui, id) {
|
||||
function addDockerContainerContext(container, image, template, started, update, autostart, webui, id, Support="", Project="") {
|
||||
var opts = [{header: container, image: "/plugins/dynamix.docker.manager/images/dynamix.docker.manager.png"}];
|
||||
if (started && (webui !== "" && webui != "#")) {
|
||||
opts.push({text: 'WebUI', icon: 'fa-globe', href: webui, target: '_blank'});
|
||||
@@ -25,6 +25,13 @@ function addDockerContainerContext(container, image, template, started, update,
|
||||
}
|
||||
opts.push({divider: true});
|
||||
opts.push({text: 'Remove', icon: 'fa-trash', action: function(e){ e.preventDefault(); rmContainer(container, image, id); }});
|
||||
if (Support) {
|
||||
opts.push({divider: true});
|
||||
opts.push({text: 'Support', icon: 'fa-question', href: Support, target: '_blank'});
|
||||
}
|
||||
if (Project) {
|
||||
opts.push({text: 'Project Page', icon: 'fa-life-ring', href: Project, target: '_blank'});
|
||||
}
|
||||
context.attach('#context-'+container, opts);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user