<commit_before>'use strict';
odoo.define('proxy_action.proxy_view', function (require) {
    var ActionManager = require('web.ActionManager');

    ActionManager.include({
        ir_actions_act_proxy: function (action, options) {
            var self = this;

            action.action_list.forEach(function (task) {
                $.ajax({
                    url: task['url'],
                    type: 'POST',
                    data: JSON.stringify(task['params']),
                    contentType: 'application/json',
                }).done(function (result) {
                    console.log("Proxy action have been done with sucess", result);
                    //TODO add an UI feedback
                    self.ir_actions_act_window_close(action, options);
                }).fail(function (result) {
                    console.log('Proxy action have failed', result);
                    //TODO add an UI feedback
                    self.ir_actions_act_window_close(action, options);
                })
            })
            this.do_action({"type":"ir.actions.act_window_close"});
        }
    });
});<commit_msg>[IMP][10.0] Add UI notification for AJAX request status<commit_after>'use strict';
odoo.define('proxy_action.proxy_view', function (require) {
    var ActionManager = require('web.ActionManager');
    var core = require('web.core')
    var _t = core._t
    ActionManager.include({
        ir_actions_act_proxy: function (action, options) {
            var self = this;
            self.do_notify(_t('Proxy action executing'), _t('Your action is being executed'));
            action.action_list.forEach(function (task) {
                $.ajax({
                    url: task['url'],
                    type: 'POST',
                    data: JSON.stringify(task['params']),
                    contentType: 'application/json',
                }).done(function (result) {
                    console.log("Proxy action has been successfully sent: ", result);
                    self.do_notify(_t('Success'), _t('Proxy action successfully sent'));
                    self.ir_actions_act_window_close(action, options);
                }).fail(function (result) {
                    console.log('Proxy action has failed: ', result);
                    self.do_warn(_t("Failure"), _t("Proxy action failure. Please check logs."));
                    self.ir_actions_act_window_close(action, options);
                })
            })
            this.do_action({"type":"ir.actions.act_window_close"});
        }
    });
});
{'fraction_non_alphanumeric': 0.1234375, 'fraction_numerical': 0.001171875, 'mean_word_length': 1.7928026172300982, 'pattern_counts': {'":': 2, '<': 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': '4028982', 'n_tokens_mistral': 661, 'n_tokens_neox': 624, 'n_words': 140}