johhh .... ne....
This commit is contained in:
parent
1cdcd0581c
commit
43161272fd
|
|
@ -2,10 +2,11 @@
|
|||
<module type="EMPTY_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/Rust-Workers/src" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/Rust-Workers/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="jdk" jdkName="~/RustroverProjects/HomelabWatchdog/.venv" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
0
Cargo.lock → Rust-Workers/Cargo.lock
generated
0
Cargo.lock → Rust-Workers/Cargo.lock
generated
19
main.py
Normal file
19
main.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.widgets import Static, Button
|
||||
|
||||
|
||||
class WatchDogApp(App):
|
||||
"""A Textual app to manage servers."""
|
||||
CSS_PATH = "tui/tcss/main.tcss"
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Static("First column", classes="box")
|
||||
yield Static("Two", classes="box")
|
||||
yield Static("Three", classes="servers")
|
||||
yield Static("Four", classes="box")
|
||||
yield Static("Five", classes="box")
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = WatchDogApp()
|
||||
app.run()
|
||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
textual
|
||||
pymysql
|
||||
37
setup.sh
Normal file
37
setup.sh
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
VENV_DIR=".venv"
|
||||
REQ_FILE="requirements.txt"
|
||||
|
||||
echo "== Homelab Watchdog: Setup =="
|
||||
|
||||
# 1. venv erstellen, falls nicht vorhanden
|
||||
if [ ! -d "$VENV_DIR" ]; then
|
||||
echo "-> Erstelle virtuelle Umgebung in $VENV_DIR ..."
|
||||
python3 -m venv "$VENV_DIR"
|
||||
else
|
||||
echo "-> venv existiert bereits, überspringe."
|
||||
fi
|
||||
|
||||
# 2. venv aktivieren (nur innerhalb dieses Scripts)
|
||||
source "$VENV_DIR/bin/activate"
|
||||
|
||||
# 3. pip selbst aktualisieren
|
||||
pip install --upgrade pip
|
||||
|
||||
# 4. requirements.txt anlegen, falls nicht vorhanden
|
||||
if [ ! -f "$REQ_FILE" ]; then
|
||||
echo "-> Keine requirements.txt gefunden, erstelle Standard-Stückliste."
|
||||
cat > "$REQ_FILE" <<EOF
|
||||
textual
|
||||
pymysql
|
||||
EOF
|
||||
fi
|
||||
|
||||
# 5. Pakete installieren
|
||||
echo "-> Installiere Pakete aus $REQ_FILE ..."
|
||||
pip install -r "$REQ_FILE"
|
||||
|
||||
echo "== Setup fertig =="
|
||||
echo "Aktivieren mit: source $VENV_DIR/bin/activate"
|
||||
17
tui/tcss/main.tcss
Normal file
17
tui/tcss/main.tcss
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Screen {
|
||||
layout: grid;
|
||||
grid-size: 3 2;
|
||||
grid-columns: 1fr 1fr 0.5fr;
|
||||
grid-rows: 1fr 1fr;
|
||||
}
|
||||
|
||||
.box {
|
||||
height: 100%;
|
||||
border: solid green;
|
||||
}
|
||||
|
||||
.servers {
|
||||
row-span: 2;
|
||||
height: 100%;
|
||||
border: solid green;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user