Show the VF module version on the view/edit screen
[vid.git] / vid-webpack-master / src / app / drawingBoard / service-planning / objectsToTree / shared.tree.service.ts
index 1e85127..249f9ec 100644 (file)
@@ -120,14 +120,24 @@ export class SharedTreeService {
 
   addingStatusProperty(node) {
     node['statusProperties'] = [];
-    node['statusProperties'].push({key: 'Prov Status:', value: node.provStatus, testId: 'provStatus'});
-    node['statusProperties'].push({key: 'Orch Status:', value: node.orchStatus, testId: 'orchStatus'});
+    node['statusProperties'].push({key: 'Prov Status: ', value: node.provStatus, testId: 'provStatus'});
+    node['statusProperties'].push({key: 'Orch Status: ', value: node.orchStatus, testId: 'orchStatus'});
+    if(node.type === 'VFmodule') {
+      node['statusProperties'].push({key: 'Model Version: ', value: this.getNodeModelVersion(node), testId: 'modelVersion'});
+    }
     if (node.inMaint) {
       node['statusProperties'].push({key: 'In-maintenance', value: '', testId: 'inMaint'});
     }
     return node;
   }
 
+   getNodeModelVersion(node): string | undefined {
+    if(!_.isNil(node.instanceModelInfo) && !_.isNil(node.instanceModelInfo.modelVersion)){
+      return node.instanceModelInfo.modelVersion;
+    }
+    return undefined;
+  }
+
   /**********************************************
    * should delete or remove child instance's
    "new" -> should remove