+
-
+
+ {(confirmDelete) => {
+ const bulkActions = [];
+ if (this.canDelete) {
+ bulkActions.push({
+ key: 'delete',
+ name: <> Delete>,
+ onSelect: confirmDelete,
+ });
+ }
+ if (this.canExport) {
+ bulkActions.push({
+ key: 'export',
+ name: <> Export>,
+ onSelect: this.handleBulkDashboardExport,
+ });
+ }
+ return (
+
+ );
+ }}
+
-
-
-
-
- {t('Are you sure you want to delete')}{' '}
- {this.state.deleteCandidate.dashboard_title}?
-
-
-
-
-
-
);
}
+
+ private hasPerm = (perm: string) => {
+ if (!this.state.permissions.length) {
+ return false;
+ }
+
+ return Boolean(this.state.permissions.find((p) => p === perm));
+ }
}
export default withToasts(DashboardList);
diff --git a/superset/assets/tslint.json b/superset/assets/tslint.json
index 021699e8190cc..bd9c88f896d8d 100644
--- a/superset/assets/tslint.json
+++ b/superset/assets/tslint.json
@@ -1,11 +1,14 @@
{
"extends": ["tslint:recommended", "tslint-react"],
- "jsRules": {},
+ "jsRules": {
+ "no-console": false
+ },
"rules": {
"interface-name": [true, "never-prefix"],
"quotemark": [true, "single"],
"jsx-no-multiline-js": false,
- "jsx-no-lambda": false
+ "jsx-no-lambda": false,
+ "no-console": false
},
"rulesDirectory": []
}