From d7cb3003edb84e211d096c0eaa3687885f21a0f7 Mon Sep 17 00:00:00 2001 From: Nathanael Jourdane Date: Wed, 25 Jan 2017 17:34:29 +0100 Subject: [PATCH] Add row number in the granules grid. --- js/app/views/EpnTapUI.js | 3 ++- php/classes/EpnTapMgr.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/js/app/views/EpnTapUI.js b/js/app/views/EpnTapUI.js index 140e95e..7d771ac 100644 --- a/js/app/views/EpnTapUI.js +++ b/js/app/views/EpnTapUI.js @@ -30,7 +30,7 @@ Ext.create('Ext.data.Store', { Ext.create('Ext.data.Store', { storeId:'granulesStore', - fields:['product_type', 'target_name', 'time_min', 'time_max', 'access_format', 'granule_uid', 'access_estsize', 'access_url', 'thumbnail_url'] + fields:['num', 'product_type', 'target_name', 'time_min', 'time_max', 'access_format', 'granule_uid', 'access_estsize', 'access_url', 'thumbnail_url'] }); Ext.define('amdaUI.EpnTapUI', { @@ -120,6 +120,7 @@ Ext.define('amdaUI.EpnTapUI', { store: Ext.data.StoreManager.lookup('granulesStore'), flex: 5, columns: [ + { text: 'Num', dataIndex: 'num', flex: 1, renderer: this.txtRender }, { text: 'Type', dataIndex: 'product_type', flex: 2, renderer: this.dptRender }, { text: 'Target', dataIndex: 'target_name', flex: 2, renderer: this.txtRender }, { text: 'Time min', dataIndex: 'time_min', flex: 2, renderer: this.txtRender }, diff --git a/php/classes/EpnTapMgr.php b/php/classes/EpnTapMgr.php index 2f471c2..2dc60b0 100644 --- a/php/classes/EpnTapMgr.php +++ b/php/classes/EpnTapMgr.php @@ -58,6 +58,7 @@ class EpnTapMgr { // return $query; $result = $this->request($access_url, $query); for ($i = 0 ; $i < sizeof($result) ; $i++) { + $result[$i]['num'] = $i + $offset + 1; $result[$i]['time_min'] = $this->JDTodate($result[$i]['time_min']); $result[$i]['time_max'] = $this->JDTodate($result[$i]['time_max']); } -- libgit2 0.21.2