Rift.IO OSM R1 Initial Submission
[osm/UI.git] / skyquake / plugins / launchpad / src / createStore.js
1
2 /*
3 *
4 * Copyright 2016 RIFT.IO Inc
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19 var alt = require('../core/alt');
20 function CreateFleet () {
21 this.exportAsync(require('./createSource.js'));
22 this.bindActions(require('./createActions.js'));
23 this.nsd = [];
24 this.vnfd = [];
25 this.pnfd = [];
26 validateErrorEvent = false;
27 validateErrorMsg = "";
28 };
29
30 CreateFleet.prototype.getNetworkServicesSuccess = function(data) {
31 this.setState({
32 networkServices: data
33 })
34 };
35 CreateFleet.prototype.getSlaParamsSuccess = function(data) {
36 this.setState({
37 slaParams: data
38 })
39 };
40 CreateFleet.prototype.getPoolsSuccess = function(data) {
41 this.setState({
42 pools: data
43 })
44 };
45 CreateFleet.prototype.validateError = function(msg) {
46 this.setState({
47 validateErrorEvent: true,
48 validateErrorMsg: msg
49 });
50 };
51 CreateFleet.prototype.validateReset = function() {
52 this.setState({
53 validateErrorEvent: false
54 });
55 };
56
57 module.exports = alt.createStore(CreateFleet);
58