Michael Lando | dd60339 | 2017-07-12 00:54:52 +0300 | [diff] [blame] | 1 | /*- |
| 2 | * ============LICENSE_START======================================================= |
| 3 | * SDC |
| 4 | * ================================================================================ |
| 5 | * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. |
| 6 | * ================================================================================ |
| 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | * you may not use this file except in compliance with the License. |
| 9 | * You may obtain a copy of the License at |
| 10 | * |
| 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | * |
| 13 | * Unless required by applicable law or agreed to in writing, software |
| 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | * See the License for the specific language governing permissions and |
| 17 | * limitations under the License. |
| 18 | * ============LICENSE_END========================================================= |
| 19 | */ |
| 20 | |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 21 | /** |
| 22 | * Created by obarda on 2/23/2016. |
| 23 | */ |
| 24 | 'use strict'; |
| 25 | import {ComponentType} from "../utils/constants"; |
| 26 | |
| 27 | interface IAvailableIconsService { |
| 28 | getIcons(componentType:ComponentType):Array<string>; |
| 29 | } |
| 30 | |
| 31 | export class AvailableIconsService implements IAvailableIconsService { |
| 32 | constructor() { |
| 33 | } |
| 34 | |
| 35 | public getIcons = (componentType:string):Array<string> => { |
| 36 | |
| 37 | let icons:Array<string>; |
| 38 | |
| 39 | switch (componentType) { |
| 40 | case ComponentType.SERVICE: |
| 41 | icons = [ |
| 42 | 'call_controll', |
| 43 | 'mobility', |
| 44 | 'network_l_1-3', |
| 45 | 'network_l_4' |
| 46 | ]; |
| 47 | break; |
| 48 | |
| 49 | case ComponentType.RESOURCE: |
| 50 | icons = [ |
| 51 | 'router', |
| 52 | 'database', |
| 53 | 'network', |
| 54 | 'objectStorage', |
| 55 | 'connector', |
| 56 | 'brocade', |
| 57 | 'cisco', |
| 58 | 'ericsson', |
| 59 | 'tropo', |
| 60 | 'fortinet', |
| 61 | 'att', |
| 62 | 'broadsoft', |
| 63 | 'alcatelLucent', |
| 64 | 'metaswitch', |
| 65 | 'aricent', |
| 66 | 'mySql', |
| 67 | 'oracle', |
| 68 | 'nokia_siemens', |
| 69 | 'juniper', |
| 70 | 'call_controll', |
| 71 | 'borderElement', |
| 72 | 'applicationServer', |
| 73 | 'server', |
| 74 | 'port', |
| 75 | 'loadBalancer', |
| 76 | 'compute', |
| 77 | 'gateway', |
| 78 | 'cp', |
| 79 | 'vl', |
| 80 | 'vfw', |
| 81 | 'firewall' |
| 82 | ]; |
| 83 | break; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 84 | } |
| 85 | return icons; |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | |
| 90 | |