コード例 #1
0
ファイル: health_status.php プロジェクト: jotes/transvision
                $single_stats_pane = false;
                break;
            case 'others':
                $name = 'Other repositories';
                $repo = $project;
                $single_stats_pane = false;
                break;
            default:
                $name = Project::getRepositoriesNames()[$project];
                $single_stats_pane = true;
                break;
        }
        // Create tab-link + content div
        if ($new_tab) {
            $links .= Health::addLink($name, $project, $first_tab);
            $html[$project]['repos'] = Health::addTab($project, $first_tab) . $table_header;
        }
        // If we have more than one repo for which we need to get status
        if (!isset($status['translated'])) {
            foreach ($status as $repo => $component) {
                $html[$project]['repos'] .= Health::addRow(Health::getColumnsKeys(), $component);
            }
        } else {
            $html[$project]['repos'] .= Health::addRow(Health::getColumnsKeys(), $status);
        }
        $new_tab = $first_tab = false;
    }
}
// Closing content div for each tab, concatenate all the html
$content = '';
foreach (array_keys($html) as $project) {
コード例 #2
0
ファイル: Health.php プロジェクト: lester-shu/transvision
 /**
  * @dataProvider addTabDP
  */
 public function testaddTab($a, $b, $c)
 {
     $obj = new _Health();
     $this->string($obj->addTab($a, $b))->isEqualTo($c);
 }