Skip to content

Commit

Permalink
Coretime Chain - Overview UI Tab (polkadot-js#10898)
Browse files Browse the repository at this point in the history
* added overview page

* sanitized task

* added workplan table

* staged missing files

* updated filters

* fixed some types

* updated mask graph

* copyright

* linting

* install

* added relay overview

* linting

* refactoring hooks

* translations

* updated coretime deps

* updated tsconfig

* fixed build

* root tsconfig

* fix tsconfig

* app-coretime and app-broker

* filter bug fix

* prettied mask bar

* updated deps

* updated deps broker

* removed TS filter and added graph

* linting

* fixed headers

* fixed filter

* updated coretime summary

* updated relay tables

* fixed bulk price display

* updated regions

* styling

* fixed pallet version mismaatch info

* fixed expand button

* fixed alignment issues

* yarn install

* integrated some suggestions

* linting

* updated version

* Fix Header on table

* Small nit around naming

* Usage bar console err fix: NaN

* rearranged the layout for page broker on Coretime chain, changed UsageBar element to be more generic

* filtering parachains by id

* moved a type to a seprate type file

* skip build and npm

* generated locales

* added default ui colours to test chains and kusama

* abstracted logic from the rendering

* default ui highlight fallback

* table responsive - hiding timeslice info from the rows on mobile

* version updates for react-components and react-query

* exporting defaultHighlight

* responsive summary

* small fix for workplan filtering

* separated coretime chain page

* removed unused references

* added useBrokerReservations call and marked reserved chains

* useBrokerLease, added Legacy Lease type

* showing last block for legacy leases

* added processing at data retrieval

* fix: missing icon

* linting

* organized files, minor refactor

* moved filters out of the Overview componennt

* minor refactor

* version update

* regenerated yarn lock

* renamed column

* linter :)

* ts fixes :)

---------

Co-authored-by: bee344 <[email protected]>
Co-authored-by: Alberto Nicolas Penayo <[email protected]>
Co-authored-by: tarikgul <[email protected]>
  • Loading branch information
4 people committed Sep 10, 2024
1 parent 20a8252 commit 7c9f388
Show file tree
Hide file tree
Showing 56 changed files with 1,965 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ export const prodParasKusamaCommon: EndpointOption[] = [
teleport: [-1],
text: 'Coretime',
ui: {
color: '#113911',
logo: chainsCoretimeKusamaSVG
}
},
Expand Down
4 changes: 3 additions & 1 deletion packages/apps-config/src/endpoints/testingRelayRococo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,9 @@ export const testParasRococoCommon: EndpointOption[] = [
relayName: 'rococo',
teleport: [-1],
text: 'Coretime',
ui: {}
ui: {
color: '#f19135'
}
},
{
homepage: 'https://encointer.org/',
Expand Down
4 changes: 3 additions & 1 deletion packages/apps-config/src/endpoints/testingRelayWestend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ export const testParasWestendCommon: EndpointOption[] = [
relayName: 'westend',
teleport: [-1],
text: 'Coretime',
ui: {}
ui: {
color: '#f19135'
}
},
{
info: 'westendPeople',
Expand Down
22 changes: 22 additions & 0 deletions packages/apps-routing/src/broker.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// 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-broker';

export default function create (t: TFunction): Route {
return {
Component,
display: {
needsApi: [
'query.broker.status'
],
needsApiInstances: true
},
group: 'network',
icon: 'flask',
name: 'broker',
text: t('nav.broker', 'Coretime Broker (Experimental)', { ns: 'app-broker' })
};
}
2 changes: 2 additions & 0 deletions packages/apps-routing/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import alliance from './alliance.js';
import ambassador from './ambassador.js';
import assets from './assets.js';
import bounties from './bounties.js';
import broker from './broker.js';
import calendar from './calendar.js';
import claims from './claims.js';
import collator from './collator.js';
Expand Down Expand Up @@ -61,6 +62,7 @@ export default function create (t: TFunction): Routes {
// Legacy staking Pre v14 pallet version.
stakingLegacy(t),
collator(t),
broker(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 @@ -14,6 +14,7 @@
{ "path": "../page-bounties/tsconfig.build.json" },
{ "path": "../page-calendar/tsconfig.build.json" },
{ "path": "../page-claims/tsconfig.build.json" },
{ "path": "../page-broker/tsconfig.build.json" },
{ "path": "../page-collator/tsconfig.build.json" },
{ "path": "../page-contracts/tsconfig.build.json" },
{ "path": "../page-council/tsconfig.build.json" },
Expand Down
31 changes: 31 additions & 0 deletions packages/apps/public/locales/en/app-broker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"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",
"estimated bulk price": "estimated bulk price",
"mask": "mask",
"nav.broker": "Coretime Broker (Experimental)",
"next index": "next index",
"parachain id": "parachain id",
"pool size": "pool size",
"region length": "region length",
"selected core": "selected core",
"selected core for workload": "selected core for workload",
"selected core for workplan": "selected core for workplan",
"timeslice": "timeslice",
"timeslice period": "timeslice period",
"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 @@ -4,6 +4,7 @@
"app-alliance.json",
"app-assets.json",
"app-bounties.json",
"app-broker.json",
"app-calendar.json",
"app-claims.json",
"app-collator.json",
Expand Down
27 changes: 27 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 @@ -429,6 +432,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 @@ -464,6 +468,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 @@ -1166,6 +1172,7 @@
"asset name": "",
"asset symbol": "",
"assets": "",
"assignment": "",
"at specific block": "",
"auctions": "",
"available signatories": "",
Expand Down Expand Up @@ -1206,6 +1213,7 @@
"bounty remark": "",
"bounty requested allocation": "",
"bounty title": "",
"broker Id": "",
"bytes": "",
"bytes transferred": "",
"calculated storage fee": "",
Expand Down Expand Up @@ -1263,6 +1271,8 @@
"conviction": "",
"conviction: Conviction": "",
"copied": "",
"core": "",
"core count": "",
"council candidates": "",
"council proposal type": "",
"count": "",
Expand All @@ -1286,7 +1296,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 @@ -1358,6 +1370,7 @@
"era {{era}}/unapplied": "",
"eras": "",
"errors": "",
"estimated bulk price": "",
"ethereum private key": "",
"event count": "",
"events": "",
Expand Down Expand Up @@ -1474,6 +1487,7 @@
"logs": "",
"lowest / avg staked": "",
"manage hardware connections": "",
"mask": "",
"manage ledger app": "",
"matches": "",
"matrix name": "",
Expand Down Expand Up @@ -1524,6 +1538,7 @@
"next": "",
"next action": "",
"next burn": "",
"next index": "",
"no": "",
"no addresses saved yet, add any existing address": "",
"no name": "",
Expand Down Expand Up @@ -1576,6 +1591,7 @@
"period": "",
"points": "",
"pool id": "",
"pool size": "",
"pools": "",
"pot": "",
"preimage": "",
Expand Down Expand Up @@ -1626,6 +1642,7 @@
"referendum id": "",
"refresh in": "",
"refund from account": "",
"region length": "",
"register from": "",
"registrar account": "",
"registrar index": "",
Expand Down Expand Up @@ -1661,6 +1678,9 @@
"seed (hex or string)": "",
"select curator": "",
"selected constant query": "",
"selected core": "",
"selected core for workload": "",
"selected core for workplan": "",
"selected signatories": "",
"selected state query": "",
"selected track": "",
Expand Down Expand Up @@ -1735,6 +1755,8 @@
"the supplied signature": "",
"threshold": "",
"timeout": "",
"timeslice": "",
"timeslice period": "",
"tip": "",
"tip amount": "",
"tip reason": "",
Expand All @@ -1757,6 +1779,8 @@
"total sub": "",
"total transferable": "",
"track origin": "",
"traffic": "",
"traffic multiplier": "",
"transactions": "",
"transfer asset": "",
"transfer received": "",
Expand Down Expand Up @@ -1841,6 +1865,9 @@
"with an index of": "",
"with capacity": "",
"with weight override": "",
"work queue": "",
"workload": "",
"workplan": "",
"yes": "",
"yesterday": "",
"your current password": "",
Expand Down
20 changes: 20 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,6 +998,8 @@
"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 validators": "validadores elegidos",
Expand Down Expand Up @@ -1050,6 +1067,7 @@
"total peers": "pares totales",
"total stake": "stake total",
"total staked": "staked total",
"traffic": "tráfico",
"transactions": "transacciones",
"transfer received": "transferencia recibida",
"transferable": "transferible",
Expand Down Expand Up @@ -1095,6 +1113,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
Empty file.
Empty file added packages/page-broker/.skip-npm
Empty file.
1 change: 1 addition & 0 deletions packages/page-broker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @polkadot/app-broker
Loading

0 comments on commit 7c9f388

Please sign in to comment.