Fixed bug in XosFormHelpers._getFieldFormat and correctly parsing data in xosSmartTable

Change-Id: Iee9875d7bcbdac2bf2b716244f0dd16de5fbfc99
diff --git a/dev/index.html b/dev/index.html
index dea5eef..e0cd09f 100644
--- a/dev/index.html
+++ b/dev/index.html
@@ -34,10 +34,10 @@
   <script src="/ui_components/smartComponents/smartTable/smartTable.component.js"></script>
   <script src="/ui_components/smartComponents/smartPie/smartPie.component.js"></script>
   <script src="/ui_components/dumbComponents/validation/validation.component.js"></script>
-  <script src="/ui_components/dumbComponents/table/table.component.js"></script>
   <script src="/ui_components/dumbComponents/pagination/pagination.component.js"></script>
-  <script src="/ui_components/dumbComponents/field/field.component.js"></script>
   <script src="/ui_components/dumbComponents/form/form.component.js"></script>
+  <script src="/ui_components/dumbComponents/table/table.component.js"></script>
+  <script src="/ui_components/dumbComponents/field/field.component.js"></script>
   <script src="/ui_components/dumbComponents/alert/alert.component.js"></script>
   <script src="/services/helpers/ui/label_formatter.service.js"></script>
   <script src="/services/helpers/ui/form.helpers.js"></script>
@@ -79,6 +79,7 @@
   <script src="js/field.dev.js"></script>
   <script src="js/alert.dev.js"></script>
   <script src="js/table.dev.js"></script>
+  <script src="js/smart-table.dev.js"></script>
 
 </body>
 </html>
\ No newline at end of file
diff --git a/dev/js/form.dev.js b/dev/js/form.dev.js
index 99afda0..c693318 100644
--- a/dev/js/form.dev.js
+++ b/dev/js/form.dev.js
@@ -40,6 +40,14 @@
               minlength: 10

             }

           },

+          select: {

+            label: 'select',

+            type: 'select',

+            options: [

+              {id: 1, label: 'a'},

+              {id: 2, label: 'b'}

+            ]

+          },

           details_field: {

             label: 'Empty Object Field',

             type: 'object',

diff --git a/dev/js/main.js b/dev/js/main.js
index 6026569..445374d 100644
--- a/dev/js/main.js
+++ b/dev/js/main.js
@@ -1,11 +1,7 @@
 /* eslint-disable angular/ng_module_name */
 (function(){
   'use strict';
-  console.log('hello!');
   angular.module('ngXosLib', ['xos.helpers', 'ui.router'])
-  .run(function () {
-    console.info('Dev Environment ready!')
-  })
   .config(($stateProvider) => {
     $stateProvider
     .state('form-test', {
@@ -24,6 +20,10 @@
       url: '/field/',
       template: '<field-test></field-test>'
     })
+    .state('smart-table-test', {
+      url: '/smartTable/',
+      template: '<smart-table-test></smart-table-test>'
+    })
   })
   .component('navDemo', {
     restrict: 'E',
@@ -35,8 +35,7 @@
 
       this.active = 'form';
 
-      $rootScope.$on('$stateChangeSuccess', (event, toState, toParams, fromState, fromParams)=> {
-
+      $rootScope.$on('$stateChangeSuccess', (event, toState) => {
         let strSelected = toState.url.split('/').join('');
         this.active = strSelected.charAt(0).toUpperCase() + strSelected.slice(1);
       });
@@ -64,7 +63,11 @@
             label: 'Table',
             class: '',
             link: '/#/table/'
-
+          },
+          {
+            label: 'SmartTable',
+            class: '',
+            link: '/#/smartTable/'
           }
         ]
       }
diff --git a/dev/js/smart-table.dev.js b/dev/js/smart-table.dev.js
new file mode 100644
index 0000000..0388e19
--- /dev/null
+++ b/dev/js/smart-table.dev.js
@@ -0,0 +1,52 @@
+(function () {
+  'use strict';
+
+  const data = [
+    {
+      'humanReadableName': 'cordSubscriber-1',
+      'id': 1,
+      'features': {
+        'cdn': false,
+        'uplink_speed': 1000000000,
+        'downlink_speed': 1000000000,
+        'uverse': true,
+        'status': 'enabled'
+      },
+      'identity': {'account_num': '123',
+      'name': 'My House'},
+      'related': {
+        'instance_name': 'mysite_vsg',
+        'vsg_id': 7,
+        'compute_node_name': 'nova-compute-1',
+        'c_tag': 111,
+        'instance_id': 1,
+        'wan_container_ip': '10.168.0.3',
+        'volt_id': 6,
+        's_tag': 222
+      }
+    }
+  ]
+
+  angular.module('ngXosLib')
+  .service('Resource', function($q){
+    this.query = () => {
+      const d = $q.defer();
+      console.log(data);
+      d.resolve(data)
+
+      return {$promise: d.promise}
+    }
+  })
+  .component('smartTableTest', {
+    restrict: 'E',
+    bindings: {},
+    bindToController: true,
+    controllerAs: 'vm',
+    templateUrl: 'templates/smart-table.dev.html',
+    controller: function () {
+      this.config = {
+        resource: 'Resource'
+      };
+    }
+  })
+})(); 
\ No newline at end of file
diff --git a/dev/templates/smart-table.dev.html b/dev/templates/smart-table.dev.html
new file mode 100644
index 0000000..2c74e70
--- /dev/null
+++ b/dev/templates/smart-table.dev.html
@@ -0,0 +1 @@
+<xos-smart-table config="vm.config"></xos-smart-table>
\ No newline at end of file