From c48c3cb024bbe7c5da3f1e1d67b18bac786159cd Mon Sep 17 00:00:00 2001 From: Stoyan Stefanov Date: Mon, 12 Sep 2022 21:28:32 +0000 Subject: [PATCH 1/3] Read/write waterfall customizations to a permalink --- www/assets/css/pagestyle2.css | 5 - www/customWaterfall.php | 185 +++++++++++++++++++--------------- 2 files changed, 105 insertions(+), 85 deletions(-) diff --git a/www/assets/css/pagestyle2.css b/www/assets/css/pagestyle2.css index f9a56f6d1c..f7320e6aa0 100644 --- a/www/assets/css/pagestyle2.css +++ b/www/assets/css/pagestyle2.css @@ -8764,11 +8764,6 @@ div.bar { margin: 1rem 0; } -.details_panel button { - display: none; - /* necessary button? does non-js work anyway? */ -} - .customwaterfall_hed { padding: 0 1.5rem; } diff --git a/www/customWaterfall.php b/www/customWaterfall.php index 1f1eb4833c..f8ee4fb128 100644 --- a/www/customWaterfall.php +++ b/www/customWaterfall.php @@ -38,7 +38,7 @@

Generate a Custom Waterfall

Waterfall Settings -
+
Chart Type @@ -46,43 +46,78 @@
Chart Coloring - - + +
- +
Show/Hide Extras - - - - - - - - - + + + + + + + + +
-
+ Permalink to this waterfall page
'', + 'width' => 1012, + 'type' => 'waterfall', + 'mime' => 1, + 'ut' => 1, + 'cpu' => 1, + 'bw' => 1, + 'lt' => 1, + 'dots' => 1, + 'labels' => 1, + 'chunks' => 1, + 'js' => 1, + 'wait' => 1, + 'requests' => '', + ]; + $server_params = [ + 'test' => $id, + 'run' => $run, + 'cached' => $cached, + 'step' => $step, + ]; + $request_params = []; + foreach ($server_params as $key => $default) { + $request_params[$key] = $default; + if (array_key_exists($param, $_REQUEST)) { + $request_params[$param] = $_REQUEST[$param]; + } + } + foreach ($uri_params as $key => $default) { + $request_params[$key] = $default; + if (array_key_exists($key, $_REQUEST)) { + $request_params[$key] = $_REQUEST[$key]; + } + } + $query_string = http_build_query($request_params); $waterfallSnippet = new WaterfallViewHtmlSnippet($testInfo, $testRunResults->getStepResult(1)); - echo $waterfallSnippet->create(true, '&cpu=1&bw=1<=1&ut=1&mime=1&js=1&wait=1'); + echo $waterfallSnippet->create(true, $query_string); $extension = 'php'; if (FRIENDLY_URLS) { $extension = 'png'; } - echo "
\"Waterfall\"
"; - echo "

Download Waterfall Image

"; + echo "
\"Waterfall\"
"; + echo "

Download Waterfall Image

"; ?>
@@ -90,6 +125,30 @@ From 32921484867cfbdf26c6c1eb5cea8163ff579ec5 Mon Sep 17 00:00:00 2001 From: Stoyan Stefanov Date: Mon, 12 Sep 2022 21:29:47 +0000 Subject: [PATCH 2/3] Remove forgotten console.log and new lines --- www/customWaterfall.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/www/customWaterfall.php b/www/customWaterfall.php index f8ee4fb128..fd6dbba1f4 100644 --- a/www/customWaterfall.php +++ b/www/customWaterfall.php @@ -123,7 +123,6 @@ -