From eb7edba21d4679d215226bbe9a44402aa1b011d3 Mon Sep 17 00:00:00 2001 From: Zach Mandeville Date: Tue, 7 Apr 2020 15:22:45 +1200 Subject: [PATCH] consistent headings for coverage and sunburst --- .../src/components/Sunburst/Prologue.svelte | 45 ++++---- .../app/src/stores/coverage-over-time.js | 14 ++- apps/webapp/index.org | 108 +++++++++++++----- 3 files changed, 114 insertions(+), 53 deletions(-) diff --git a/apps/webapp/app/src/components/Sunburst/Prologue.svelte b/apps/webapp/app/src/components/Sunburst/Prologue.svelte index d4094a44e..3b650fef1 100644 --- a/apps/webapp/app/src/components/Sunburst/Prologue.svelte +++ b/apps/webapp/app/src/components/Sunburst/Prologue.svelte @@ -1,34 +1,29 @@ + const SPYGLASS_URL = 'https://prow.k8s.io/view/gcs/kubernetes-jenkins/logs' -
-

{bucket}

-

{timestamp}

-
+ $: ({ + bucket, + job, + release, + date, + test_hits_increase, + conf_hits_increase, + total_endpoints + } = $activeRelease); - diff --git a/apps/webapp/app/src/stores/coverage-over-time.js b/apps/webapp/app/src/stores/coverage-over-time.js index 6ec21ba7b..66231e0b8 100644 --- a/apps/webapp/app/src/stores/coverage-over-time.js +++ b/apps/webapp/app/src/stores/coverage-over-time.js @@ -8,7 +8,8 @@ import { import { bucketsAndJobs, defaultBucketAndJob, - stableEndpointStats + stableEndpointStats, + activeFilters } from './index.js'; @@ -52,3 +53,14 @@ export const coverage = derived( } } ); + +export const activeRelease = derived( + [activeFilters, coverage], + ([$af, $c], set) => { + if ($af.bucket && $c.length >0) { + let active = $c.find(cov => cov.bucket === $af.bucket && cov.job === $af.job) + set(active) + } else { + set({}) + } + }); diff --git a/apps/webapp/index.org b/apps/webapp/index.org index 8193e1d03..0db102f43 100644 --- a/apps/webapp/index.org +++ b/apps/webapp/index.org @@ -904,36 +904,31 @@ + const SPYGLASS_URL = 'https://prow.k8s.io/view/gcs/kubernetes-jenkins/logs' -
-

{bucket}

-

{timestamp}

-
+ $: ({ + bucket, + job, + release, + date, + test_hits_increase, + conf_hits_increase, + total_endpoints + } = $activeRelease); - @@ -1667,6 +1662,52 @@ #+end_src +*** Filters + in progress + #+NAME: Filters + #+begin_src web + + + + {#if !filtersVisible} +
+ +
+ {:else} +
+ +

Set Filters

+ +
+ {/if} + + + + + #+end_src ** Queries :PROPERTIES: :header-args: :tangle ./app/src/queries/index.js @@ -2177,7 +2218,8 @@ import { bucketsAndJobs, defaultBucketAndJob, - stableEndpointStats + stableEndpointStats, + activeFilters } from './index.js'; @@ -2222,9 +2264,19 @@ } ); + export const activeRelease = derived( + [activeFilters, coverage], + ([$af, $c], set) => { + if ($af.bucket && $c.length >0) { + let active = $c.find(cov => cov.bucket === $af.bucket && cov.job === $af.job) + set(active) + } else { + set({}) + } + } - #+end_src + #+end_src); ** Utility Functions (/lib/) *** helpers :PROPERTIES: @@ -2487,3 +2539,5 @@ (2 rows) #+end_src + +