Iftekharul Islam | 99d199f | 2017-03-24 15:28:25 -0500 | [diff] [blame] | 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 | |
| 11 | window.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 Davis | dfad5d5 | 2017-07-20 14:53:46 -0500 | [diff] [blame^] | 23 | <<<<<<< HEAD |
Iftekharul Islam | f2d7464 | 2017-07-10 16:42:14 -0500 | [diff] [blame] | 24 | host: 'https://9.3.181.15', |
Iftekharul Islam | c016139 | 2017-06-14 15:46:15 -0500 | [diff] [blame] | 25 | mock_host: 'http://localhost:3000' |
Michael Davis | dfad5d5 | 2017-07-20 14:53:46 -0500 | [diff] [blame^] | 26 | ======= |
| 27 | host: 'https://9.3.164.147' |
| 28 | >>>>>>> 4c1a3dd... Major update to code structure |
Iftekharul Islam | 99d199f | 2017-03-24 15:28:25 -0500 | [diff] [blame] | 29 | }, |
| 30 | API_RESPONSE: { |
| 31 | ERROR_STATUS: 'error', |
| 32 | ERROR_MESSAGE: '401 Unauthorized', |
| 33 | SUCCESS_STATUS: 'ok', |
| 34 | SUCCESS_MESSAGE: '200 OK' |
| 35 | }, |
| 36 | CHASSIS_POWER_STATE: { |
| 37 | on: 'On', |
| 38 | off: 'Off' |
| 39 | }, |
| 40 | HOST_STATE_TEXT: { |
| 41 | on: 'Running', |
| 42 | off: 'Off', |
| 43 | booting: 'Quiesced', |
| 44 | unreachable: 'Unreachable' |
| 45 | }, |
| 46 | HOST_STATE: { |
| 47 | on: 1, |
| 48 | off: -1, |
| 49 | booting: 0, |
| 50 | unreachable: -2 |
Michael Davis | dfad5d5 | 2017-07-20 14:53:46 -0500 | [diff] [blame^] | 51 | <<<<<<< HEAD |
Iftekharul Islam | cd78950 | 2017-04-19 14:37:55 -0500 | [diff] [blame] | 52 | }, |
| 53 | LED_STATE: { |
| 54 | on: true, |
| 55 | off: false |
| 56 | }, |
| 57 | LED_STATE_TEXT: { |
| 58 | on: 'on', |
| 59 | off: 'off' |
| 60 | }, |
| 61 | SEVERITY_TO_PRIORITY_MAP:{ |
| 62 | Informational: 'Low', |
| 63 | Error: 'High', |
| 64 | Warning: 'Medium' |
| 65 | }, |
| 66 | PAGINATION: { |
Iftekharul Islam | 8947e70 | 2017-07-27 10:28:07 -0500 | [diff] [blame] | 67 | LOG_ITEMS_PER_PAGE: 4 |
Iftekharul Islam | d2269e2 | 2017-05-02 09:32:45 -0500 | [diff] [blame] | 68 | }, |
Iftekharul Islam | ee27d75 | 2017-07-05 15:54:31 -0500 | [diff] [blame] | 69 | HARDWARE: { |
| 70 | component_key_filter: '/xyz/openbmc_project/inventory/system', |
| 71 | parent_components: [ |
| 72 | /xyz\/openbmc_project\/inventory\/system\/chassis\/motherboard\/cpu\d+\// |
| 73 | ], |
| 74 | uppercase_titles: [ |
| 75 | 'cpu', 'dimm' |
| 76 | ] |
| 77 | }, |
Iftekharul Islam | 8947e70 | 2017-07-27 10:28:07 -0500 | [diff] [blame] | 78 | SENSOR_UNIT_MAP: { |
| 79 | 'xyz.openbmc_project.Sensor.Value.Unit.RPMS': 'rpms', |
| 80 | 'xyz.openbmc_project.Sensor.Value.Unit.DegreesC': 'C', |
| 81 | 'xyz.openbmc_project.Sensor.Value.Unit.Volts': 'volts', |
| 82 | 'xyz.openbmc_project.Sensor.Value.Unit.Meters': 'meters', |
| 83 | 'xyz.openbmc_project.Sensor.Value.Unit.Watts': 'watts', |
| 84 | 'xyz.openbmc_project.Sensor.Value.Unit.Amperes': 'amperes', |
| 85 | 'xyz.openbmc_project.Sensor.Value.Unit.Joules': 'joules' |
Michael Davis | dfad5d5 | 2017-07-20 14:53:46 -0500 | [diff] [blame^] | 86 | ======= |
| 87 | >>>>>>> 4c1a3dd... Major update to code structure |
Iftekharul Islam | 99d199f | 2017-03-24 15:28:25 -0500 | [diff] [blame] | 88 | } |
| 89 | }; |
| 90 | }); |
| 91 | |
Michael Davis | dfad5d5 | 2017-07-20 14:53:46 -0500 | [diff] [blame^] | 92 | <<<<<<< HEAD |
Iftekharul Islam | cd78950 | 2017-04-19 14:37:55 -0500 | [diff] [blame] | 93 | })(window.angular); |
Michael Davis | dfad5d5 | 2017-07-20 14:53:46 -0500 | [diff] [blame^] | 94 | ======= |
| 95 | })(window.angular); |
| 96 | >>>>>>> 4c1a3dd... Major update to code structure |