Commit d7cb3003edb84e211d096c0eaa3687885f21a0f7

Authored by Nathanael Jourdane
1 parent 47a2829d

Add row number in the granules grid.

Showing 2 changed files with 3 additions and 1 deletions   Show diff stats
js/app/views/EpnTapUI.js
... ... @@ -30,7 +30,7 @@ Ext.create('Ext.data.Store', {
30 30  
31 31 Ext.create('Ext.data.Store', {
32 32 storeId:'granulesStore',
33   - fields:['product_type', 'target_name', 'time_min', 'time_max', 'access_format', 'granule_uid', 'access_estsize', 'access_url', 'thumbnail_url']
  33 + fields:['num', 'product_type', 'target_name', 'time_min', 'time_max', 'access_format', 'granule_uid', 'access_estsize', 'access_url', 'thumbnail_url']
34 34 });
35 35  
36 36 Ext.define('amdaUI.EpnTapUI', {
... ... @@ -120,6 +120,7 @@ Ext.define('amdaUI.EpnTapUI', {
120 120 store: Ext.data.StoreManager.lookup('granulesStore'),
121 121 flex: 5,
122 122 columns: [
  123 + { text: 'Num', dataIndex: 'num', flex: 1, renderer: this.txtRender },
123 124 { text: 'Type', dataIndex: 'product_type', flex: 2, renderer: this.dptRender },
124 125 { text: 'Target', dataIndex: 'target_name', flex: 2, renderer: this.txtRender },
125 126 { text: 'Time min', dataIndex: 'time_min', flex: 2, renderer: this.txtRender },
... ...
php/classes/EpnTapMgr.php
... ... @@ -58,6 +58,7 @@ class EpnTapMgr {
58 58 // return $query;
59 59 $result = $this->request($access_url, $query);
60 60 for ($i = 0 ; $i < sizeof($result) ; $i++) {
  61 + $result[$i]['num'] = $i + $offset + 1;
61 62 $result[$i]['time_min'] = $this->JDTodate($result[$i]['time_min']);
62 63 $result[$i]['time_max'] = $this->JDTodate($result[$i]['time_max']);
63 64 }
... ...