Skip to content
This repository was archived by the owner on Apr 4, 2026. It is now read-only.

Commit b0d3549

Browse files
ich777dcflachs
andauthored
Add option to split compose manager into separate Tab in Unraid (#29)
* Add files via upload * Update compose.manager.plg * remove Unraid version check * Modified how Docker service is running or not is detected * Removed Unraid version check * Show Autostart switch - fix for Autostart switch not showing up * Replace . with ` ` * Update Compose.page * Update compose.manager.settings.page * Update default.cfg * Update compose.manager.page * Update Compose.page * Update compose.manager.settings.page * Update Compose.page * Update compose.manager.plg with corrected variable name --------- Co-authored-by: dcflachs <dcflachs@users.noreply.github.com>
1 parent c286c5c commit b0d3549

6 files changed

Lines changed: 38 additions & 7 deletions

File tree

compose.manager.plg

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ if [[ ! -f "&pluginLOC;/projects/version" ]]; then
138138

139139
echo "1" > &pluginLOC;/projects/version
140140
fi
141+
142+
#Add SHOW_COMPOSE_IN_HEADER_MENU entry if not exists
143+
grep -q "SHOW_COMPOSE_IN_HEADER_MENU=" &pluginLOC;/&name;.cfg || echo "SHOW_COMPOSE_IN_HEADER_MENU=\"false\"" &gt;&gt; &pluginLOC;/&name;.cfg
144+
141145
</INLINE>
142146
</FILE>
143147

@@ -199,4 +203,4 @@ rm -f $(ls &pluginLOC;/&name;*.txz 2>/dev/null|grep -v '&packageVER;')
199203
</INLINE>
200204
</FILE>
201205

202-
</PLUGIN>
206+
</PLUGIN>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Menu="Tasks:61"
2+
Type="xmenu"
3+
Title="Docker Compose"
4+
Tag="fa-cubes"
5+
Code="f1b3"
6+
Cond="$var['fsState'] == 'Started' && exec('/etc/rc.d/rc.docker status | grep -v "not"') && exec(\"grep '^SHOW_COMPOSE_IN_HEADER_MENU=' /boot/config/plugins/compose.manager/compose.manager.cfg 2>/dev/null | grep 'true'\")"
7+
---
8+
<link type="text/css" rel="stylesheet" href="<?autov('/webGui/styles/jquery.switchbutton.css')?>">
9+
<script src="<?autov('/webGui/javascript/jquery.switchbutton.js')?>"></script>
10+
<script src="<?autov('/plugins/dynamix.docker.manager/javascript/docker.js')?>"></script>
11+
<style>
12+
table tbody td {
13+
line-height:normal
14+
}
15+
</style>
16+
<?php include '/usr/local/emhttp/plugins/compose.manager/php/compose_manager_main.php';?>

source/compose.manager/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
**Compose.Manager**
1+
**Compose Manager**
22

3-
This plugin installs the docker compose package on you unRAID server and adds a simple manager page to the web ui.
3+
This plugin installs the docker compose package on you unRAID server and adds a simple manager page to the web ui.

source/compose.manager/compose.manager.page

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ Author="dcflachs"
22
Title="Compose"
33
Type="php"
44
Menu="Docker:2"
5-
Cond="(pgrep('dockerd')!==false)"
5+
Cond="$var['fsState'] == 'Started' && exec('/etc/rc.d/rc.docker status | grep -v \"not\"') && (!file_exists('/boot/config/plugins/compose.manager/compose.manager.cfg') ? true : exec(\"grep '^SHOW_COMPOSE_IN_HEADER_MENU=' /boot/config/plugins/compose.manager/compose.manager.cfg 2>/dev/null | grep -v 'true'\"))"
66
---
7-
<?php include '/usr/local/emhttp/plugins/compose.manager/php/compose_manager_main.php';?>
7+
<?php include '/usr/local/emhttp/plugins/compose.manager/php/compose_manager_main.php';?>

source/compose.manager/compose.manager.settings.page

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ _(Recreate During Autostart)_:
109109
network they are attached to no longer exists.
110110
</blockquote>
111111

112+
_(Show Compose in Header Menu)_:
113+
: <select name="SHOW_COMPOSE_IN_HEADER_MENU">
114+
<?=mk_option($cfg['SHOW_COMPOSE_IN_HEADER_MENU'], "false", _("No"))?>
115+
<?=mk_option($cfg['SHOW_COMPOSE_IN_HEADER_MENU'], "true", _("Yes"))?>
116+
</select>
117+
118+
<blockquote class="inline_help">
119+
This will move the Compose Manager page to a separate tab in the Unraid Header menu.
120+
</blockquote>
121+
112122
_(Patch unRAID WebUI)_:
113123
: <select name="PATCH_UI">
114124
<?=mk_option($cfg['PATCH_UI'], "false", _("No"))?>
@@ -126,4 +136,4 @@ _(Patch unRAID WebUI)_:
126136

127137
<input type="submit" name="#default" value="_(Default)_">
128138
: <input type="submit" name="#apply" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
129-
</form>
139+
</form>

source/compose.manager/default.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ OUTPUTSTYLE="ttyd"
22
PATCH_UI="false"
33
DEBUG_TO_LOG="false"
44
PROJECTS_FOLDER="/boot/config/plugins/compose.manager/projects"
5-
AUTOSTART_FORCE_RECREATE="false"
5+
AUTOSTART_FORCE_RECREATE="false"
6+
SHOW_COMPOSE_IN_HEADER_MENU="false"

0 commit comments

Comments
 (0)