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

feat(coretime): add Overview page #10383

Open
wants to merge 66 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
086e5b8
added overview page
bee344 Mar 22, 2024
eca60ec
sanitized task
bee344 Mar 25, 2024
0b858c1
added workplan table
bee344 Mar 26, 2024
2375c96
staged missing files
bee344 Mar 26, 2024
a5be44f
updated filters
bee344 Apr 3, 2024
e7eabac
fixed some types
bee344 Apr 3, 2024
ac0c3cd
updated mask graph
bee344 Apr 3, 2024
1b93bc1
copyright
bee344 Apr 4, 2024
c72d69a
linting
bee344 Apr 4, 2024
63635f8
install
bee344 Apr 4, 2024
cbb8420
merge master
bee344 Apr 4, 2024
d3c199a
Merge branch 'master' into anp-coretime-overview
bee344 Apr 11, 2024
db64a22
added relay overview
bee344 Apr 15, 2024
4c2b57f
Merge branch 'master' into anp-coretime-overview
bee344 Apr 15, 2024
b1147f5
linting
bee344 Apr 15, 2024
385eee8
refactoring hooks
bee344 Apr 15, 2024
d467f5c
translations
bee344 Apr 15, 2024
ccaaccb
Merge branch 'master' into anp-coretime-overview
bee344 Apr 15, 2024
bd267f7
updated coretime deps
bee344 Apr 15, 2024
db3ac4c
updated tsconfig
bee344 Apr 15, 2024
3eb6a37
fixed build
bee344 Apr 15, 2024
39c1d5a
root tsconfig
bee344 Apr 15, 2024
a56c8b1
fix tsconfig
bee344 Apr 15, 2024
13b3bd3
app-coretime and app-broker
bee344 Apr 16, 2024
7d154ca
filter bug fix
bee344 Apr 16, 2024
8e59a15
prettied mask bar
bee344 Apr 16, 2024
32e60c1
master merge
bee344 Apr 16, 2024
0eb5652
updated deps
bee344 Apr 16, 2024
75a1440
updated deps broker
bee344 Apr 17, 2024
6d65635
Merge branch 'master' into anp-coretime-overview
bee344 May 24, 2024
ebc82d3
merge master
bee344 May 27, 2024
1e0f226
removed TS filter and added graph
bee344 May 28, 2024
3943937
linting
bee344 May 30, 2024
b647750
fixed headers
bee344 May 30, 2024
a56d3a3
fixed filter
bee344 May 30, 2024
a41ada8
updated coretime summary
bee344 May 30, 2024
625751e
updated relay tables
bee344 May 30, 2024
f18502d
fixed bulk price display
bee344 Jun 5, 2024
366a5e6
updated regions
bee344 Jun 6, 2024
f80a5a9
styling
bee344 Jun 10, 2024
c631fa2
fixed pallet version mismaatch info
bee344 Jun 11, 2024
997a62a
fixed expand button
bee344 Jun 11, 2024
7a1a310
fixed alignment issues
bee344 Jun 11, 2024
97149e6
merge master
bee344 Jun 13, 2024
ce51e82
yarn install
bee344 Jun 13, 2024
1f14531
integrated some suggestions
bee344 Jun 13, 2024
ed89520
linting
bee344 Jun 24, 2024
93bdae3
Merge branch 'master' into anp-coretime-overview
bee344 Jun 24, 2024
1652b82
updated version
bee344 Jun 24, 2024
d003706
Fix Header on table
TarikGul Jul 16, 2024
47381de
Small nit around naming
TarikGul Jul 17, 2024
60da07a
Usage bar console err fix: NaN
piggydoughnut Aug 16, 2024
47c17e3
rearranged the layout for page broker on Coretime chain, changed Usag…
piggydoughnut Sep 2, 2024
12fda8d
filtering parachains by id
piggydoughnut Sep 3, 2024
828c1a4
moved a type to a seprate type file
piggydoughnut Sep 3, 2024
265efe6
skip build and npm
piggydoughnut Sep 3, 2024
3c065b1
generated locales
piggydoughnut Sep 3, 2024
e7e058e
added default ui colours to test chains and kusama
piggydoughnut Sep 3, 2024
e12c632
abstracted logic from the rendering
piggydoughnut Sep 3, 2024
eab6e68
default ui highlight fallback
piggydoughnut Sep 3, 2024
75b3362
table responsive - hiding timeslice info from the rows on mobile
piggydoughnut Sep 4, 2024
47ee3dd
Merge branch 'master' into anp-coretime-overview
piggydoughnut Sep 4, 2024
dac3a51
version updates for react-components and react-query
piggydoughnut Sep 4, 2024
36f4365
exporting defaultHighlight
piggydoughnut Sep 4, 2024
c4b6627
responsive summary
piggydoughnut Sep 4, 2024
8e1fd05
small fix for workplan filtering
piggydoughnut Sep 5, 2024
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
6 changes: 6 additions & 0 deletions packages/apps-config/src/api/typesBundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59612,6 +59612,12 @@ export const typesBundle = {
"SealV0": "(u64, Signature)",
"Seal": "(ConsensusEngineId, Bytes)",
"Consensus": "(ConsensusEngineId, Bytes)",
"ExtrinsicInclusionMode": {
TarikGul marked this conversation as resolved.
Show resolved Hide resolved
"_enum": [
"AllExtrinsics",
"OnlyInherents"
]
},
"BeefyKey": "[u8; 33]",
"Keys": "SessionKeys2",
"SessionKeys1": "(AccountId)",
Expand Down
23 changes: 23 additions & 0 deletions packages/apps-routing/src/coretime.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2017-2024 @polkadot/apps-routing authors & contributors
// SPDX-License-Identifier: Apache-2.0

import type { Route, TFunction } from './types.js';

import Component from '@polkadot/app-coretime';

export default function create (t: TFunction): Route {
return {
Component,
display: {
needsApi: [
['query.broker.status',
'query.coretimeAssignmentProvider.coreDescriptors']
],
needsApiInstances: true
},
group: 'network',
icon: 'calendar-clock',
name: 'coretime',
text: t('nav.coretime', 'Coretime (Experimental)', { ns: 'app-coretime' })
};
}
2 changes: 2 additions & 0 deletions packages/apps-routing/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import calendar from './calendar.js';
import claims from './claims.js';
import collator from './collator.js';
import contracts from './contracts.js';
import coretime from './coretime.js';
import council from './council.js';
import democracy from './democracy.js';
import explorer from './explorer.js';
Expand Down Expand Up @@ -57,6 +58,7 @@ export default function create (t: TFunction): Routes {
staking(t),
staking2(t),
collator(t),
coretime(t),
// governance v2
referenda(t),
membership(t),
Expand Down
1 change: 1 addition & 0 deletions packages/apps-routing/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{ "path": "../page-bounties/tsconfig.build.json" },
{ "path": "../page-calendar/tsconfig.build.json" },
{ "path": "../page-claims/tsconfig.build.json" },
{ "path": "../page-coretime/tsconfig.build.json" },
{ "path": "../page-collator/tsconfig.build.json" },
{ "path": "../page-contracts/tsconfig.build.json" },
{ "path": "../page-council/tsconfig.build.json" },
Expand Down
27 changes: 27 additions & 0 deletions packages/apps/public/locales/en/app-coretime.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"All active/available cores": "All active/available cores",
"All available slices": "All available slices",
"All scehduled cores": "All scehduled cores",
"No core description found": "No core description found",
"No workload found": "No workload found",
"No workplan found": "No workplan found",
"Overview": "Overview",
"assignment": "assignment",
"broker Id": "broker Id",
"core": "core",
"core count": "core count",
"current timeslice": "current timeslice",
"current work": "current work",
"mask": "mask",
"nav.coretime": "Coretime",
"next index": "next index",
"pool size": "pool size",
"selected core for workload": "selected core for workload",
"selected core for workplan": "selected core for workplan",
"selected timeslice": "selected timeslice",
"timeslice": "timeslice",
"traffic": "traffic",
"work queue": "work queue",
"workload": "workload",
"workplan": "workplan"
}
1 change: 1 addition & 0 deletions packages/apps/public/locales/en/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"app-claims.json",
"app-collator.json",
"app-contracts.json",
"app-coretime.json",
"app-council.json",
"app-democracy.json",
"app-explorer.json",
Expand Down
23 changes: 23 additions & 0 deletions packages/apps/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@
"Addresses": "",
"Advanced creation options": "",
"After delay": "",
"All active/available cores": "",
"All active/available tracks": "",
"All available slices": "",
"All bags": "",
"All pools": "",
"All rewards will go towards the selected output destination when a payout is made.": "",
"All scehduled cores": "",
"All stashes": "",
"All the listed validators and all their nominators will receive their rewards.": "",
"All validators": "",
Expand Down Expand Up @@ -428,6 +431,7 @@
"No committee proposals": "",
"No completed campaigns found": "",
"No contracts available": "",
"No core description found": "",
"No council motions": "",
"No discretionary lock-voting is in place; all DOT used to vote counts the same.": "",
"No documentation provided": "",
Expand Down Expand Up @@ -463,6 +467,8 @@
"No waiting validators found": "",
"No websites": "",
"No winners in this auction": "",
"No workload found": "",
"No workplan found": "",
"No, block all nominations": "",
"Node info": "",
"Nominate": "",
Expand Down Expand Up @@ -1162,6 +1168,7 @@
"asset name": "",
"asset symbol": "",
"assets": "",
"assignment": "",
"at specific block": "",
"auctions": "",
"available signatories": "",
Expand Down Expand Up @@ -1202,6 +1209,7 @@
"bounty remark": "",
"bounty requested allocation": "",
"bounty title": "",
"broker Id": "",
"bytes": "",
"bytes transferred": "",
"calculated storage fee": "",
Expand Down Expand Up @@ -1259,6 +1267,8 @@
"conviction": "",
"conviction: Conviction": "",
"copied": "",
"core": "",
"core count": "",
"council candidates": "",
"council proposal type": "",
"count": "",
Expand All @@ -1282,7 +1292,9 @@
"current range winning bid": "",
"current support (failing)": "",
"current support (passing)": "",
"current timeslice": "",
"current value": "",
"current work": "",
"currently elected": "",
"custom endpoint": "",
"decision deposit": "",
Expand Down Expand Up @@ -1470,6 +1482,7 @@
"logs": "",
"lowest / avg staked": "",
"manage hardware connections": "",
"mask": "",
"matches": "",
"max": "",
"max ProofSize allowed": "",
Expand Down Expand Up @@ -1518,6 +1531,7 @@
"next": "",
"next action": "",
"next burn": "",
"next index": "",
"no": "",
"no addresses saved yet, add any existing address": "",
"no name": "",
Expand Down Expand Up @@ -1570,6 +1584,7 @@
"period": "",
"points": "",
"pool id": "",
"pool size": "",
"pools": "",
"pot": "",
"preimage": "",
Expand Down Expand Up @@ -1654,8 +1669,11 @@
"seed (hex or string)": "",
"select curator": "",
"selected constant query": "",
"selected core for workload": "",
"selected core for workplan": "",
"selected signatories": "",
"selected state query": "",
"selected timeslice": "",
"selected track": "",
"selected validators": "",
"send": "",
Expand Down Expand Up @@ -1728,6 +1746,7 @@
"the supplied signature": "",
"threshold": "",
"timeout": "",
"timeslice": "",
"tip": "",
"tip amount": "",
"tip reason": "",
Expand All @@ -1750,6 +1769,7 @@
"total sub": "",
"total transferrable": "",
"track origin": "",
"traffic": "",
"transactions": "",
"transfer asset": "",
"transfer received": "",
Expand Down Expand Up @@ -1834,6 +1854,9 @@
"with an index of": "",
"with capacity": "",
"with weight override": "",
"work queue": "",
"workload": "",
"workplan": "",
"yes": "",
"yesterday": "",
"your current password": "",
Expand Down
21 changes: 21 additions & 0 deletions packages/apps/public/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
"Address Prefix": "Título de la dirección",
"Adjust the mode from basic (with a limited number of beginner-user-friendly apps) to full (with all basic & advanced apps available)": "Ajustar el modo desde lo básico (con un número limitado de aplicaciones para principiantes) a lo más completo (con todas las aplicaciones básicas y avanzadas disponibles)",
"Advanced creation options": "Opciones avanzadas para la creación",
"All active/available cores": "Todos los núcleos activos/disponibles",
"All available slices": "Todas las secciones disponibles",
"All rewards will go towards the selected output destination when a payout is made.": "Todas las recompensas irán hacia el destino de salida seleccionado cuando se efectúe el pago.",
"All scehduled cores": "Todos los núcleos agendados",
"All the listed validators and all their nominators will receive their rewards.": "Todos los validadores de la lista y todos sus nominadores recibirán su recompensa.",
"Allocate a suggested tip amount. With enough endorsements, the suggested values are averaged and sent to the beneficiary.": "Asigna una cantidad sugerida de propina. Con suficiente respaldo, los valores sugeridos serán un promedio y se enviarán al beneficiario.",
"Amount to add to the currently bonded funds. This is adjusted using the available funds on the account.": "Cantidad a añadir a los fondos actualmente en reserva. Se ajusta con los fondos disponibles en la cuenta.",
Expand Down Expand Up @@ -241,6 +244,7 @@
"No code hashes available": "No hay hash de código disponible",
"No committee proposals": "No hay propuestas del comité",
"No contracts available": "No hay contrato disponible",
"No core description found": "No se ha encontrado descripción de núcleos",
"No council motions": "No hay mociones del consejo",
"No documentation provided": "No se ha facilitado documentación",
"No events available": "No hay eventos disponibles",
Expand All @@ -259,6 +263,8 @@
"No runners up found": "No se han encontrado mensajeros",
"No upgradable extensions found": "No se han encontrado extensiones actualizables",
"No waiting validators found": "No se han encontrado validadores en espera",
"No workload found": "No se ha encontrado workload",
"No workplan found": "No se ha encontrado workplan",
"Node info": "Información del nodo",
"Nominate": "Nominar",
"Nominate Validators": "Nominar validadores",
Expand Down Expand Up @@ -708,6 +714,7 @@
"approval type": "tipo de aprobación",
"approved": "aprobado",
"asset id": "id del activo",
"assignment": "asignación",
"auto-selected targets for nomination": "candidatos auto seleccionados para la nominación",
"available": "disponible",
"available signatories": "firmantes disponibles",
Expand All @@ -729,6 +736,7 @@
"blocks": "bloques",
"bond": "vínculo",
"bonded": "vinculado",
"broker Id": "Id del Broker",
"call from account": "llamada desde la cuenta",
"call the selected endpoint": "llamar al punto final seleccionado",
"candidate account": "cuenta del candidato",
Expand All @@ -755,12 +763,16 @@
"conviction": "sentencia",
"conviction: Conviction": "convicción: Convicción",
"copied": "copiado",
"core": "núcleo",
"core count": "cantidad de núcleos",
"council candidates": "candidatos al consejo",
"council proposal": "propuesta del consejo",
"council proposal type": "tipo de propuesta del consejo",
"created account": "cuenta creada",
"created multisig": "multisig creada",
"crypto type to use": "typo de crypto a usar",
"current timeslice": "rango de tiempo actual",
"current work": "trabajo actual",
"custom endpoint": "endpoint personalizado",
"data": "dato",
"default icon theme": "tema del icono por defecto",
Expand Down Expand Up @@ -841,6 +853,7 @@
"locked balance": "balance bloqueado",
"logs": "logs",
"manage hardware connections": "manejar conexiones hardware",
"mask": "máscara",
"matches": "coincidencias",
"maximum gas allowed": "máximo de gas permitido",
"members": "miembros",
Expand Down Expand Up @@ -883,6 +896,7 @@
"new address": "nueva dirección",
"next": "siguiente",
"next id": "siguiente ID",
"next index": "next index",
"no": "no",
"no accounts yet, create or import an existing": "no hay cuentas aún, cree o importe un existente",
"no addresses saved yet, add any existing address": "no hay direcciones almacenadas aún, añada cualquier dirección existente",
Expand Down Expand Up @@ -916,6 +930,7 @@
"pending hashes": "hashes pendientes",
"pending swap id": "pendiente del ID de intercambio",
"points": "puntos",
"pool size": "Tamaño de pool",
"pot": "espacio",
"preimage hash": "hash de la preimgaen",
"prev": "previo",
Expand Down Expand Up @@ -983,8 +998,11 @@
"seed (hex or string)": "semilla (hexadecimal o secuencia)",
"select the account you wish to sign data with": "seleccionar la cuenta que desea para firmar el dato",
"selected constant query": "consulta constante seleccionada",
"selected core for workload": "núcleo seleccionado para workload",
"selected core for workplan": "núcleo seleccionado para workplan",
"selected signatories": "firmantes seleccionados",
"selected state query": "consulta de estado seleccionado",
"selected timeslice": "rango de tiempo seleccionado",
"selected validators": "validadores elegidos",
"send": "enviar",
"send as RPC call": "enviar como una llamada a RPC",
Expand Down Expand Up @@ -1050,6 +1068,7 @@
"total peers": "pares totales",
"total stake": "stake total",
"total staked": "staked total",
"traffic": "tráfico",
"transactions": "transacciones",
"transfer received": "transferencia recibida",
"transferrable": "transferible",
Expand Down Expand Up @@ -1095,6 +1114,8 @@
"web": "web",
"website": "sitio web",
"with an index of": "con el índice de",
"work queue": "cola de trabajo",
"workload": "workload",
"wrong password supplied": "contraseña incorrecta suministrada",
"yes": "si",
"your current password": "su contraseña actual",
Expand Down
1 change: 1 addition & 0 deletions packages/page-coretime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @polkadot/app-coretime
27 changes: 27 additions & 0 deletions packages/page-coretime/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"bugs": "https://github.com/polkadot-js/apps/issues",
"engines": {
"node": ">=18"
},
"homepage": "https://github.com/polkadot-js/apps/tree/master/packages/page-coretime#readme",
"license": "Apache-2.0",
"name": "@polkadot/app-coretime",
"private": true,
"repository": {
"directory": "packages/page-coretime",
"type": "git",
"url": "https://github.com/polkadot-js/apps.git"
},
"sideEffects": false,
"type": "module",
"version": "0.135.2-44-x",
"dependencies": {
"@polkadot/react-components": "0.135.2-49-x",
"@polkadot/react-query": "0.135.2-49-x"
},
"peerDependencies": {
"react": "*",
"react-dom": "*",
"react-is": "*"
}
}
27 changes: 27 additions & 0 deletions packages/page-coretime/src/Overview/BrokerId.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2017-2024 @polkadot/app-coretime authors & contributors
// SPDX-License-Identifier: Apache-2.0

import type { u32 } from '@polkadot/types';

import React from 'react';

import { useApi } from '@polkadot/react-hooks';

interface Props {
className?: string;
children?: React.ReactNode;
}

function BrokerId ({ children, className }: Props): React.ReactElement<Props> | null {
const { api } = useApi();
const id = api.consts.coretime?.brokerId as u32;

return (
<div className={className}>
{id?.toString()}
{children}
</div>
);
}

export default React.memo(BrokerId);
Loading