mirror of
https://github.com/apache/superset.git
synced 2026-04-18 15:44:57 +00:00
[explore-v2] Fix edit datasource link for druid datasources (#1982)
* only add imgSrc key if choices contain an imgSrc * handle table and druid edit links for datasource drop down * fix linting
This commit is contained in:
@@ -26,15 +26,20 @@ const TIME_STAMP_OPTIONS = [
|
||||
['%H:%M:%S', '%H:%M:%S | 01:32:10'],
|
||||
];
|
||||
|
||||
const MAP_DATASOURCE_TYPE_TO_EDIT_URL = {
|
||||
table: '/tablemodelview/edit',
|
||||
druid: '/druiddatasourcemodelview/edit',
|
||||
};
|
||||
|
||||
export const fields = {
|
||||
datasource: {
|
||||
type: 'SelectField',
|
||||
label: 'Datasource',
|
||||
clearable: false,
|
||||
default: null,
|
||||
editUrl: '/tablemodelview/edit',
|
||||
mapStateToProps: (state) => ({
|
||||
choices: state.datasources || [],
|
||||
editUrl: MAP_DATASOURCE_TYPE_TO_EDIT_URL[state.datasource_type],
|
||||
}),
|
||||
description: '',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user