blob: 1c92e3819cddaaf6ad34288dfecaa77f83b6f076 [file] [log] [blame]
Iftekharul Islam99d199f2017-03-24 15:28:25 -05001/**
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: {
Michael Davisdf3bd122017-08-10 11:03:42 -050023 host: 'https://9.3.185.164',
Iftekharul Islamc0161392017-06-14 15:46:15 -050024 mock_host: 'http://localhost:3000'
Iftekharul Islam99d199f2017-03-24 15:28:25 -050025 },
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
Iftekharul Islamcd789502017-04-19 14:37:55 -050047 },
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: {
Iftekharul Islam595743a2017-08-23 16:27:18 -050062 LOG_ITEMS_PER_PAGE: 25
Iftekharul Islamd2269e22017-05-02 09:32:45 -050063 },
Iftekharul Islamee27d752017-07-05 15:54:31 -050064 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 },
Iftekharul Islam8947e702017-07-27 10:28:07 -050073 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'
Iftekharul Islam99d199f2017-03-24 15:28:25 -050081 }
82 };
83 });
84
Iftekharul Islamcd789502017-04-19 14:37:55 -050085})(window.angular);