From df69920a2e227bffa1cd9529797f680e81381624 Mon Sep 17 00:00:00 2001 From: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com> Date: Mon, 10 Jan 2022 16:55:00 -0600 Subject: [PATCH] Moved dataset editor lock to top of component (#17930) --- .../Datasource/DatasourceEditor.jsx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx index 0c617c1ff15c6..bfb55e20f31df 100644 --- a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx @@ -879,6 +879,23 @@ class DatasourceEditor extends React.PureComponent { const { datasource } = this.state; return (
+ {this.allowEditSource && ( + + + {this.state.isEditMode ? ( + + ) : ( + + )} + + {!this.state.isEditMode && ( +
{t('Click the lock to make changes.')}
+ )} + {this.state.isEditMode && ( +
{t('Click the lock to prevent further changes.')}
+ )} +
+ )}
{DATASOURCE_TYPES_ARR.map(type => ( )} - {this.allowEditSource && ( - - - {this.state.isEditMode ? ( - - ) : ( - - )} - - {!this.state.isEditMode && ( -
{t('Click the lock to make changes.')}
- )} - {this.state.isEditMode && ( -
{t('Click the lock to prevent further changes.')}
- )} -
- )}
); }