Fixing backend_code and backend_status

Change-Id: I16c78aa64582488267ed3e1227b54740e76bdfc0
diff --git a/src/app/core/debug/debug-model.html b/src/app/core/debug/debug-model.html
index cf74189..078e041 100644
--- a/src/app/core/debug/debug-model.html
+++ b/src/app/core/debug/debug-model.html
@@ -13,9 +13,8 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-
-<div class="row" ng-if="vm.ngModel[field]" ng-repeat="field in vm.debugFields">
-    <div class="col-xs-12">
+<div class="row" ng-repeat="field in vm.debugFields">
+    <div class="col-xs-12" ng-if="vm.ngModel[field] !== undefined">
         <label>{{vm.toLabel(field)}}</label>
         <pre>{{vm.parseField(field, vm.ngModel[field])}}</pre>
     </div>
diff --git a/src/app/core/services/helpers/config.helpers.ts b/src/app/core/services/helpers/config.helpers.ts
index 891d68a..445386a 100644
--- a/src/app/core/services/helpers/config.helpers.ts
+++ b/src/app/core/services/helpers/config.helpers.ts
@@ -85,6 +85,8 @@
     'backend_need_reap',
     'leaf_model_name',
     'link_deleted_count',
+    'policy_code',
+    'backend_code',
   ];
 
   public form_excluded_fields = this.excluded_fields.concat([
@@ -202,18 +204,21 @@
       }
 
       if (f.name === 'backend_status' || f.name === 'policy_status') {
+
+        const statusCol = f.name === 'backend_status' ? 'backend_code' : 'policy_code';
+
         col.type = 'icon';
         col.hover = (item) => {
           return item[f.name];
         };
         col.formatter = (item) => {
-          if (item[f.name].indexOf('1') > -1) {
+          if (parseInt(item[statusCol], 10) === 1) {
             return 'check';
           }
-          if (item[f.name].indexOf('2') > -1) {
+          if (parseInt(item[statusCol], 10) === 2) {
             return 'exclamation-circle';
           }
-          if (item[f.name].indexOf('0') > -1) {
+          if (parseInt(item[statusCol], 10) === 0) {
             return 'clock-o';
           }
         };