mistercrunch commented on a change in pull request #4760: URL shortner for
dashboards
URL:
https://github.com/apache/incubator-superset/pull/4760#discussion_r179325754
##########
File path: superset/assets/javascripts/dashboard/dashboardUtils.js
##########
@@ -0,0 +1,17 @@
+/* eslint camelcase: 0 */
+import URI from 'urijs';
+
+export function getURIDirectory(dashboard) {
+ // Building the directory part of the URI
+ const dashboardId = dashboard.slug || dashboard.id;
+ const directory = '/superset/dashboard/' + dashboardId + '/';
Review comment:
nit we prefer template literals as in
```javascript
`/superset/dashboard/${dashboardId}/`
```
instead of `+`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services