Mita
Mita, named as Multi-Tangled, is a web application for monitoring runtime status and data of multiple machines (clients).
Demo: https://mita-demo.controlnet.space
Get Started
Run Server
The server is used to accept client post data and host the web UI.
Docker
Environment Variables
MITA_PASSWORD
: Password for admin accessing the api and web for read/write.MITA_GUEST_PASSWORD
: Password for guest accessing the api and web for read only.REACT_APP_PASSWORD
: Optional, set the default password for the frontend.MITA_SECRET_KEY
: Optional, Server secret key for CRSF token.MITA_TOKEN_SECRET
: Optional, Server secret key for JWT authentication token.
Run Client
The client is the interface to post data to the server.
A Python client and a Rust CLI are included in this repository.
Python Client
Install the client from pypi:
Use the tqdm integrated client (require tqdm
for progress bar):
Use the fully client:
# initialize components
=
=
=
=
=
# register components to view
# update data in the runtime, and post to the client
CLI App (Rust-based)
Build the Rust CLI from source:
Authenticate with a Mita server (falls back to MITA_ADDRESS
and MITA_PASSWORD
when flags are omitted):
Tokens are stored in ~/.mita.json
per server URL.
Push updates (falls back to MITA_ADDRESS
and MITA_PASSWORD
when flags are omitted):
# examples
Rust Client Library
Add the crate to your Cargo.toml
:
# enable "progress" and "log" features if needed
= { = "0.0.0", = ["progress", "log"] } # check crates.io for the latest version
Use the library in your Rust application:
use ;
Simple CLI demo
#!/bin/bash
MITA_CLI="./target/release/mita" # the default cargo build directory, or anywhere you put the executable
VIEW_NAME="cli-test"
COMP_NAME="progress-loop"
TOTAL=100
URL= # your mita server address
PASSWORD= # your password
# auth on first run
# loop
for; do
done
License
Module | License |
---|---|
server | AGPL |
python client | MIT |
rust client | MIT |