dynatrace-oss / DynatraceDashboardPowerups

Chrome Extension to boost DT dashboards
Apache License 2.0
39 stars 12 forks source link

!PU(table) sort not updating first column #118

Closed jshuff27 closed 2 years ago

jshuff27 commented 3 years ago

This might be related just to Data Explorer tables.

I create a Data Explorer table then used the !PU(table). The table consists of just the host name and the CPU Usage %. I created a table both without setting the sort value in Data Explorer and with setting the sort value in Data Explorer, and had the same result.

The table displays in the dashboard just fine. Powerup re-renders the table. I can click on the CPU Usage % column header and it does successfully sort the CPU Usage % in ASC and DESC order but the first column, which is the Host Name remains where it is with no changes. If I were to click on the Host Column (first column) i see the CPU Usage % re-order but again the Host Names don't move.

TechShady commented 3 years ago

Can you export the dashboard json and paste it here? Then I can gig into it in more detail...

jshuff27 commented 3 years ago

sure, i kept it super simple as this was just a test.

{ "metadata": { "configurationVersions": [ 5 ], "clusterVersion": "1.228.103.20211019-165601" }, "id": "a9ee8ec7-0354-4011-b102-21a381aa0b5d", "dashboardMetadata": { "name": "New dashboard (Oct 22, 2021 10:07:25)", "shared": true, "owner": "email@me.com" }, "tiles": [ { "name": "H !PU(table):", "tileType": "DATA_EXPLORER", "configured": true, "bounds": { "top": 0, "left": 76, "width": 798, "height": 760 }, "tileFilter": {}, "customName": "Data explorer results", "queries": [ { "id": "A", "timeAggregation": "DEFAULT", "metricSelector": "builtin:host.cpu.usage:splitBy(\"dt.entity.host\"):avg:auto:limit(100)", "enabled": true } ], "visualConfig": { "type": "TABLE", "global": { "theme": "DEFAULT", "threshold": { "axisTarget": "LEFT", "columnId": "CPU usage %", "rules": [ { "color": "#7dc540" }, { "color": "#f5d30f" }, { "color": "#dc172a" } ], "visible": true }, "seriesType": "LINE", "hideLegend": false }, "rules": [ { "matcher": "A:", "properties": { "color": "ORANGE", "seriesType": "COLUMN" } } ], "axes": { "xAxis": { "displayName": "", "visible": true }, "yAxes": [ { "displayName": "", "visible": true, "min": "AUTO", "max": "AUTO", "position": "LEFT", "queryIds": [ "A" ], "defaultAxis": true } ] }, "thresholds": [ { "axisTarget": "LEFT", "columnId": "CPU usage %", "rules": [ { "color": "#7dc540" }, { "color": "#f5d30f" }, { "color": "#dc172a" } ], "visible": true } ] } } ] }

TechShady commented 3 years ago

I tested this out and get the same for explorer tables. USQL tables work fine.

LucasHocker commented 2 years ago

Added handling for when cells are instead of , resolving unsorted column. Also found an issue with numeric sorting, which is also now fixed. Uploaded to GitHub, adding to ChromeStore version 1.58.