1/**
2 * common Constant service
3 *
4 * @module app/common/services/constants
5 * @exports Constants
6 * @name Constants
7
8 * @version 0.0.1
9 */
10
11window.angular && (function (angular) {
12    'use strict';
13
14    angular
15        .module('app.common.services')
16        .service('Constants', function () {
17            return {
18                LOGIN_CREDENTIALS: {
19                    username: "test",
20                    password: "testpass",
21                },
22                API_CREDENTIALS: {
23                    host: 'https://9.3.185.164',
24                    mock_host: 'http://localhost:3000'
25                },
26                API_RESPONSE: {
27                    ERROR_STATUS: 'error',
28                    ERROR_MESSAGE: '401 Unauthorized',
29                    SUCCESS_STATUS: 'ok',
30                    SUCCESS_MESSAGE: '200 OK'
31                },
32                CHASSIS_POWER_STATE: {
33                    on: 'On',
34                    off: 'Off'
35                },
36                HOST_STATE_TEXT: {
37                    on: 'Running',
38                    off: 'Off',
39                    booting: 'Quiesced',
40                    unreachable: 'Unreachable'
41                },
42                HOST_STATE: {
43                    on: 1,
44                    off: -1,
45                    booting: 0,
46                    unreachable: -2
47                },
48                LED_STATE: {
49                    on: true,
50                    off: false
51                },
52                LED_STATE_TEXT: {
53                    on: 'on',
54                    off: 'off'
55                },
56                SEVERITY_TO_PRIORITY_MAP:{
57                    Informational: 'Low',
58                    Error: 'High',
59                    Warning: 'Medium'
60                },
61                PAGINATION: {
62                    LOG_ITEMS_PER_PAGE: 25
63                },
64                HARDWARE: {
65                  component_key_filter: '/xyz/openbmc_project/inventory/system',
66                  parent_components: [
67                   /xyz\/openbmc_project\/inventory\/system\/chassis\/motherboard\/cpu\d+\//
68                  ],
69                  uppercase_titles: [
70                   'cpu', 'dimm'
71                  ]
72                },
73                SENSOR_UNIT_MAP: {
74                  'xyz.openbmc_project.Sensor.Value.Unit.RPMS': 'rpms',
75                  'xyz.openbmc_project.Sensor.Value.Unit.DegreesC': 'C',
76                  'xyz.openbmc_project.Sensor.Value.Unit.Volts': 'volts',
77                  'xyz.openbmc_project.Sensor.Value.Unit.Meters': 'meters',
78                  'xyz.openbmc_project.Sensor.Value.Unit.Watts': 'watts',
79                  'xyz.openbmc_project.Sensor.Value.Unit.Amperes': 'amperes',
80                  'xyz.openbmc_project.Sensor.Value.Unit.Joules': 'joules'
81                }
82            };
83        });
84
85})(window.angular);
86