Viewing File: /usr/local/cpanel/base/frontend/jupiter/site-monitor/models/monitor-state.enum.js

/*
 * site-monitor/models/monitor-state.enum.js        Copyright 2021 cPanel, L.L.C.
 *                                                           All rights reserved.
 * copyright@cpanel.net                                         http://cpanel.net
 * This code is subject to the cPanel license. Unauthorized copying is prohibited
 */

/* global define, PAGE */

/** @namespace cpanel.siteMoniter.models.enums.MonitorState */

define([
        'app/models/enum-helper'
    ],
    function(EnumHelper) {

        "use strict";

        /**
         * @typedef {string} State
         */

        /**
         * @name MonitorState
         * @enum {Status}
         */
        var MonitorState = {
            Creating: 'creating',
            Removing: 'removing',
            Ready:    'ready',
            Error:    'error',
            None:     'none',
        };

        /**
         * Return the key from the value if it exists in the enum.
         *
         * @param {string} value
         * @returns string
         */
        MonitorState.fromString = function(value) {
            return EnumHelper.fromString(MonitorState, value);
        };

        return MonitorState;
    }
);
Back to Directory File Manager