diff --git a/frontend/src/GlobalDatasources/GlobalDataSourcesPage/index.jsx b/frontend/src/GlobalDatasources/GlobalDataSourcesPage/index.jsx index 0512eadf28..1fddbb5b96 100644 --- a/frontend/src/GlobalDatasources/GlobalDataSourcesPage/index.jsx +++ b/frontend/src/GlobalDatasources/GlobalDataSourcesPage/index.jsx @@ -31,7 +31,6 @@ export const GlobalDataSourcesPage = ({ darkMode = false, updateSelectedDatasour const [addingDataSource, setAddingDataSource] = useState(false); const [suggestingDataSource, setSuggestingDataSource] = useState(false); const { t } = useTranslation(); - const navigate = useNavigate(); const { admin } = authenticationService.currentSessionValue; const marketplaceEnabled = admin && window.public_config?.ENABLE_MARKETPLACE_FEATURE == 'true'; const [modalProps, setModalProps] = useState({ @@ -296,34 +295,6 @@ export const GlobalDataSourcesPage = ({ darkMode = false, updateSelectedDatasour }; const renderCardGroup = (source, type) => { - if (type === 'Plugins' && source.length === 0) { - return ( -
-
- -
-
No plugins added
- {admin && ( - <> -
- Browse through plugins in marketplace to add them as a Data Source.{' '} -
- { - marketplaceEnabled - ? navigate('/integrations') - : toast.error('Please enable marketplace to add plugins'); - }} - style={{ margin: 'auto' }} - variant="secondary" - > - Add plugins - - - )} -
- ); - } const addDataSourceBtn = (item) => ( ))} + {type === 'Plugins' && ( +
+
{ + if (marketplaceEnabled) { + window.open('/integrations', '_blank'); + } else { + toast.error('Please enable marketplace to add plugins'); + } + }} + data-cy={`data-source-add-plugin`} + > +
+
+ +

+ Add plugin +
+
+
+
+ )} ); diff --git a/frontend/src/_styles/global-datasources.scss b/frontend/src/_styles/global-datasources.scss index 6ff16d7f77..1cbaed557b 100644 --- a/frontend/src/_styles/global-datasources.scss +++ b/frontend/src/_styles/global-datasources.scss @@ -300,4 +300,37 @@ border-radius: 6px; margin: auto; } +} + + +.add-plugin-card{ + border: 1px dashed var(--border-default, #CCD1D5); + background-color: var(--interactive-weak); + + &:hover{ + border: 1px dashed var(--border-strong, #CCD1D5); + background-color: var(--interactive-default); + } +} + + + +.add-plugin-card-title{ + font-weight: 500; + font-size: 14px; + line-height: 20px; + color: var(--text-default); +} + + +.dark-theme{ + .add-plugin-card{ + border: 1px dashed var(--border-default, #CCD1D5); + background-color: var(--interactive-weak); + + &:hover{ + border: 1px dashed var(--border-strong, #CCD1D5); + background-color: var(--interactive-default); + } + } } \ No newline at end of file