Пример #1
0
                $projects[$repo]['repos'][$component] = Health::getStatus($name, $english_strings, $locale_strings);
                unset($locale_entities, $english_entities, $english_strings, $locale_strings);
            }
        } else {
            // Define if grouped repos in the view then store the data in the same place
            $grouped_repos = in_array($repo, Project::getGaiaRepositories()) ? 'gaia' : 'others';
            $projects[$grouped_repos][$repo] = Health::getStatus(Project::getRepositoriesNames()[$repo], $strings[$ref_locale][$repo], $strings[$locale][$repo]);
            $projects[$grouped_repos][$repo]['stats'] = $stats;
        }
        unset($strings);
    }
}
// Build content
// Titles
$table_header = '<table class="stats-table"><tr>';
foreach (Health::getColumnsNames() as $name) {
    $table_header .= '<th>' . $name . '</th>';
}
$table_header .= '</tr>';
$html = [];
$links = '';
$first_tab = true;
$new_tab = false;
// Rows
foreach ($projects as $project => $repos) {
    foreach ($repos as $repo => $status) {
        // Continue if last commit data
        if ($repo == 'stats') {
            continue;
        }
        if (!isset($html[$project]['repos'])) {