Commit 34cf0b45e498c6c9cdcc908ba8214b0146bf580a

Authored by Nathanael Jourdane
1 parent 76142bdf

Display table name instead of short name.

Showing 1 changed file with 4 additions and 3 deletions   Show diff stats
js/app/views/EpnTapUI.js
... ... @@ -244,7 +244,7 @@ Ext.define('App.util.Format', {
244 244 const infoColor = sData['nb_results'] === -2 ? 'IndianRed' : 'green'
245 245 const info = sData.info.length > 0 ? '<p style="color:' + infoColor + '">' + sData.info + '</p>' : ''
246 246  
247   - const colums = ['res_title', 'ivoid', 'access_url', 'table_name', 'content_type', 'creator_seq', 'content_level', 'reference_url', 'created', 'updated']
  247 + const colums = ['short_name', 'res_title', 'ivoid', 'access_url', 'table_name', 'content_type', 'creator_seq', 'content_level', 'reference_url', 'created', 'updated']
248 248 // noinspection ES6ConvertVarToLetConst
249 249 var details = ''
250 250 // noinspection ES6ConvertVarToLetConst
... ... @@ -257,7 +257,8 @@ Ext.define(&#39;App.util.Format&#39;, {
257 257 return info + '<ul>' + details + '</ul>'
258 258 },
259 259 'service.text': function (data, metadata, record) {
260   - return Ext.util.Format.cell(data, Ext.util.Format.serviceTooltip(record.data), data)
  260 + const serviceName = Ext.util.Format.prettify(data.replace('.epn_core' , ''))
  261 + return Ext.util.Format.cell(serviceName, Ext.util.Format.serviceTooltip(record.data), data)
261 262 },
262 263 'service.number': function (data, metadata, record) {
263 264 const block = Math.pow(10, 3)
... ... @@ -627,7 +628,7 @@ Ext.define(&#39;amdaUI.EpnTapUI&#39;, {
627 628 store: Ext.data.StoreManager.lookup('servicesStore'),
628 629 flex: 1,
629 630 columns: [
630   - {text: 'Name', dataIndex: 'short_name', flex: 1, renderer: 'service.text'},
  631 + {text: 'Name', dataIndex: 'table_name', flex: 1, renderer: 'service.text'},
631 632 {text: 'Nb res.', dataIndex: 'nb_results', width: 50, renderer: 'service.number'}
632 633 ],
633 634 viewConfig: {
... ...