<commit_before>/*
 *  Init shell script module
 */

(function(global, $) {

    var codiad = global.codiad;

    codiad.shellScript = {
        controller: 'components/shell_script/controller.php',
        dialog: 'components/shell_script/dialog.php',
        
        //////////////////////////////////////////////////////////////////
        // Analyze source code
        //////////////////////////////////////////////////////////////////

        analyzeCode: function() {
            // Run controller to analyze source code of client
            $.get(this.controller + '?action=analyze_code', function(data) {
                var analyzeReponse = codiad.jsend.parse(data);
                if (analyzeReponse !== 'error') {
                    $.msgBox({
                        title:"Information",
                        content:"Your request to analyze code is in processing. You will receive the analysis result by mail.",
                        type:"info"
                    });
                    codiad.message.success(analyzeReponse);
                } else {
                    $.msgBox({
                        title:"Too many requests in progress",
                        content:"Too many requests of analyzing code is in processing. Please retry some few minutes later.",
                        type:"error"
                    });
                    codiad.message.error(analyzeReponse);
                }
            });

        },
        //////////////////////////////////////////////////////////////////
        // Deploy application
        //////////////////////////////////////////////////////////////////

        deployApp: function() {
            $.msgBox({
                title:"Information",
                content:"Your request to deploy application is in processing. You will receivce deployment result by mail.",
                type:"info"
            });
            // Run controller to deploy application<commit_msg>update message in deploy app and analyze code<commit_after>/*
 *  Init shell script module
 */

(function(global, $) {

    var codiad = global.codiad;

    codiad.shellScript = {
        controller: 'components/shell_script/controller.php',
        dialog: 'components/shell_script/dialog.php',
        
        //////////////////////////////////////////////////////////////////
        // Analyze source code
        //////////////////////////////////////////////////////////////////

        analyzeCode: function() {
            // Run controller to analyze source code of client
            $.get(this.controller + '?action=analyze_code', function(data) {
                var analyzeReponse = codiad.jsend.parse(data);
                if (analyzeReponse !== 'error') {
                    $.msgBox({
                        title:"Information",
                        content:"Your request to analyze code is in processing. You will receive the analysis result by mail.",
                        type:"info"
                    });
                    codiad.message.success(analyzeReponse);
                } else {
                    $.msgBox({
                        title:"Too many requests in progress",
                        content:"Too many requests of analyzing code is in processing. Please retry in few minutes later.",
                        type:"error"
                    });
                    codiad.message.error(analyzeReponse);
                }
            });

        },
        //////////////////////////////////////////////////////////////////
        // Deploy application
        //////////////////////////////////////////////////////////////////

        deployApp: function() {
            $.msgBox({
                title:"Information",
                content:"Your request to deploy application is in processing. You will receivce deployment result by mail.",
                type:"info"
            });
            // Run controller to deploy application
{'fraction_non_alphanumeric': 0.21118951612903225, 'fraction_numerical': 0.0, 'mean_word_length': 0.9825174825174825, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2623044', 'n_tokens_mistral': 816, 'n_tokens_neox': 757, 'n_words': 220}