New flakiness dashboard should support showing the failing tests per builder
[WebKit-https.git] / Websites / test-results / api / manifest.php
index 672b78a..19cf6f9 100644 (file)
@@ -3,25 +3,10 @@
 require_once('../include/json-shared.php');
 
 $db = connect();
-$tests = $db->fetch_table('tests');
 
-function fetch_table_and_create_map_by_id($table_name) {
-    global $db;
-
-    $rows = $db->fetch_table($table_name);
-    if (!$rows)
-        return array();
-
-    $results = array();
-    foreach ($rows as $row) {
-        $results[$row['id']] = $row;
-    }
-    return $results;
-}
-
-exit_with_success(array('tests' => $tests,
-    'builders' => fetch_table_and_create_map_by_id('builders'),
-    'slaves' => fetch_table_and_create_map_by_id('slaves'),
-    'repositories' => fetch_table_and_create_map_by_id('repositories')));
+exit_with_success(array('tests' => $db->fetch_table('tests'),
+    'builders' => $db->fetch_table('builders'),
+    'slaves' => $db->fetch_table('slaves'),
+    'repositories' => $db->fetch_table('repositories')));
 
 ?>