Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update local index directory ui #1477

Merged
merged 4 commits into from
Jun 5, 2023
Merged
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
13 changes: 6 additions & 7 deletions react/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ import {Epoch} from "./Epoch";
import {LegacyDealDetail} from "./LegacyDealDetail"
import {SettingsPage} from "./Settings";
import {Banner} from "./Banner";
import {PieceDirectoryDetail, PieceDirectoryPage} from "./PieceDirectory";
import {ProposalLogsPage} from "./ProposalLogs";
import {InspectPage, InspectPiecePage} from "./Inspect";
import {PieceDoctorPage, InspectPiecePage, LIDPage} from "./LID";
import {RetrievalLogsPage} from "./RetrievalLogs";
import {RetrievalLogDetail} from "./RetrievalLogDetail";

Expand All @@ -46,20 +45,20 @@ function App(props) {
<Route path="/retrieval-logs/from/:cursor/page/:pageNum" element={<RetrievalLogsPage />} />
<Route path="/retrieval-logs/:peerID/:transferID" element={<RetrievalLogDetail />} />
<Route path="/storage-space" element={<StorageSpacePage />} />
<Route path="/lid" element={<LIDPage />} />
<Route path="/sealing-pipeline" element={<SealingPipelinePage />} />
<Route path="/funds" element={<FundsPage />} />
<Route path="/funds/from/:cursor/page/:pageNum" element={<FundsPage />} />
<Route path="/deal-publish" element={<DealPublishPage />} />
<Route path="/deal-transfers" element={<DealTransfersPage />} />
<Route path="/mpool" element={<MpoolPage />} />
<Route path="/settings" element={<SettingsPage />} />
<Route path="/piece-directory" element={<PieceDirectoryPage />} />
<Route path="/deals/:dealID" element={<DealDetail />} />
<Route path="/legacy-deals/:dealID" element={<LegacyDealDetail />} />
<Route path="/inspect" element={<InspectPage />} />
<Route path="/inspect/piece/:pieceCID" element={<InspectPiecePage />} />
<Route path="/inspect/from/:cursor/page/:pageNum" element={<InspectPage />} />
<Route path="/inspect/:query" element={<InspectPage />} />
<Route path="/piece-doctor" element={<PieceDoctorPage />} />
dirkmc marked this conversation as resolved.
Show resolved Hide resolved
<Route path="/piece-doctor/piece/:pieceCID" element={<InspectPiecePage />} />
<Route path="/piece-doctor/from/:cursor/page/:pageNum" element={<PieceDoctorPage />} />
<Route path="/piece-doctor/:query" element={<PieceDoctorPage />} />
<Route path="/" element={<StorageDealsPage />} />
</Routes>
</div>
Expand Down
8 changes: 6 additions & 2 deletions react/src/CumulativeBarChart.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global BigInt */
import {humanFIL, humanFileSize} from "./util";
import {addCommas, humanFIL, humanFileSize, isInteger} from "./util";
import React from "react";
import './CumulativeBarChart.css'

Expand Down Expand Up @@ -72,7 +72,11 @@ function amountToString(unit, amount) {
case 'attoFIL':
return humanFIL(amount)
default:
return amount.toString()
const amtStr = amount.toString()
if (isInteger(amtStr)) {
return addCommas(amtStr)
}
return amtStr
}
}

4 changes: 2 additions & 2 deletions react/src/DealDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function DealDetail(props) {
</tr>
<tr>
<th>Deal Data Root CID</th>
<td><Link to={'/inspect/'+deal.DealDataRoot}>{deal.DealDataRoot}</Link></td>
<td><Link to={'/piece-doctor/'+deal.DealDataRoot}>{deal.DealDataRoot}</Link></td>
</tr>
<tr>
<th>Verified</th>
Expand All @@ -162,7 +162,7 @@ export function DealDetail(props) {
</tr>
<tr>
<th>Piece CID</th>
<td><Link to={'/inspect/'+deal.PieceCid}>{deal.PieceCid}</Link></td>
<td><Link to={'/piece-doctor/'+deal.PieceCid}>{deal.PieceCid}</Link></td>
</tr>
<tr>
<th>Piece Size</th>
Expand Down
1 change: 0 additions & 1 deletion react/src/DealTransfers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {TransfersQuery, TransferStatsQuery} from "./gql";
import moment from "moment"
import {PageContainer} from "./Components";
import {Link} from "react-router-dom";
import {toFixed} from "./util";
import arrowLeftRightImg from './bootstrap-icons/icons/arrow-left-right.svg'
import './DealTransfers.css'

Expand Down
45 changes: 45 additions & 0 deletions react/src/LID.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.block-stats th {
text-align: left;
}

.block-stats td, .block-stats th {
padding: 0.5em 1em;
}

.lid-graphs {
margin-top: 2em;
width: 100%;
}

.lid-graphs td {
vertical-align: top;
}

.storage-chart {
padding: 1em;
}

.storage-chart .indexed, .storage-chart .unsealed, .storage-chart .active {
background-color: rgb(44, 123, 229);
}

.storage-chart .flagged {
background-color: rgb(166, 197, 247);
}

.storage-chart .sealed, .storage-chart .inactive {
background-color: #b3b3b3;
}

.storage-fields td {
padding: 0.5em 1em;
font-weight: normal;
}

.sectors-list-link p, .flagged-pieces-link p {
padding: 1em;
}

.sectors-list-link a, .flagged-pieces-link a {
margin-left: 1em;
}
Loading