docker-compose-editor #1

Merged
aqua3 merged 12 commits from docker-compose-editor into dev 2024-10-30 16:59:20 -03:00
7 changed files with 107 additions and 26 deletions
Showing only changes of commit 39213e779c - Show all commits

34
reload-cockpit.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
# usage:
# reload-cockpit.sh
#
# This script first ensures that cockpit is installed and setup, then it will
set -x
LOCAL=/usr/local
LOCAL_SCRIPTS=("temperature.sh" "cockpitScript.sh")
# Check if the script is run as root
if [ "$EUID" -ne 0 ]; then
echo "Permission denied. Please run as root."
exit 1
fi
# Copy cockpit files to the correct locations
rm -rf /usr/share/cockpit/general
mkdir -p /usr/share/cockpit/general
cp -rf ui/general/* /usr/share/cockpit/general/
cp -rf ui/branding-ubuntu/* /usr/share/cockpit/branding/ubuntu/
cp -rf ui/static/* /usr/share/cockpit/static/
cp -rf ui/base1/* /usr/share/cockpit/base1/
[ -d $LOCAL/echopilot ] || mkdir $LOCAL/echopilot
install -Dm755 version.txt $LOCAL/echopilot/.
for script in "${LOCAL_SCRIPTS[@]}"; do
install -Dm755 $script $LOCAL/echopilot/$script
done
# Restart the cockpit service
# systemctl daemon-reload
# systemctl restart cockpit.socket

View File

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<title>Docker Compose Status</title>
<meta charset="utf-8">
<link href="../base1/bootstrap.min.css" type="text/css" rel="stylesheet">
<script src="../base1/cockpit.js"></script>
<script src="../base1/jquery-3.7.1.min.js"></script>
</head>
<body>
<div class="container mt-5 mb-5">
<div class="row">
<div class="col-12">
<h2 class="fw-bold">Docker Compose</h2>
<p>Docker Compose page.</p>
<nav>
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link" href="docker-health.html">Docker Health Status</a>
</li>
<li class="nav-item">
<a class="nav-link" href="docker-compose.html">Docker Compose Editing</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<script src="docker-compose.js"></script>
</body>
</html>

View File

View File

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<title>Docker Health Status</title>
<meta charset="utf-8">
<link href="../base1/bootstrap.min.css" type="text/css" rel="stylesheet">
<script src="../base1/cockpit.js"></script>
<script src="../base1/jquery-3.7.1.min.js"></script>
</head>
<body>
<div class="container mt-5 mb-5">
<div class="row">
<div class="col-12">
<h2 class="fw-bold">Docker Health</h2>
<p>Docker Health page.</p>
<nav>
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link" href="docker-health.html">Docker Health Status</a>
</li>
<li class="nav-item">
<a class="nav-link" href="docker-compose.html">Docker Compose Editing</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<script src="docker-health.js"></script>
</body>
</html>

View File

@ -1,25 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Docker Configuration</title>
<meta charset="utf-8">
<link href="../base1/bootstrap.min.css" type="text/css" rel="stylesheet">
<script src="../base1/cockpit.js"></script>
<script src="../base1/jquery-3.7.1.min.js"></script>
</head>
<body>
<div class="container mt-5 mb-5">
<div class="row">
<div class="col-12">
<h2 class="fw-bold">Docker Configuration</h2>
<p>Docker Configuration page.</p>
</div>
</div>
</div>
<script src="docker.js"></script>
</body>
</html>

View File

@ -24,7 +24,7 @@
}, },
"Docker": { "Docker": {
"label": "Docker", "label": "Docker",
"path": "docker.html", "path": "docker-health.html",
"order": 3, "order": 3,
"keywords": [ "keywords": [
{ {