Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint-workflow-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run: |
curl -sfL https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash | bash -s -- latest ${{ github.workspace }}
- name: Run actionlint
run: ${{ github.workspace }}/actionlint -ignore 'label ".+" is unknown'
run: ${{ github.workspace }}/actionlint -ignore 'label ".+" is unknown' -ignore '"false" is always evaluated to false.'
env:
# Part of what actionlint does under the hood is to use the Shellcheck tool to lint against where we use the run field to specify shell commands to run.
# Silence the following shellcheck errors since they are not too applicable.
Expand Down
42 changes: 36 additions & 6 deletions rust/lit-node/lit-node-monitor/Cargo.lock

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

3 changes: 3 additions & 0 deletions rust/lit-node/lit-node-monitor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ naga-dev = []
naga-test = []
naga-staging = []
naga-prod = []
naga-proto = []
naga-all = []
internalDev = []

[dependencies]
chrono = "0.4.36"
chrono-tz = "0.10.4"
codee = "0.3.0"
lit-blockchain-lite = { path = "../../lit-core/lit-blockchain-lite" }
ethers = { version = "2" }
Expand Down Expand Up @@ -47,6 +49,7 @@ uuid = "1.11.0"
tokio = { version = "1.40.0", default-features = false, features = ["macros"] }
serde_bytes_base64 = "0.1.1"
yaml-rust2 = "0.10.3"
web-sys = "0.3"


[package.metadata.leptos]
Expand Down
3 changes: 3 additions & 0 deletions rust/lit-node/lit-node-monitor/build_all_naga.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ trunk build --release --features="naga-prod" --public-url "https://lit-protocol.
echo "Building naga-dev"
trunk build --release --features="naga-dev" --public-url "https://lit-protocol.github.io/monitor/naga-dev/" --dist="naga-dev"

echo "Building naga-proto"
trunk build --release --features="naga-proto" --public-url "https://lit-protocol.github.io/monitor/naga-proto/" --dist="naga-proto"

echo "Building naga-staging"
trunk build --release --features="naga-staging" --public-url "https://lit-protocol.github.io/monitor/naga-staging/" --dist="naga-staging"

Expand Down
2 changes: 1 addition & 1 deletion rust/lit-node/lit-node-monitor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<link data-trunk rel="css" href="style.css">
</head>
<link data-trunk rel="inline" href="/public/redirect.js" />
<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" data-bin="lit-node-monitor" data-type="main" />
<link data-trunk rel="copy-dir" href="/public/images"/>
<!-- <link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" data-bin="worker" data-type="worker" /> -->
<body></body>
</html>
17 changes: 17 additions & 0 deletions rust/lit-node/lit-node-monitor/public/redirect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Single Page Apps for GitHub Pages Helper -> https://github.com/rafgraph/spa-github-pages
(function (l) {
if (l.search[1] === '/') {
var decoded = l.search
.slice(1)
.split('&')
.map(function (s) {
return s.replace(/~and~/g, '&');
})
.join('?');
window.history.replaceState(
null,
null,
l.pathname.slice(0, -1) + decoded + l.hash
);
}
})(window.location);
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn BottomModal(
"x"
</Button>
</DrawerHeaderTitleAction>
<h6>{ move ||title.get() }</h6>
<h6 class="text-center">{ move ||title.get() }</h6>
</DrawerHeaderTitle>
</DrawerHeader>
<DrawerBody>
Expand Down
3 changes: 3 additions & 0 deletions rust/lit-node/lit-node-monitor/src/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ pub mod nav_menu;
pub mod network_status;
pub mod network_status_at_block;
pub mod quick_functions;
pub mod right_drawer;
pub mod toast;
pub mod validator_details;
pub mod validator_handshake;
16 changes: 14 additions & 2 deletions rust/lit-node/lit-node-monitor/src/components/nav_menu.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
use crate::models::GlobalState;
use crate::{models::GlobalState, utils::base_path};
use leptos::prelude::*;
use thaw::{NavCategory, NavCategoryItem, NavDrawer, NavItem, NavSubItem};
use web_sys::window;

#[component]
pub fn NavMenu(page_name_signal: RwSignal<String>) -> impl IntoView {
let nav_value = RwSignal::new("/home".to_string());
let url = window()
.and_then(|win| win.location().pathname().ok())
.unwrap_or_else(|| "home".to_string());
let url = url.replace(base_path(), "");

let nav_value = RwSignal::new(url);
let (nav_value_get, _nav_value_set) = nav_value.split();

let gs = use_context::<GlobalState>().expect("Global State Failed to Load");
Expand Down Expand Up @@ -32,6 +38,9 @@ pub fn NavMenu(page_name_signal: RwSignal<String>) -> impl IntoView {
<NavItem icon=icondata::AiLinkOutlined value="/history">
"History"
</NavItem>
<NavItem icon=icondata::AiClockCircleOutlined value="/status_at_time">
"Status At Time"
</NavItem>
<NavItem value="/pkps" icon=icondata::AiKeyOutlined>
"PKPs"
</NavItem>
Expand All @@ -51,6 +60,9 @@ pub fn NavMenu(page_name_signal: RwSignal<String>) -> impl IntoView {
<NavSubItem value="/network_configuration" icon=icondata::AiSettingOutlined>
"Network Configuration"
</NavSubItem>
<NavSubItem value="/pricing" icon=icondata::AiDollarOutlined>
"Pricing"
</NavSubItem>
<NavSubItem value="/epoch" icon=icondata::AiClockCircleOutlined>
"Epoch Details"
</NavSubItem>
Expand Down
Loading
Loading