Add region support for Openstack account
[osm/UI.git] / skyquake / plugins / accounts / src / account / accountStore.js
index a9a6d1e..5d5bd2f 100644 (file)
@@ -125,6 +125,18 @@ let AccountMeta = {
                 label: 'Floating IP Pool',
                 ref: 'floating-ip-pool',
                 optional: true
+            }, {
+                label: "User Domain",
+                ref: 'user-domain',
+                optional: true
+            }, {
+                label: "Project Domain",
+                ref: 'project-domain',
+                optional: true
+            }, {
+              label: "Region",
+              ref: 'region',
+              optional: true
             }],
             "openvim": [{
                 label: "Host",
@@ -352,7 +364,7 @@ export default class AccountStore {
     }
     generateOptionsByName(data) {
         let results = [];
-        if (data.constructor.name == "Array") {
+        if (data && data.constructor.name == "Array") {
           data.map(function(d) {
               results.push({
                   label: d.name,