aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/resources/scss/modules/_softwareProductAttachmentPage.scss
AgeCommit message (Expand)AuthorFilesLines
2018-02-13heat validation flowsvishnev1-4/+29
2017-12-21Add collaboration featuretalig1-9/+19
2017-09-10Add latest bug fixes to masteravigaffa1-17/+17
2017-08-29Validation page icons fixSVISHNEV1-6/+0
2017-08-10[SDC] OnBoard with enabled tests and featuresaz24971-15/+17
2017-07-18[SDC] Onboarding 1710 rebase.Avi Ziv1-9/+10
2017-06-09[SDC-29] Amdocs OnBoard 1707 initial commit.AviZi1-100/+184
2017-02-19Add new code new versionMichael Lando1-0/+153
{ color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
import {LcpRegionsAndTenants} from "../../models/lcpRegionsAndTenants";
import {CategoryParams} from "../../models/categoryParams";
import {Action} from "redux";
import {ServiceActions} from "./service/service.actions";
import {GeneralActions} from "./general/general.actions";
import {NetworkActions} from "./network/network.actions";
import {VfModuleActions} from "./vfModule/vfModule.actions";
import {VNFActions} from "./vnf/vnf.actions";
import {vnfReducer} from "./vnf/vnf.reducers";
import {generalReducer} from "./general/general.reducers";
import {serviceReducer} from "./service/service.reducers";
import {networkReducer} from "./network/network.reducers";
import {vfModuleReducer} from "./vfModule/vfModule.reducers";
import {ServiceInstance} from "../../models/serviceInstance";
import {SelectOptionInterface} from "../../models/selectOption";
import {ServiceType} from "../../models/serviceType";
import {VnfGroupActions} from "./vnfGroup/vnfGroup.actions";
import {vnfGroupReducer} from "./vnfGroup/vnfGroup.reducers";
import {RelatedVnfActions} from "./relatedVnfMember/relatedVnfMember.actions";
import {relatedVnfMemeberReducer} from "./relatedVnfMember/relatedVnfMember.reducers";
import {VrfActions} from "./vrf/vrf.actions";
import {vrfReducer} from "./vrf/vrf.reducer";
import {CrActions} from "./cr/cr.actions";
import {crReducer} from "./cr/cr.reducer";
import {NcfActions} from "./ncf/ncf.actions";
import {ncfReducer} from "./ncf/ncf.reducer";

export let initialState: ServiceState = {
  serviceHierarchy: {},
  serviceInstance: {},
  lcpRegionsAndTenants: new LcpRegionsAndTenants(),
  subscribers: null,
  productFamilies: null,
  serviceTypes: {},
  aicZones: null,
  categoryParameters: new CategoryParams(),
  genericModalCriteria : {}
};


export interface ServiceState {
  serviceHierarchy: any;
  serviceInstance: { [uuid: string]: ServiceInstance; };
  lcpRegionsAndTenants: LcpRegionsAndTenants;
  subscribers: SelectOptionInterface[];
  productFamilies: any;
  serviceTypes: { [subscriberId: string]: ServiceType[]; };
  aicZones: SelectOptionInterface[];
  categoryParameters: CategoryParams;
  genericModalCriteria : { [field: string]: any; }
}

export const MainReducer = function (state: ServiceState = initialState, action: Action): ServiceState {
  console.info("action name", action.type);
  if(Object.values(ServiceActions).includes(action.type)){
    return serviceReducer(state, action);
  }else if (Object.values(GeneralActions).includes(action.type)){
    return generalReducer(state, action);
  }else if (Object.values(NetworkActions).includes(action.type)){
    return networkReducer(state, action);
  }else if (Object.values(VfModuleActions).includes(action.type)){
    return vfModuleReducer(state, action);
  }else if (Object.values(VNFActions).includes(action.type)){
    return vnfReducer(state, action);
  }else if (Object.values(VnfGroupActions).includes(action.type)){
    return vnfGroupReducer(state, action);
  }else if(Object.values(RelatedVnfActions).includes(action.type)){
    return relatedVnfMemeberReducer(state, action);
  }else if(Object.values(VrfActions).includes(action.type)) {
    return vrfReducer(state, action);
  }else if(Object.values(CrActions).includes(action.type)){
      return crReducer(state, action);
  }else if(Object.values(NcfActions).includes(action.type)){
      return ncfReducer(state, action);
  } else {
    return Object.assign({}, state);
  }
};