diff --git a/CHANGES.md b/CHANGES.md index c7e6a5f2..0c9cd253 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ ## Version 1.23 +- Display API version in Org tab [feature 293](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/293) (feature by [Camille Guillory](https://github.com/CamilleGuillory)) - Add the possibility to hide fields API names after users clicked "Show fields API names" - Add performance On data export with option to disable in Options/Data Export tab (contribution by [Nathan Shulman](https://github.com/nshulman)) - Clean up popup header and footer (contribution by [Nathan Shulman](https://github.com/nshulman)) diff --git a/addon/manifest.json b/addon/manifest.json index 67da4217..edbe355c 100644 --- a/addon/manifest.json +++ b/addon/manifest.json @@ -1,8 +1,8 @@ { "name": "Salesforce Inspector reloaded", "description": "Productivity tools for Salesforce administrators and developers to inspect data and metadata directly from the Salesforce UI.", - "version": "1.22", - "version_name": "1.22", + "version": "1.23", + "version_name": "1.23", "icons": { "128": "icon128.png" }, diff --git a/addon/popup.js b/addon/popup.js index 24267e4a..69d2eeb6 100644 --- a/addon/popup.js +++ b/addon/popup.js @@ -1154,6 +1154,14 @@ class AllDataBoxOrg extends React.PureComponent { return null; } + getApiVersion(instanceStatus){ + if (instanceStatus){ + let apiVersion = (instanceStatus.releaseNumber.substring(0, 3) / 2) - 64; + return apiVersion; + } + return null; + } + setInstanceStatus(instanceName, sfHost){ let instanceStatusLocal = JSON.parse(sessionStorage.getItem(sfHost + "_instanceStatus")); if (instanceStatusLocal == null){ @@ -1205,6 +1213,10 @@ class AllDataBoxOrg extends React.PureComponent { h("th", {}, "Location:"), h("td", {}, this.state.instanceStatus?.location) ), + h("tr", {}, + h("th", {}, "API version:"), + h("td", {}, this.getApiVersion(this.state.instanceStatus)) + ), h("tr", {}, h("th", {}, h("a", {href: "https://status.salesforce.com/instances/" + orgInfo.InstanceName + "/maintenances", title: "Maintenance List", target: linkTarget}, "Maintenance:")), h("td", {}, this.getNextMajorRelease(this.state.instanceStatus?.Maintenances))