Commit f82d19f18d19056208522e0af0cc166b0858c881
1 parent
c7967cba
Exists in
master
and in
111 other branches
Display granules with horizotal scrollbar
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
php/epntap.php
... | ... | @@ -161,10 +161,11 @@ function getGranules() { |
161 | 161 | // error_log('getGranules query: ' . $query); |
162 | 162 | $response = request($url, $query); |
163 | 163 | if($response['success']) { |
164 | - $visibleColumns = ['granule_uid', 'dataproduct_type', 'time_min', 'time_max', 'access_estsize', 'thumbnail_url', 'access_url']; // rest are hidden | |
165 | - $names = ['dataproduct_type' => 'Type', 'access_estsize' => 'Size']; // default: pretty printed key name | |
166 | - $renderers = ['dataproduct_type' => 'type', 'time_min' => 'date', 'time_max' => 'date', 'access_estsize' => 'size', 'thumbnail_url' => 'img', 'access_url' => 'link', 'access_format' => 'format']; // default: text | |
167 | - $flexs = ['granule_uid' => 2]; // default: 1 | |
164 | + $visibleColumns = ['granule_gid', 'obs_id', 'dataproduct_type', 'time_min', 'time_max', 'instrument_name', 'processing_level', 'access_estsize', 'thumbnail_url', 'access_url']; // rest are hidden | |
165 | + $names = ['granule_gid' => 'GID', 'dataproduct_type' => 'Type', 'processing_level' => 'Proc. lvl', 'access_estsize' => 'Size', 'access_url' => 'URL']; // default: pretty printed key name | |
166 | + $renderers = ['dataproduct_type' => 'type', 'time_min' => 'date', 'time_max' => 'date', 'processing_level' => 'proc_lvl', | |
167 | + 'access_estsize' => 'size', 'thumbnail_url' => 'img', 'access_url' => 'link', 'access_format' => 'format']; // default: text | |
168 | + $widths = ['obs_id' => 75, 'time_min' => 75, 'time_max' => 75, 'instrument_name' => 75, 'processing_level' => 60]; // default: 50 | |
168 | 169 | |
169 | 170 | $fields = array(); |
170 | 171 | $columns = array(); |
... | ... | @@ -173,9 +174,8 @@ function getGranules() { |
173 | 174 | $columns[] = [ |
174 | 175 | 'dataIndex' => $key, |
175 | 176 | 'text' => array_key_exists($key, $names) ? $names[$key] : ucfirst(str_replace('_', ' ', $key)), |
176 | - 'flex' => array_key_exists($key, $flexs) ? $flexs[$key] : 1, | |
177 | + 'width' => array_key_exists($key, $widths) ? $widths[$key] : 50, | |
177 | 178 | 'hidden' => !in_array($key, $visibleColumns), |
178 | - // 'type' => array_key_exists(gettype(), $types), | |
179 | 179 | 'renderer' => array_key_exists($key, $renderers) ? $renderers[$key] : 'text' |
180 | 180 | ]; |
181 | 181 | } |
... | ... |