You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2021/10/07 20:35:49 UTC
[superset] 01/01: boilerplate
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch hugh/edit-owners
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 490232c390b76df497f6464c6e761ffe754eebc4
Author: hughhhh <hu...@gmail.com>
AuthorDate: Thu Oct 7 16:34:32 2021 -0400
boilerplate
---
.../src/datasource/DatasourceEditor.jsx | 30 ++++++++++++++--------
1 file changed, 19 insertions(+), 11 deletions(-)
diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx
index e502a3e..7b598bc 100644
--- a/superset-frontend/src/datasource/DatasourceEditor.jsx
+++ b/superset-frontend/src/datasource/DatasourceEditor.jsx
@@ -26,6 +26,8 @@ import Alert from 'src/components/Alert';
import Badge from 'src/components/Badge';
import shortid from 'shortid';
import { styled, SupersetClient, t, supersetTheme } from '@superset-ui/core';
+import { Select } from 'src/components';
+import { FormLabel } from 'src/components/Form';
import Button from 'src/components/Button';
import Tabs from 'src/components/Tabs';
import CertifiedIcon from 'src/components/CertifiedIcon';
@@ -40,7 +42,6 @@ import { getClientErrorObject } from 'src/utils/getClientErrorObject';
import CheckboxControl from 'src/explore/components/controls/CheckboxControl';
import TextControl from 'src/explore/components/controls/TextControl';
-import { Select } from 'src/components';
import TextAreaControl from 'src/explore/components/controls/TextAreaControl';
import SelectAsyncControl from 'src/explore/components/controls/SelectAsyncControl';
import SpatialControl from 'src/explore/components/controls/SpatialControl';
@@ -722,16 +723,23 @@ class DatasourceEditor extends React.PureComponent {
label={t('Owners')}
description={t('Owners of the dataset')}
control={
- <SelectAsyncControl
- dataEndpoint="api/v1/dataset/related/owners"
- multi
- mutator={data =>
- data.result.map(pk => ({
- value: pk.value,
- label: `${pk.text}`,
- }))
- }
- />
+ <>
+ <Select
+ ariaLabel={t('Select owners')}
+ header={<FormLabel>{t('Owners')}</FormLabel>}
+ options={[{ label: 'foo', value: 'bar' }]}
+ />
+ <SelectAsyncControl
+ dataEndpoint="api/v1/dataset/related/owners"
+ multi
+ mutator={data =>
+ data.result.map(pk => ({
+ value: pk.value,
+ label: `${pk.text}`,
+ }))
+ }
+ />
+ </>
}
controlProps={{}}
/>