diff --git a/web/app/components/app/configuration/config/index.tsx b/web/app/components/app/configuration/config/index.tsx
index 3e8b5f1caa..adef93f541 100644
--- a/web/app/components/app/configuration/config/index.tsx
+++ b/web/app/components/app/configuration/config/index.tsx
@@ -79,7 +79,7 @@ const Config: FC = () => {
{/* Dataset */}
{/* Tools */}
diff --git a/web/app/components/app/configuration/dataset-config/card-item/item.tsx b/web/app/components/app/configuration/dataset-config/card-item/item.tsx
index b671d9c146..8d9155b0f0 100644
--- a/web/app/components/app/configuration/dataset-config/card-item/item.tsx
+++ b/web/app/components/app/configuration/dataset-config/card-item/item.tsx
@@ -29,6 +29,7 @@ const Item: FC = ({
config,
onSave,
onRemove,
+ readonly = false,
editable = true,
}) => {
const media = useBreakpoints()
@@ -68,7 +69,7 @@ const Item: FC = ({
{
- editable &&
{
e.stopPropagation()
setShowSettingsModal(true)
@@ -77,14 +78,18 @@ const Item: FC = ({
}
-
onRemove(config.id)}
- state={isDeleting ? ActionButtonState.Destructive : ActionButtonState.Default}
- onMouseEnter={() => setIsDeleting(true)}
- onMouseLeave={() => setIsDeleting(false)}
- >
-
-
+ {
+ !readonly && (
+
onRemove(config.id)}
+ state={isDeleting ? ActionButtonState.Destructive : ActionButtonState.Default}
+ onMouseEnter={() => setIsDeleting(true)}
+ onMouseLeave={() => setIsDeleting(false)}
+ >
+
+
+ )
+ }
{
config.indexing_technique && {
+type Props = {
+ readonly?: boolean
+}
+const DatasetConfig: FC = ({ readonly }) => {
const { t } = useTranslation()
const userProfile = useAppContextSelector(s => s.userProfile)
const {
@@ -254,10 +257,10 @@ const DatasetConfig: FC = () => {
className='mt-2'
title={t('appDebug.feature.dataSet.title')}
headerRight={
- )
}
hasHeaderBottomBorder={!hasData}
noBodySpacing
@@ -271,7 +274,8 @@ const DatasetConfig: FC = () => {
config={item}
onRemove={onRemove}
onSave={handleSave}
- editable={item.editable}
+ editable={item.editable && !readonly}
+ readonly={readonly}
/>
))}
diff --git a/web/app/components/app/configuration/preview.tsx b/web/app/components/app/configuration/preview.tsx
index eceb4972aa..7679ee13b6 100644
--- a/web/app/components/app/configuration/preview.tsx
+++ b/web/app/components/app/configuration/preview.tsx
@@ -305,7 +305,7 @@ const Configuration: FC = ({
return (
-