ui fixes for aci config 61/39061/1
authorKoren Lev <korenlev@gmail.com>
Thu, 10 Aug 2017 12:35:12 +0000 (15:35 +0300)
committerKoren Lev <korenlev@gmail.com>
Thu, 10 Aug 2017 12:35:12 +0000 (15:35 +0300)
Change-Id: I2e873be74bf146201a7f425a5e09a22b40afbfa2
Signed-off-by: Koren Lev <korenlev@gmail.com>
ui/howto_build.md [new file with mode: 0644]
ui/imports/api/environments/configuration-groups/aci-configuration.js
ui/imports/api/environments/environments.js
ui/imports/api/environments/methods.js
ui/imports/ui/components/env-main-info/env-main-info.html
ui/imports/ui/components/environment-wizard/environment-wizard.js

diff --git a/ui/howto_build.md b/ui/howto_build.md
new file mode 100644 (file)
index 0000000..7dfb79e
--- /dev/null
@@ -0,0 +1,43 @@
+# Calipso
+
+## Run
+
+```bash                        
+./run.sh
+```
+
+## Build
+  
+```bash
+meteor build --architecture=os.linux.x86_64 ./
+```
+  
+### Soruce Build
+
+```bash
+tar --exclude='./.meteor/local' --exclude='./node_modules' --exclude='./.git' -zcvf ../calipso-source-$(date +%Y-%m-%d).tar.gz .
+```
+## Testing - Build with Docker 
+  
+Testing on staging
+
+```bash
+docker run -d \
+    -e ROOT_URL=http://testing-server-example.com \
+    -e MONGO_URL=mongodb://testing-server-example.com:27017/calipso \
+    -v /home/ofir/calipso:/bundle \
+    -p 80:80 \
+    kadirahq/meteord:base
+```
+
+Testing on local
+
+```bash
+docker run \
+   --net=host \
+   -e ROOT_URL=http://localhost \
+   -e MONGO_URL=mongodb://localhost:27017/calipso \
+   -v /home/eyal_work/projects/cisco/output:/bundle \
+   kadirahq/meteord:base
+```
+
index 10b749e..dd2c089 100644 (file)
@@ -16,7 +16,7 @@ export const AciSchema = new SimpleSchema({
   host: { 
     type: String,
     regEx: SimpleSchema.RegEx.IP,
-    defaultValue: '10.56.0.104',
+    defaultValue: '10.0.0.1',
   },
   user: { 
     type: String, 
@@ -24,6 +24,6 @@ export const AciSchema = new SimpleSchema({
   },
   pwd: { 
     type: String,
-    defaultValue: 'C1sco12345'
+    defaultValue: '123456'
   },
 });
index d616960..5e3b4b2 100644 (file)
@@ -68,7 +68,7 @@ let simpleSchema = new SimpleSchema({
           listen 
         } = extractCalcEnvSupportedRelatedValues(that);
         let dbNode = getDbNode(that);
-        let aci = extractValue('aci', that, dbNode);
+        let aci_enabled = extractValue('aci_enabled', that, dbNode);
 
         if (enable_monitoring && isMonitoringSupportedRes) {
           if (! R.find(R.propEq('name', 'Monitoring'), confGroups)) {
@@ -88,7 +88,7 @@ let simpleSchema = new SimpleSchema({
           confGroups = R.reject(R.propEq('name', 'AMQP'), confGroups);
         }
 
-        if (aci) {
+        if (aci_enabled) {
           if (! R.find(R.propEq('name', 'ACI'), confGroups)) {
             confGroups = R.append(createNewConfGroup('ACI'), confGroups);
           }
@@ -301,7 +301,7 @@ let simpleSchema = new SimpleSchema({
       return newValue;
     },
   },
-  aci: {
+  aci_enabled: {
     type: Boolean,
     defaultValue: false,
   },
index 22a1e8b..6d5e73e 100644 (file)
@@ -34,7 +34,7 @@ export const insert = new ValidatedMethod({
       'mechanism_drivers.$',
       'listen',
       'enable_monitoring', 
-      'aci',
+      'aci_enabled',
     ]).validator({ clean: true, filter: false }), 
   //validate: null, 
   run({
@@ -45,7 +45,7 @@ export const insert = new ValidatedMethod({
     mechanism_drivers,
     listen,
     enable_monitoring,
-    aci,
+    aci_enabled,
   }) {
     // todo: create clean object instance.
     let environment = Environments.schema.clean({
@@ -70,7 +70,7 @@ export const insert = new ValidatedMethod({
       listen,
       enable_monitoring,
       auth,
-      aci,
+      aci_enabled,
     });
 
     Environments.insert(environment);
@@ -90,7 +90,7 @@ export const update = new ValidatedMethod({
     'mechanism_drivers.$',
     'listen',
     'enable_monitoring',
-    'aci',
+    'aci_enabled',
   ]).validator({ clean: true, filter: false }),
   run({
     _id,
@@ -101,7 +101,7 @@ export const update = new ValidatedMethod({
     mechanism_drivers,
     listen,
     enable_monitoring,
-    aci,
+    aci_enabled,
   }) {
     let env = Environments.findOne({ _id: _id });
 
@@ -120,7 +120,7 @@ export const update = new ValidatedMethod({
         mechanism_drivers,
         listen,
         enable_monitoring,
-        aci,
+        aci_enabled,
       },
     });
   }
index c3bda99..b8b7d26 100644 (file)
 
         <div class="col-sm-3">
           {{> InputModel(createInputArgs
-                value=model.aci
-                key='aci'
+                value=model.aci_enabled
+                key='aci_enabled'
                 type="checkbox"
                 disabled=disabled)
           }}
index ac3db63..ddc97cf 100644 (file)
@@ -156,7 +156,7 @@ Template.EnvironmentWizard.helpers({
 
     let amqpTabDisabled = !(environmentModel.listen && isListeningSupportedRes);
     let monitoringTabDisabled = !(environmentModel.enable_monitoring && isMonSupportedRes);
-    let isAciTabDisabled = !(environmentModel.aci);
+    let isAciTabDisabled = !(environmentModel.aci_enabled);
 
     return [{
       label: 'Main Info',
@@ -427,7 +427,7 @@ function doSubmit(instance) {
       mechanism_drivers: environment.mechanism_drivers,
       listen: environment.listen,
       enable_monitoring: environment.enable_monitoring,
-      aci: environment.aci,
+      aci_enabled: environment.aci_enabled,
     }, processActionResult.bind(null, instance));
     break;
 
@@ -441,7 +441,7 @@ function doSubmit(instance) {
       mechanism_drivers: environment.mechanism_drivers,
       listen: environment.listen,
       enable_monitoring: environment.enable_monitoring,
-      aci: environment.aci,
+      aci_enabled: environment.aci_enabled,
     }, processActionResult.bind(null, instance));
     break;