<commit_before>import React from "react";
import { ClipLoader } from "halogenium";
import { Icon } from "../../base";
import { getTaskDisplayName } from "../../utils";

const JobStep = ({ step, isDone }) => {

    let hasBar;
    let stateIcon;
    let entryStyle;

    switch (step.state) {

        case "running":
            hasBar = isDone;
            stateIcon = isDone ? "check fa-fw" : "";
            entryStyle = isDone ? "success" : "primary";
            break;

        case "complete":
            hasBar = false;
            stateIcon = "check fa-fw";
            entryStyle = "success";
            break;

        case "error":
        case "cancelled":
            hasBar = false;
            stateIcon = "times fa-fw";
            entryStyle = "danger";
            break;

        default:
            return null;

    }

    const stepEntry = (
        <div className="step-entry">
            <div className="step-entry-icon">
                {stateIcon.length
                    ? <Icon name={stateIcon} bsStyle={entryStyle} />
                    : <div><ClipLoader size="14px" color="#07689d" style={{padding: "3px 2px"}} /></div>
                }
            </div>
            <div className="step-entry-content">
                {getTaskDisplayName(step.stage)}
            </div>
            <div
                className={hasBar ? `step-entry-bar-${entryStyle}` : "step-entry-nobar"}
            />
        </div>
    );

    return stepEntry;
};

export default JobStep;
<commit_msg>Fix padding on cliploader icon<commit_after>import React from "react";
import { ClipLoader } from "halogenium";
import { Icon } from "../../base";
import { getTaskDisplayName } from "../../utils";

const JobStep = ({ step, isDone }) => {

    let hasBar;
    let stateIcon;
    let entryStyle;

    switch (step.state) {

        case "running":
            hasBar = isDone;
            stateIcon = isDone ? "check fa-fw" : "";
            entryStyle = isDone ? "success" : "primary";
            break;

        case "complete":
            hasBar = false;
            stateIcon = "check fa-fw";
            entryStyle = "success";
            break;

        case "error":
        case "cancelled":
            hasBar = false;
            stateIcon = "times fa-fw";
            entryStyle = "danger";
            break;

        default:
            return null;

    }

    const stepEntry = (
        <div className="step-entry">
            <div className="step-entry-icon">
                {stateIcon.length
                    ? <Icon name={stateIcon} bsStyle={entryStyle} />
                    : <ClipLoader size="14px" color="#07689d" style={{padding: "0 1.5px"}} />
                }
            </div>
            <div className="step-entry-content">
                {getTaskDisplayName(step.stage)}
            </div>
            <div
                className={hasBar ? `step-entry-bar-${entryStyle}` : "step-entry-nobar"}
            />
        </div>
    );

    return stepEntry;
};

export default JobStep;

{'fraction_non_alphanumeric': 0.13469119579500657, 'fraction_numerical': 0.006241787122207621, 'mean_word_length': 1.5186104218362282, 'pattern_counts': {'":': 8, '<': 23, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7643336', 'n_tokens_mistral': 872, 'n_tokens_neox': 834, 'n_words': 199}