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

/*
 * site-monitor/models/monitor-status.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.MonitorStatus */

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

        "use strict";

        /**
         * @typedef {string} Status
         */

        /**
         * @name MonitorStatus
         * @enum {Status}
         */
        var MonitorStatus = {
            Down: 'down',
            Up: 'up',
        };

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

        return MonitorStatus;
    }
);
Back to Directory File Manager