From 9734eedc64b0c3026b433eafb147235d11dfa5ad Mon Sep 17 00:00:00 2001 From: Adalberto Soares Date: Mon, 31 May 2021 15:27:10 -0300 Subject: [PATCH] Web Monitor: sorts validators set table (#521) * Removes static web monitor files path for the dev env * Fixes #511 with temp file for monitor cache * Fixes #500 using source_path for web files on dev env * Sets monospace font family for hash codes on the web monitor * Fix merge * Git ignores web-monitor/public/build files * Sorts web monitor validators set (ascending and descending) * Removes unused key can_create_account from interface ValInfo --- .../src/components/layout/Style.svelte | 9 ++ .../validators/ValidatorModal.svelte | 43 ++++++ .../src/components/validators/Vals.svelte | 126 ++++++++---------- 3 files changed, 108 insertions(+), 70 deletions(-) create mode 100644 ol/cli/web-monitor/src/components/validators/ValidatorModal.svelte diff --git a/ol/cli/web-monitor/src/components/layout/Style.svelte b/ol/cli/web-monitor/src/components/layout/Style.svelte index 1749da3a4e..ab44a06e36 100644 --- a/ol/cli/web-monitor/src/components/layout/Style.svelte +++ b/ol/cli/web-monitor/src/components/layout/Style.svelte @@ -2,4 +2,13 @@ :global(.hash) { font-family: "monospace"; } + :global(.disable-select) { + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; /* Non-prefixed version, currently + supported by Chrome and Opera */ + } \ No newline at end of file diff --git a/ol/cli/web-monitor/src/components/validators/ValidatorModal.svelte b/ol/cli/web-monitor/src/components/validators/ValidatorModal.svelte new file mode 100644 index 0000000000..4b07a9b4a3 --- /dev/null +++ b/ol/cli/web-monitor/src/components/validators/ValidatorModal.svelte @@ -0,0 +1,43 @@ + + +{#if validator} +
+
+ +

Validator Info

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
account address{validator.account_address}
fullnode network address{validator.full_node_ip}
validator network address{validator.validator_ip}
epochs validating and mining{validator.epochs_validating_and_mining}
can create account{validator.epochs_since_last_account_creation > 7}
+
+
+{/if} + diff --git a/ol/cli/web-monitor/src/components/validators/Vals.svelte b/ol/cli/web-monitor/src/components/validators/Vals.svelte index 5836801b55..90902efada 100644 --- a/ol/cli/web-monitor/src/components/validators/Vals.svelte +++ b/ol/cli/web-monitor/src/components/validators/Vals.svelte @@ -1,5 +1,6 @@ - -
-

+

{set.length} Validators

+ + + + + + {#each sortableColumns as col} + + {/each} + + + + + {#each set as val, i} + selectedVal = val}> + + + + + + + {/each} + +
account thOnClick(col.sortKey)}> + {col.label} + {#if sortOption == col.sortKey} + {#if sortOrder == 1} + + {:else} + + {/if} + {/if} +
{val.account_address}{val.voting_power}{val.count_proofs_in_epoch}{val.tower_height} + +
-
-
-
account
-
voting power
-
proofs in epoch
-
tower height
-
-
- - +