Skip to content

Commit

Permalink
feat: dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
mcharytoniuk committed Nov 19, 2024
1 parent a5aee3a commit 2b57767
Show file tree
Hide file tree
Showing 43 changed files with 2,306 additions and 447 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ indent_style = tab
[*.md]
trim_trailing_whitespace = false

[*.{css,scss,js,tf,ts,tsx,yml,yaml}]
[*.{css,scss,js,json,tf,ts,tsx,yml,yaml}]
indent_size = 2

[Dockerfile]
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*.db
/esbuild-meta.json
/godepgraph.png
/node_modules
/paddler
/paddler-bin-linux-x64
/snapshots
/static
/target
66 changes: 66 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ env_logger = "0.11.5"
futures = "0.3.31"
futures-util = { version = "0.3.31", features = ["tokio-io"] }
log = "0.4.22"
mime_guess = "2.0.5"
pingora = { version = "0.4.0", features = ["proxy"] }
pingora-core = "0.4.0"
pingora-proxy = "0.4.0"
pingora-runtime = "0.4.0"
ratatui = "0.29.0"
reqwest = { version = "0.12.9", features = ["json", "stream"] }
rust-embed = "8.5.0"
serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.132"
thiserror = "2.0.3"
Expand Down
60 changes: 60 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
.DEFAULT_GOAL := build

RUST_LOG ?= debug

# -----------------------------------------------------------------------------
# Real targets
# -----------------------------------------------------------------------------

node_modules: package-lock.json
npm install --from-lockfile
touch node_modules

# -----------------------------------------------------------------------------
# Phony targets
# -----------------------------------------------------------------------------

.PHONY: clean
clean:
rm -rf esbuild-meta.json
rm -rf node_modules
rm -rf target

.PHONY: esbuild
esbuild: node_modules
npm exec esbuild -- \
--bundle \
--asset-names="./[name]" \
--entry-names="./[name]" \
--format=esm \
--loader:.jpg=file \
--loader:.otf=file \
--loader:.svg=file \
--loader:.ttf=file \
--loader:.webp=file \
--metafile=esbuild-meta.json \
--minify \
--outdir=static \
--sourcemap \
--splitting \
--target=safari16 \
--tree-shaking=true \
resources/css/reset.css \
resources/css/page-dashboard.css \
resources/ts/controller_dashboard.tsx \
;

.PHONY: run.agent
run.agent: esbuild
cargo run -- agent \
--external-llamacp-addr "127.0.0.1:8081" \
--local-llamacpp-addr="http://localhost:8081" \
--local-llamacpp-api-key "test" \
--management-addr="http://localhost:8095" \
--name "wohoo"

.PHONY: run.balancer
run.balancer: esbuild
cargo run -- balancer \
--management-addr="127.0.0.1:8095" \
--reverseproxy-addr="127.0.0.1:8096"
1 change: 0 additions & 1 deletion management/.gitignore

This file was deleted.

Loading

0 comments on commit 2b57767

Please sign in to comment.