Title: [200820] trunk/Websites/perf.webkit.org
Revision
200820
Author
[email protected]
Date
2016-05-13 00:33:28 -0700 (Fri, 13 May 2016)

Log Message

Always use v3 UI for dashboards and analysis task pages
https://bugs.webkit.org/show_bug.cgi?id=157647

Reviewed by Darin Adler.

Redirect dashboard pages from v1 and v2 to v3's summary page. Also redirect v1 UI's charts page and v2 UI's
analysis task pages to the corresponding v3 pages.

Keep v2's charts page accessible since some features such as segmentation is still only available on v2 UI.

* public/index.html:
(init.showCharts): Redirect to v3 UI once the chart list has been parsed.
(init.redirectChartsToV3): Added.
* public/v2/index.html:

Modified Paths

Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (200819 => 200820)


--- trunk/Websites/perf.webkit.org/ChangeLog	2016-05-13 07:31:59 UTC (rev 200819)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2016-05-13 07:33:28 UTC (rev 200820)
@@ -1,5 +1,22 @@
 2016-05-13  Ryosuke Niwa  <[email protected]>
 
+        Always use v3 UI for dashboards and analysis task pages
+        https://bugs.webkit.org/show_bug.cgi?id=157647
+
+        Reviewed by Darin Adler.
+
+        Redirect dashboard pages from v1 and v2 to v3's summary page. Also redirect v1 UI's charts page and v2 UI's
+        analysis task pages to the corresponding v3 pages.
+
+        Keep v2's charts page accessible since some features such as segmentation is still only available on v2 UI.
+
+        * public/index.html:
+        (init.showCharts): Redirect to v3 UI once the chart list has been parsed.
+        (init.redirectChartsToV3): Added.
+        * public/v2/index.html:
+
+2016-05-13  Ryosuke Niwa  <[email protected]>
+
         Show a spinner while fetching data on summary page
         https://bugs.webkit.org/show_bug.cgi?id=157658
 

Modified: trunk/Websites/perf.webkit.org/public/index.html (200819 => 200820)


--- trunk/Websites/perf.webkit.org/public/index.html	2016-05-13 07:31:59 UTC (rev 200819)
+++ trunk/Websites/perf.webkit.org/public/index.html	2016-05-13 07:33:28 UTC (rev 200820)
@@ -2,6 +2,12 @@
 <html>
 <head>
 <title>Perf Monitor is Loading...</title>
+<script>
+
+if (location.hash.indexOf('#mode=dashboard') >= 0)
+    location.href = '';
+
+</script>
 <script src="" defer></script>
 <script src="" defer></script>
 <script src="" defer></script>
@@ -1056,9 +1062,36 @@
             // Ignore any exception thrown by parse.
         }
 
+        redirectChartsToV3(chartList);
+
         chartList.forEach(function (item) { createChartFromListPair(item[0], item[1]); });
     }
 
+    function redirectChartsToV3(chartList)
+    {
+        var v3URLParams = [];
+        var numberOfDays = URLState.get('days');
+        if (parseInt(numberOfDays) == numberOfDays)
+            v3URLParams.push('since=' + (+Date.now() - numberOfDays * 24 * 3600 * 1000));
+
+        var v3PaneList = [];
+        for (var item of chartList) {
+            var platform = nameToPlatform[item[0]];
+            var metric = fullNameToMetric[item[1]];
+            if (platform && metric)
+                v3PaneList.push(`(${platform.id}-${metric.id})`);
+        }
+        v3URLParams.push(`paneList=(${v3PaneList.join('-')})`);
+
+        try {
+            var zoomValues = JSON.parse(URLState.get('zoom', '[]'));
+            if (zoomValues.length == 2)
+                v3URLParams.push(`zoom=(${zoomValues[0]}-${zoomValues[1]})`);
+        } catch (error) { }
+
+        location.href = '' + v3URLParams.join('&');
+    }
+
     // FIXME: We should use exponential slider for charts page where we expect to have
     // the full JSON as opposed to the dashboard where we can't afford loading really big JSON files.
     var exponential = true;

Modified: trunk/Websites/perf.webkit.org/public/v2/index.html (200819 => 200820)


--- trunk/Websites/perf.webkit.org/public/v2/index.html	2016-05-13 07:31:59 UTC (rev 200819)
+++ trunk/Websites/perf.webkit.org/public/v2/index.html	2016-05-13 07:33:28 UTC (rev 200820)
@@ -6,7 +6,20 @@
 
     <link rel="prefetch" href=""
     <script type="application/json" src=""
+    <script>
 
+        function redirectToV3IfNeeded()
+        {
+            var hash = window.location.hash;
+            if (hash.startsWith('#/analysis') || hash.startsWith('#/dashboard'))
+                window.location.pathname = '/v3/';
+        }
+
+        window._onhashchange_ = redirectToV3IfNeeded;
+        redirectToV3IfNeeded();
+
+    </script>
+
     <link rel="stylesheet" href=""
     <link rel="stylesheet" href=""
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to