-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: curioweb: Improve UX, add top menu (#11901)
* cfg edit 1 * jsonschema deps * feat: lp mig - first few steps * lp mig: default tasks * code comments * docs * lp-mig-progress * shared * comments and todos * fix: curio: rename lotus-provider to curio (#11645) * rename provider to curio * install gotext * fix lint errors, mod tidy * fix typo * fix API_INFO and add gotext to circleCI * add back gotext * add gotext after remerge * lp: channels doc * finish easy-migration TODOs * out generate * merging and more renames * avoid make-all * minor doc stuff * cu: make gen * make gen fix * make gen * tryfix * go mod tidy * minor ez migration fixes * ez setup - ui cleanups * better error message * guided setup colors * better path to saveconfigtolayer * loadconfigwithupgrades fix * readMiner oops * guided - homedir * err if miner is running * prompt error should exit * process already running, miner_id sectors in migration * dont prompt for language a second time * check miner stopped * unlock repo * render and sql oops * curio easyMig - some fixes * easyMigration runs successfully * lint * part 2 of last * message * merge addtl * fixing guided setup for myself * warn-on-no-post * EditorLoads * cleanups and styles * create info * fix tests * make gen * sector early bird * sectors v2 * sector termination v1 * terminate2 * mjs * minor things * flag bad sectors * fix errors * add dealweight and deals * change column width * ui looking better * cleanups * fix pipeline page * comments * curioweb: Add missing sector info file * curioweb: fix hapi root template --------- Co-authored-by: LexLuthr <[email protected]> Co-authored-by: LexLuthr <[email protected]> Co-authored-by: LexLuthr <[email protected]> Co-authored-by: Łukasz Magiera <[email protected]>
- Loading branch information
1 parent
445f1d4
commit 1a789d3
Showing
15 changed files
with
509 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,14 @@ | |
<head> | ||
<title>{{.PageTitle}}</title> | ||
<script src="https://unpkg.com/[email protected]" integrity="sha384-xcuj3WpfgjlKF+FXhSQFQ0ZNr39ln+hwjN3npfM9VBnUskLolQAcN80McRIVOPuO" crossorigin="anonymous"></script> | ||
<script type="module" src="chain-connectivity.js"></script> | ||
<script type="module" src="chain-connectivity.mjs"></script> | ||
<link rel="stylesheet" href="/main.css"> | ||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/build/web/hack-subset.css'> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg"> | ||
<script type="module" src="/ux/curio-ux.mjs"></script> | ||
</head> | ||
<body> | ||
<curio-ux> | ||
<div class="app-head"> | ||
<div class="head-left"> | ||
<h1>{{.PageTitle}}</h1> | ||
|
@@ -18,6 +20,7 @@ | |
<div class="page"> | ||
{{.Content}} | ||
</div> | ||
</curio-ux> | ||
</body> | ||
</html> | ||
{{end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{{define "sector_info"}} | ||
<h2>Sector {{.SectorNumber}}</h2> | ||
<div> | ||
<h3>PoRep Pipeline</h3> | ||
{{template "sector_porep_state" .PipelinePoRep}} | ||
</div> | ||
<div> | ||
<h3>Storage</h3> | ||
<table class="porep-state"> | ||
<tr> | ||
<th>Path Type</th> | ||
<th>File Type</th> | ||
<th>Path ID</th> | ||
<th>Host</th> | ||
</tr> | ||
{{range .Locations}} | ||
<tr> | ||
{{if .PathType}} | ||
<td rowspan="{{.PathTypeRowSpan}}">{{.PathType}}</td> | ||
{{end}} | ||
{{if .FileType}} | ||
<td rowspan="{{.FileTypeRowSpan}}">{{.FileType}}</td> | ||
{{end}} | ||
<td>{{(index .Locations 0).StorageID}}</td> | ||
<td>{{range (index .Locations 0).Urls}}<p>{{.}}</p>{{end}}</td> | ||
</tr> | ||
{{range $i, $loc := .Locations}} | ||
{{if gt $i 0}} | ||
<tr> | ||
<td>{{$loc.StorageID}}</td> | ||
<td>{{range $loc.Urls}}<p>{{.}}</p>{{end}}</td> | ||
</tr> | ||
{{end}} | ||
{{end}} | ||
{{end}} | ||
</table> | ||
</div> | ||
<div> | ||
<h3>Tasks</h3> | ||
<table class="porep-state"> | ||
<tr> | ||
<th>Task Type</th> | ||
<th>Task ID</th> | ||
<th>Posted</th> | ||
<th>Worker</th> | ||
</tr> | ||
{{range .Tasks}} | ||
<tr> | ||
<td>{{.Name}}</td> | ||
<td>{{.ID}}</td> | ||
<td>{{.SincePosted}}</td> | ||
<td>{{if ne nil .OwnerID}}<a href="/hapi/node/{{.OwnerID}}">{{.Owner}}</a>{{end}}</td> | ||
</tr> | ||
{{end}} | ||
</table> | ||
</div> | ||
{{end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,19 +22,6 @@ window.customElements.define('chain-connectivity', class MyElement extends LitEl | |
:host { | ||
box-sizing: border-box; /* Don't forgert this to include padding/border inside width calculation */ | ||
} | ||
table { | ||
border-collapse: collapse; | ||
} | ||
table td, table th { | ||
border-left: 1px solid #f0f0f0; | ||
padding: 1px 5px; | ||
} | ||
table tr td:first-child, table tr th:first-child { | ||
border-left: none; | ||
} | ||
.success { | ||
color: green; | ||
} | ||
|
@@ -47,7 +34,9 @@ window.customElements.define('chain-connectivity', class MyElement extends LitEl | |
`]; | ||
} | ||
render = () => html` | ||
<table> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="/ux/main.css"> | ||
<table class="table table-dark"> | ||
<thead> | ||
<tr> | ||
<th>RPC Address</th> | ||
|
@@ -60,8 +49,8 @@ window.customElements.define('chain-connectivity', class MyElement extends LitEl | |
${this.data.map(item => html` | ||
<tr> | ||
<td>${item.Address}</td> | ||
<td>${item.Reachable ? html`<span class="success">ok</span>` : html`<span class="error">FAIL</span>`}</td> | ||
<td>${item.SyncState === "ok" ? html`<span class="success">ok</span>` : html`<span class="warning">${item.SyncState}</span>`}</td> | ||
<td>${item.Reachable ? html`<span class="alert alert-success">ok</span>` : html`<span class="alert altert-danger">FAIL</span>`}</td> | ||
<td>${item.SyncState === "ok" ? html`<span class="alert alert-success">ok</span>` : html`<span class="alert alert-warning">${item.SyncState}</span>`}</td> | ||
<td>${item.Version}</td> | ||
</tr> | ||
`)} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,13 @@ | |
<html> | ||
<head> | ||
<title>JSON Schema Editor</title> | ||
<script type="module" src="/ux/curio-ux.mjs"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.21.1/axios.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@json-editor/json-editor@latest/dist/jsoneditor.min.js"></script> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> <link href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/themes/base/jquery-ui.min.css" rel="stylesheet"> | ||
<link href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/themes/ui-darkness/jquery-ui.min.css" rel="stylesheet"> | ||
<link href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/themes/ui-darkness/theme.min.css" rel="stylesheet"> | ||
</head> | ||
<body> | ||
<body style="visibility: hidden;"> | ||
<style> | ||
#saveButton { | ||
display: block; | ||
|
@@ -61,8 +61,18 @@ | |
.show { | ||
display: block; | ||
} | ||
</style> | ||
|
||
/* Fix for dark mode */ | ||
.card.bg-light { | ||
background-color: rgb(11, 22, 34) !important; | ||
} | ||
input.form-control { | ||
background: #111; | ||
color: white; | ||
font-weight: bold; | ||
} | ||
</style> | ||
<curio-ux> | ||
<section class="section container-fluid implementations"> | ||
<div class="row justify-content-center content"> | ||
<div class="col-md-8"> | ||
|
@@ -145,6 +155,6 @@ | |
</script> | ||
</div> | ||
</div> | ||
</section> | ||
</section></curio-ux> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.