summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui/components/pods/pod/pod.html
diff options
context:
space:
mode:
authorthuva4 <tharma.thuva@gmail.com>2018-03-31 10:58:08 +0530
committerthuva4 <tharma.thuva@gmail.com>2018-03-31 10:58:08 +0530
commit8d6380265299c36f6356c746460baa0cfd2ad4e1 (patch)
treec7f70dd55350b5d78ba8c240dcc4660fe6f878cc /testapi/opnfv_testapi/ui/components/pods/pod/pod.html
parentc20c8286d72ca64751162b1932e0e3f680f0e32f (diff)
Remove code duplication in pod page
Create a service to map the object field with the data label. Change-Id: I0c3e96dca01a27ec4785c1426d82e115afb6c1df Signed-off-by: thuva4 <tharma.thuva@gmail.com>
Diffstat (limited to 'testapi/opnfv_testapi/ui/components/pods/pod/pod.html')
-rw-r--r--testapi/opnfv_testapi/ui/components/pods/pod/pod.html30
1 files changed, 4 insertions, 26 deletions
diff --git a/testapi/opnfv_testapi/ui/components/pods/pod/pod.html b/testapi/opnfv_testapi/ui/components/pods/pod/pod.html
index 6aace92..f9ab7c1 100644
--- a/testapi/opnfv_testapi/ui/components/pods/pod/pod.html
+++ b/testapi/opnfv_testapi/ui/components/pods/pod/pod.html
@@ -3,33 +3,11 @@
<div class="table-responsive">
<table class="table" ng-data="ctrl.data.pods">
<tbody>
- <tr style="padding:9px">
- <td class="podsTableTd">Id&nbsp;:</td>
- <td class="podsTableLeftTd">{{ctrl.data._id}}</td>
+ <tr ng-repeat-start="(index, detail) in ctrl.data_field" style="padding:9px">
+ <td class="podsTableTd">{{detail | capitalize}}&nbsp;:</td>
+ <td width="90%" class="podsTableLeftTd">{{ctrl.data[index]}}</td>
</tr>
- <tr style="padding:9px">
- <td class="podsTableTd">Name&nbsp;:</td>
- <td width="90%" class="podsTableLeftTd">{{ctrl.data.name}}</td>
- </tr>
- <tr style="padding:9px">
- <td class="podsTableTd">Creator&nbsp;:</td>
- <td width="90%" class="podsTableLeftTd">{{ctrl.data.creator}}</td>
- </tr>
- <tr style="padding:9px">
- <td class="podsTableTd">Role&nbsp;:</td>
- <td width="90%" class="podsTableLeftTd">{{ctrl.data.role}}</td>
- </tr>
- <tr style="padding:9px">
- <td class="podsTableTd">Mode&nbsp;:</td>
- <td width="90%" class="podsTableLeftTd">{{ctrl.data.mode}}</td>
- </tr>
- <tr style="padding:9px">
- <td class="podsTableTd">Created&nbsp;at&nbsp;:</td>
- <td width="90%" class="podsTableLeftTd">{{ctrl.data['creation_date']}}</td>
- </tr>
- <tr style="padding:9px">
- <td class="podsTableTd">Details&nbsp;:</td>
- <td width="90%" class="podsTableLeftTd">{{ctrl.data.details}}</td>
+ <tr ng-repeat-end=>
</tr>
</tbody>
</table>