<commit_before>var $ = require('jquery')

module.exports = function (successRepository) {
    return {
        addProjects: function (projects) {
            $('#projects').empty()
            projects.forEach(addBuildStatusToScreen)

            if (projects.length === 0) {
                showSuccessMessage(projects, successRepository)
            }
        }
    }
}

function addBuildStatusToScreen(project) {
    $('#projects').append(
        '<li class="monitor-project monitor-' + project.prognosis + '">' +
        '<div class=monitor-outerContainer>' +
        '<div class=monitor-innerContainer>' + project.name +
        '</div>' +
        '</div>' +
        '</li>')
}

function showSuccessMessage(projects, successRepository) {
    if (successRepository.hasSuccessImageUrl()) {
        $('#projects')
            .append('<li><div class=monitor-outerContainer><div id="success-image" class="monitor-success-image monitor-innerContainer" style="' +
            'background: url(' + successRepository.getSuccessImageUrl() + ') no-repeat center center fixed;' +
            'background-size: cover">' +
            '</div>' +
            '</div></li>')
    } else {
        $('#projects').append(
            '<li>' +
            '<div class=monitor-outerContainer>' +
            '<div id="success-text" class=monitor-innerContainer>' + successRepository.getSuccessText() +
            '</div>' +
            '</div>' +
            '</li>')
    }
}<commit_msg>Ste #46 - fixing image scaling issue<commit_after>var $ = require('jquery')

module.exports = function (successRepository) {
    return {
        addProjects: function (projects) {
            $('#projects').empty()
            projects.forEach(addBuildStatusToScreen)

            if (projects.length === 0) {
                showSuccessMessage(projects, successRepository)
            }
        }
    }
}

function addBuildStatusToScreen(project) {
    $('#projects').append(
        '<li class="monitor-project monitor-' + project.prognosis + '">' +
        '<div class=monitor-outerContainer>' +
        '<div class=monitor-innerContainer>' + project.name +
        '</div>' +
        '</div>' +
        '</li>')
}

function showSuccessMessage(projects, successRepository) {
    if (successRepository.hasSuccessImageUrl()) {
        $('#projects')
            .append('<li><div class=monitor-outerContainer><div id="success-image" class="monitor-success-image monitor-innerContainer" style="' +
            'background: url(' + successRepository.getSuccessImageUrl() + ') no-repeat center center fixed;' +
            'background-size: contain">' +
            '</div>' +
            '</div></li>')
    } else {
        $('#projects').append(
            '<li>' +
            '<div class=monitor-outerContainer>' +
            '<div id="success-text" class=monitor-innerContainer>' + successRepository.getSuccessText() +
            '</div>' +
            '</div>' +
            '</li>')
    }
}
{'fraction_non_alphanumeric': 0.16212579885637404, 'fraction_numerical': 0.0013454423141607804, 'mean_word_length': 2.3044444444444445, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, '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': '5494855', 'n_tokens_mistral': 783, 'n_tokens_neox': 806, 'n_words': 137}