Skip to content

Commit

Permalink
fix margin, menu on left
Browse files Browse the repository at this point in the history
  • Loading branch information
LexLuthr committed Mar 5, 2025
1 parent 449c3db commit d358179
Show file tree
Hide file tree
Showing 20 changed files with 252 additions and 251 deletions.
8 changes: 0 additions & 8 deletions web/api/webrpc/sector.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package webrpc

import (
"context"
"fmt"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -194,8 +193,6 @@ func (a *WebRPC) SectorInfo(ctx context.Context, sp string, intid int64) (*Secto
return nil, xerrors.Errorf("invalid sp")
}

fmt.Println("SPID", spid)

si := &SectorInfo{
SpID: spid,
Miner: maddr.String(),
Expand Down Expand Up @@ -226,10 +223,6 @@ func (a *WebRPC) SectorInfo(ctx context.Context, sp string, intid int64) (*Secto
return nil, xerrors.Errorf("failed to fetch pipeline task info: %w", err)
}

if len(tasks) == 0 {
fmt.Println("NO PIPELINE")
}

// Fetch SnapDeals pipeline data
var snapTasks []SnapPipelineTask

Expand Down Expand Up @@ -265,7 +258,6 @@ func (a *WebRPC) SectorInfo(ctx context.Context, sp string, intid int64) (*Secto

var sle *sectorListEntry
if len(tasks) > 0 {
fmt.Println("FOUND THE PIPELINE")
task := tasks[0]
if task.PreCommitMsgCid != nil {
si.PreCommitMsg = *task.PreCommitMsgCid
Expand Down
301 changes: 151 additions & 150 deletions web/static/config/edit.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/static/gc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<body style="visibility:hidden" data-bs-theme="dark">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<section class="section">
<div class="row">
<h1>Storage GC Info</h1>
Expand Down
2 changes: 1 addition & 1 deletion web/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</head>
<body style="visibility:hidden">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<div class="row">
<div class="col-md-auto" style="max-width: 1000px">
<div class="info-block">
Expand Down
2 changes: 1 addition & 1 deletion web/static/pages/actor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body style="visibility:hidden" data-bs-theme="dark">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<section class="section">
<div class="row">
<h1>Miner Info</h1>
Expand Down
2 changes: 1 addition & 1 deletion web/static/pages/ipni/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</head>
<body style="visibility:hidden; background:rgb(11, 22, 34)" data-bs-theme="dark">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<section class="section">
<div class="row">
<h1>IPNI</h1>
Expand Down
2 changes: 1 addition & 1 deletion web/static/pages/market-settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</head>
<body style="visibility:hidden; background:rgb(11, 22, 34)" data-bs-theme="dark">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<section class="section">
<div class="row">
<h1>Market Setting</h1>
Expand Down
2 changes: 1 addition & 1 deletion web/static/pages/market/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</head>
<body style="visibility:hidden; background:rgb(11, 22, 34)" data-bs-theme="dark">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<section class="section" style="padding-bottom: 50px">
<div class="row">
<h1>Storage Market</h1>
Expand Down
2 changes: 1 addition & 1 deletion web/static/pages/mk12-deal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<body style="visibility:hidden" data-bs-theme="dark">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<section class="section">
<div class="row">
<div class="col-md-auto" style="max-width: 95%">
Expand Down
2 changes: 1 addition & 1 deletion web/static/pages/mk12-deals/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</head>
<body style="visibility:hidden; background:rgb(11, 22, 34)" data-bs-theme="dark">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<section class="section">
<div class="row">
<h1>Storage Deals</h1>
Expand Down
2 changes: 1 addition & 1 deletion web/static/pages/node_info/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>
<body style="visibility:hidden; background:rgb(11, 22, 34)" data-bs-theme="dark">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<section class="section">
<div class="row">
<h1>Node Info</h1>
Expand Down
2 changes: 1 addition & 1 deletion web/static/pages/piece/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>
<body style="visibility:hidden; background:rgb(11, 22, 34)" data-bs-theme="dark">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<section class="section">
<div class="row">
<h1>Piece Info</h1>
Expand Down
77 changes: 39 additions & 38 deletions web/static/pages/pipeline_porep/index.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
<html>
<head>
<title>Curio PoRep Pipeline</title>
<script src="https://unpkg.com/[email protected]" integrity="sha384-xcuj3WpfgjlKF+FXhSQFQ0ZNr39ln+hwjN3npfM9VBnUskLolQAcN80McRIVOPuO" crossorigin="anonymous"></script>
<script type="module" src="/ux/curio-ux.mjs"></script>
<script type="module" src="/ux/components/Drawer.mjs"></script>
<script type="module" src="/chain-connectivity.mjs"></script>
<script type="module" src="pipeline-porep-sectors.mjs"></script>
<script type="module" src="restart-all-button.mjs"></script>
<link rel="stylesheet" href="/ux/main.css">
</head>
<body style="visibility: hidden">
<curio-ux>
<div class="page">
<div class="app-head">
<div class="head-left">
<h1>Curio PoRep Pipeline</h1>
</div>
<hr/>
</div>
<div class="row">
<div class="row-md-auto" style="width: 50%">
<div class="info-block">
<restart-all-button></restart-all-button>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Curio PoRep Pipeline</title>
<script src="https://unpkg.com/[email protected]" integrity="sha384-xcuj3WpfgjlKF+FXhSQFQ0ZNr39ln+hwjN3npfM9VBnUskLolQAcN80McRIVOPuO" crossorigin="anonymous"></script>
<script type="module" src="/ux/curio-ux.mjs"></script>
<script type="module" src="/ux/components/Drawer.mjs"></script>
<script type="module" src="/chain-connectivity.mjs"></script>
<script type="module" src="pipeline-porep-sectors.mjs"></script>
<script type="module" src="restart-all-button.mjs"></script>
<link rel="stylesheet" href="/ux/main.css">
</head>
<body style="visibility: hidden">
<curio-ux>
<div class="page" style="margin-left: 20px; margin-right: 10px">
<div class="app-head">
<div class="head-left">
<h1>Curio PoRep Pipeline</h1>
</div>
<hr/>
</div>
<div class="row">
<div class="row-md-auto" style="width: 50%">
<div class="info-block">
<restart-all-button></restart-all-button>
</div>
</div>
</div>
<div class="row">
<div class="row-md-auto" style="width: 50%">
<div class="info-block">
<h2>Sectors</h2>
<pipeline-porep-sectors></pipeline-porep-sectors>
</div>
</div>
<div class="row-md-auto"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="row-md-auto" style="width: 50%">
<div class="info-block">
<h2>Sectors</h2>
<pipeline-porep-sectors></pipeline-porep-sectors>
</div>
</div>
<div class="row-md-auto"></div>
</div>
</div>
</curio-ux>
</body>
</curio-ux>
</body>
</html>
2 changes: 1 addition & 1 deletion web/static/pages/sector/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>
<body style="visibility:hidden; background:rgb(11, 22, 34)" data-bs-theme="dark">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<section class="section">
<div class="row">
<h1>Sector Info</h1>
Expand Down
2 changes: 1 addition & 1 deletion web/static/pages/task/id/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body style="visibility:hidden" data-bs-theme="dark">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<h1>Task Details</h1>
<section class="section">
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion web/static/pages/task/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<body style="visibility:hidden" data-bs-theme="dark">
<curio-ux>
<div class="page">
<div class="page" style="margin-left: 20px; margin-right: 10px">
<section class="section">
<div class="row">
<h1>Task Details</h1>
Expand Down
2 changes: 1 addition & 1 deletion web/static/sector/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<curio-ux>
<section class="section container-fluid">
<div class="row justify-content-center content">
<div class="col-md-auto" style="max-width: 95%">
<div class="col-md-auto" style="max-width: 99%">
<table id="sectorTable" class="hover">
<thead>
<tr>
Expand Down
66 changes: 33 additions & 33 deletions web/static/snap/index.html
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<title>Upgrade Pipeline</title>
<script type="module" src="/ux/curio-ux.mjs"></script>
<script type="module" src="/ux/components/Drawer.mjs"></script>
<script type="module" src="upgrade-sectors.mjs"></script>
<script type="module" src="restart-all-snap-button.mjs"></script>
</head>

<head>
<title>Upgrade Pipeline</title>
<script type="module" src="/ux/curio-ux.mjs"></script>
<script type="module" src="/ux/components/Drawer.mjs"></script>
<script type="module" src="upgrade-sectors.mjs"></script>
<script type="module" src="restart-all-snap-button.mjs"></script>
</head>

<body style="visibility:hidden" data-bs-theme="dark">
<curio-ux>
<section class="section">
<div class="app-head">
<div class="head-left">
<h1>Upgrading Sectors</h1>
</div>
<hr />
</div>
<div class="row">
<div class="row-md-auto" style="width: 50%">
<div class="info-block">
<restart-all-snap-button></restart-all-snap-button>
</div>
<body style="visibility:hidden" data-bs-theme="dark">
<curio-ux>
<div class="page" style="margin-left: 20px; margin-right: 10px">
<section class="section">
<div class="app-head">
<div class="head-left">
<h1>Upgrading Sectors</h1>
</div>
<hr />
</div>
<div class="row">
<div class="row-md-auto" style="width: 50%">
<div class="info-block">
<restart-all-snap-button></restart-all-snap-button>
</div>
</div>
</div>
<div class="row">
<div class="col-md-auto" style="max-width: 95%">
<upgrade-sectors></upgrade-sectors>
</div>
</div>
</section>
</div>
</div>
<div class="row">
<div class="col-md-auto" style="max-width: 95%">
<upgrade-sectors></upgrade-sectors>
</div>
</div>
</section>

</curio-ux>
</body>
</curio-ux>
</body>

</html>
4 changes: 2 additions & 2 deletions web/static/ux/components/Drawer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Drawer.styles = [
color: var(--color-text-primary);
background-color: var(--color-secondary-light);
border-radius: 8px 8px 0 0;
padding: 0.75rem 1.2rem;
padding: 0.5rem 0.75rem;
font-size: 0.9rem;
&[anchor="right"] {
Expand All @@ -125,7 +125,7 @@ Drawer.styles = [
}
&[anchor="left"] {
top: 30%;
top: 40%;
left: 0;
transform: rotate(90deg);
transform-origin: bottom left;
Expand Down
19 changes: 13 additions & 6 deletions web/static/ux/curio-ux.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class CurioUX extends LitElement {
<path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm15 2h-4v3h4V4zm0 4h-4v3h4V8zm0 4h-4v3h3a1 1 0 0 0 1-1v-2zm-5 3v-3H6v3h4zm-5 0v-3H1v2a1 1 0 0 0 1 1h3zm-4-4h4V8H1v3zm0-4h4V4H1v3zm5-3v3h4V4H6zm4 4H6v3h4V8z"></path>
</symbol>
</svg>
<ui-drawer class="drawer" anchor="left" label="Menu" isOpen="false">
<ui-drawer class="drawer" anchor="left" label="Menu">
<div slot="content">
<div class="d-flex flex-column flex-shrink-0 p-3 text-white" style="width: 240px; min-height:100vh; margin-right: 1rem; background-color: #2a2a2e;">
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-white text-decoration-none">
Expand Down Expand Up @@ -216,13 +216,20 @@ class CurioUX extends LitElement {
firstUpdated() {
super.firstUpdated();

// Select the drawer and set `isOpen = false`
const drawer = this.shadowRoot.querySelector('.drawer');
if (drawer) {
drawer.isOpen = false; // Ensure it starts closed
}
setTimeout(() => {
// Target only the menu drawer inside curio-ux's shadow root
const menuDrawer = this.shadowRoot.querySelector('ui-drawer[anchor="left"]');

if (menuDrawer) {
menuDrawer.isOpen = false; // Ensure only menu starts closed
console.log("Menu drawer found and set to closed");
} else {
console.warn("Menu drawer not found inside curio-ux");
}
}, 100);
}


};

customElements.define('curio-ux', CurioUX);

0 comments on commit d358179

Please sign in to comment.