diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Database/SampleDataTable/SampleDataTable.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Database/SampleDataTable/SampleDataTable.component.tsx index 76620de74f8..04ca4feb2b7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Database/SampleDataTable/SampleDataTable.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Database/SampleDataTable/SampleDataTable.component.tsx @@ -62,7 +62,7 @@ const SampleDataTable = ({ permissions, }: SampleDataProps) => { const { isTourPage } = useTourProvider(); - const { currentUser } = useApplicationStore(); + const { currentUser, theme } = useApplicationStore(); const [sampleData, setSampleData] = useState(); const [isLoading, setIsLoading] = useState(true); @@ -201,7 +201,7 @@ const SampleDataTable = ({ } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Database/SampleDataWithMessages/SampleDataWithMessages.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Database/SampleDataWithMessages/SampleDataWithMessages.tsx index 118370e4044..ad90a774517 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Database/SampleDataWithMessages/SampleDataWithMessages.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Database/SampleDataWithMessages/SampleDataWithMessages.tsx @@ -19,6 +19,7 @@ import { WORKFLOWS_METADATA_DOCS } from '../../../constants/docs.constants'; import { EntityType } from '../../../enums/entity.enum'; import { SearchIndexSampleData } from '../../../generated/entity/data/searchIndex'; import { TopicSampleData } from '../../../generated/entity/data/topic'; +import { useApplicationStore } from '../../../hooks/useApplicationStore'; import { getSampleDataBySearchIndexId } from '../../../rest/SearchIndexAPI'; import { getSampleDataByTopicId } from '../../../rest/topicsAPI'; import { Transi18next } from '../../../utils/CommonUtils'; @@ -31,6 +32,7 @@ const SampleDataWithMessages: FC<{ entityType: EntityType; }> = ({ entityId, entityType }) => { const { t } = useTranslation(); + const { theme } = useApplicationStore(); const [data, setData] = useState(); const [loading, setLoading] = useState(false); @@ -67,7 +69,7 @@ const SampleDataWithMessages: FC<{ } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/AssetsTabs.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/AssetsTabs.component.tsx index 0e111ce6360..a8194e508c1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/AssetsTabs.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/AssetsTabs.component.tsx @@ -56,6 +56,7 @@ import { GlossaryTerm } from '../../../../generated/entity/data/glossaryTerm'; import { DataProduct } from '../../../../generated/entity/domains/dataProduct'; import { Domain } from '../../../../generated/entity/domains/domain'; import { usePaging } from '../../../../hooks/paging/usePaging'; +import { useApplicationStore } from '../../../../hooks/useApplicationStore'; import { useFqn } from '../../../../hooks/useFqn'; import { Aggregations } from '../../../../interface/search.interface'; import { @@ -125,6 +126,7 @@ const AssetsTabs = forwardRef( }: AssetsTabsProps, ref ) => { + const { theme } = useApplicationStore(); const [itemCount, setItemCount] = useState>( {} as Record ); @@ -505,7 +507,7 @@ const AssetsTabs = forwardRef( } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizeMyData/CustomizeMyData.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizeMyData/CustomizeMyData.test.tsx index b7ba404484c..d4db4ba970a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizeMyData/CustomizeMyData.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizeMyData/CustomizeMyData.test.tsx @@ -82,9 +82,12 @@ jest.mock('../../../PageLayoutV1/PageLayoutV1', () => { }); jest.mock('../../../../hooks/useApplicationStore', () => ({ - useApplicationStore: jest - .fn() - .mockImplementation(() => ({ currentUser: mockUserData })), + useApplicationStore: jest.fn().mockImplementation(() => ({ + currentUser: mockUserData, + theme: { + primaryColor: '#00ff00', + }, + })), })); jest.mock('../../../../rest/feedsAPI', () => ({ diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizeMyData/CustomizeMyData.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizeMyData/CustomizeMyData.tsx index aca3f2b6734..a0ec3ac44ab 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizeMyData/CustomizeMyData.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizeMyData/CustomizeMyData.tsx @@ -65,7 +65,7 @@ function CustomizeMyData({ handleSaveCurrentPageLayout, }: Readonly) { const { t } = useTranslation(); - const { currentUser } = useApplicationStore(); + const { currentUser, theme } = useApplicationStore(); const history = useHistory(); const { fqn: decodedPersonaFQN } = useFqn(); const [layout, setLayout] = useState>( @@ -264,7 +264,7 @@ function CustomizeMyData({ i18nKey="message.customize-landing-page-header" renderElement={ } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppInstallVerifyCard/AppInstallVerifyCard.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppInstallVerifyCard/AppInstallVerifyCard.component.tsx index 406152b00eb..6ba168d0ad3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppInstallVerifyCard/AppInstallVerifyCard.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppInstallVerifyCard/AppInstallVerifyCard.component.tsx @@ -44,7 +44,7 @@ const AppInstallVerifyCard = ({ onSave, }: AppInstallVerifyCardProps) => { const { t } = useTranslation(); - const { currentUser } = useApplicationStore(); + const { currentUser, theme } = useApplicationStore(); return (
@@ -87,7 +87,7 @@ const AppInstallVerifyCard = ({ } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppInstallVerifyCard/AppInstallVerifyCard.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppInstallVerifyCard/AppInstallVerifyCard.test.tsx index ddb47eae16d..3979e7bacdf 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppInstallVerifyCard/AppInstallVerifyCard.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppInstallVerifyCard/AppInstallVerifyCard.test.tsx @@ -28,6 +28,9 @@ jest.mock('../../../../utils/EntityUtils', () => ({ jest.mock('../../../../hooks/useApplicationStore', () => ({ useApplicationStore: jest.fn(() => ({ currentUser: mockUserData, + theme: { + primaryColor: '#00ff00', + }, })), })); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Services/Ingestion/IngestionListTable.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Services/Ingestion/IngestionListTable.component.tsx index c5e2c702347..0ee42824d2b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Services/Ingestion/IngestionListTable.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Services/Ingestion/IngestionListTable.component.tsx @@ -20,6 +20,7 @@ import { DISABLED, NO_DATA_PLACEHOLDER } from '../../../../constants/constants'; import { IngestionPipeline } from '../../../../generated/entity/services/ingestionPipelines/ingestionPipeline'; import { usePaging } from '../../../../hooks/paging/usePaging'; import { useAirflowStatus } from '../../../../hooks/useAirflowStatus'; +import { useApplicationStore } from '../../../../hooks/useApplicationStore'; import { getEntityName } from '../../../../utils/EntityUtils'; import { getErrorPlaceHolder } from '../../../../utils/IngestionUtils'; import NextPrevious from '../../../common/NextPrevious/NextPrevious'; @@ -51,6 +52,7 @@ function IngestionListTable({ }: IngestionListTableProps) { const { t } = useTranslation(); const { isFetchingStatus, platform } = useAirflowStatus(); + const { theme } = useApplicationStore(); const { currentPage, @@ -204,6 +206,7 @@ function IngestionListTable({ isRequiredDetailsAvailable, ingestionData.length, isPlatFormDisabled, + theme, pipelineType ), }} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.component.tsx index dc84329a53f..1bf86068415 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.component.tsx @@ -23,6 +23,7 @@ import { NO_PERMISSION_FOR_ACTION } from '../../../constants/HelperTextUtil'; import { EntityType } from '../../../enums/entity.enum'; import { SearchIndex } from '../../../enums/search.enum'; import { EntityReference } from '../../../generated/entity/type'; +import { useApplicationStore } from '../../../hooks/useApplicationStore'; import { getDomainList } from '../../../rest/domainAPI'; import { searchData } from '../../../rest/miscAPI'; import { formatDomainsResponse } from '../../../utils/APIUtils'; @@ -58,6 +59,7 @@ const DomainSelectableList = ({ selectedDomain, }: DomainSelectableListProps) => { const { t } = useTranslation(); + const { theme } = useApplicationStore(); const [popupVisible, setPopupVisible] = useState(false); const fetchOptions = async (searchText: string) => { @@ -125,7 +127,7 @@ const DomainSelectableList = ({ } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/ErrorWithPlaceholder/CreateErrorPlaceHolder.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/ErrorWithPlaceholder/CreateErrorPlaceHolder.tsx index a67dab2ae06..73af42271dd 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/ErrorWithPlaceholder/CreateErrorPlaceHolder.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/ErrorWithPlaceholder/CreateErrorPlaceHolder.tsx @@ -17,6 +17,7 @@ import classNames from 'classnames'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { ReactComponent as AddPlaceHolderIcon } from '../../../assets/svg/add-placeholder.svg'; +import { useApplicationStore } from '../../../hooks/useApplicationStore'; import { Transi18next } from '../../../utils/CommonUtils'; import PermissionErrorPlaceholder from './PermissionErrorPlaceholder'; import { CreatePlaceholderProps } from './placeholder.interface'; @@ -32,6 +33,7 @@ const CreateErrorPlaceHolder = ({ placeholderText, }: CreatePlaceholderProps) => { const { t } = useTranslation(); + const { theme } = useApplicationStore(); if (!permission) { return ; @@ -62,7 +64,7 @@ const CreateErrorPlaceHolder = ({ } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/ErrorWithPlaceholder/ErrorPlaceHolderES.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/ErrorWithPlaceholder/ErrorPlaceHolderES.tsx index 27577c045d2..fa43ba47ab1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/ErrorWithPlaceholder/ErrorPlaceHolderES.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/ErrorWithPlaceholder/ErrorPlaceHolderES.tsx @@ -30,6 +30,7 @@ import { ELASTICSEARCH_ERROR_PLACEHOLDER_TYPE, ERROR_PLACEHOLDER_TYPE, } from '../../../enums/common.enum'; +import { useApplicationStore } from '../../../hooks/useApplicationStore'; import { useDomainStore } from '../../../hooks/useDomainStore'; import { Transi18next } from '../../../utils/CommonUtils'; import i18n from '../../../utils/i18next/LocalUtil'; @@ -74,6 +75,7 @@ const ErrorPlaceHolderES = ({ type, errorMessage, query }: Props) => { const { t } = useTranslation(); const history = useHistory(); const { activeDomain } = useDomainStore(); + const { theme } = useApplicationStore(); const isQuery = useMemo( () => @@ -117,7 +119,7 @@ const ErrorPlaceHolderES = ({ type, errorMessage, query }: Props) => { } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/ErrorWithPlaceholder/FilterErrorPlaceHolder.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/ErrorWithPlaceholder/FilterErrorPlaceHolder.tsx index 1e1d86ed2ec..de3a3d51fc5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/ErrorWithPlaceholder/FilterErrorPlaceHolder.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/ErrorWithPlaceholder/FilterErrorPlaceHolder.tsx @@ -16,6 +16,7 @@ import classNames from 'classnames'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { ReactComponent as FilterPlaceHolderIcon } from '../../../assets/svg/no-search-placeholder.svg'; +import { useApplicationStore } from '../../../hooks/useApplicationStore'; import { Transi18next } from '../../../utils/CommonUtils'; import { FilterPlaceholderProps } from './placeholder.interface'; @@ -26,6 +27,7 @@ const FilterErrorPlaceHolder = ({ placeholderText, }: FilterPlaceholderProps) => { const { t } = useTranslation(); + const { theme } = useApplicationStore(); return (
} diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/CustomPageSettings/CustomPageSettings.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/CustomPageSettings/CustomPageSettings.tsx index 8cefe05e783..118e4290ba8 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/CustomPageSettings/CustomPageSettings.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/CustomPageSettings/CustomPageSettings.tsx @@ -35,6 +35,7 @@ import { Persona } from '../../generated/entity/teams/persona'; import { PageType } from '../../generated/system/ui/page'; import { Paging } from '../../generated/type/paging'; import { usePaging } from '../../hooks/paging/usePaging'; +import { useApplicationStore } from '../../hooks/useApplicationStore'; import { getAllPersonas } from '../../rest/PersonaAPI'; import { Transi18next } from '../../utils/CommonUtils'; import { getEntityName } from '../../utils/EntityUtils'; @@ -49,6 +50,7 @@ import './custom-page-settings.less'; export const CustomPageSettings = () => { const { t } = useTranslation(); const history = useHistory(); + const { theme } = useApplicationStore(); const [isLoading, setIsLoading] = useState(true); @@ -124,7 +126,7 @@ export const CustomPageSettings = () => { i18nKey="message.no-persona-message" renderElement={ { const { pageFqn } = useParams<{ pageFqn: PageType }>(); const { fqn: decodedPageFQN } = useFqn(); const { t } = useTranslation(); + const { theme } = useApplicationStore(); const [page, setPage] = useState({} as Document); const [editedPage, setEditedPage] = useState({} as Document); const [isLoading, setIsLoading] = useState(false); @@ -166,7 +168,7 @@ export const CustomizablePage = () => { i18nKey="message.no-persona-message" renderElement={ { switch (pipelineType) { @@ -214,7 +216,7 @@ const getPipelineExtraInfo = ( } @@ -235,7 +237,7 @@ const getPipelineExtraInfo = ( } @@ -263,7 +265,7 @@ const getPipelineExtraInfo = ( : WORKFLOWS_METADATA_DOCS } rel="noreferrer" - style={{ color: '#1890ff' }} + style={{ color: theme.primaryColor }} target="_blank" /> } @@ -286,12 +288,13 @@ export const getErrorPlaceHolder = ( isRequiredDetailsAvailable: boolean, ingestionDataLength: number, isPlatFormDisabled: boolean, + theme: UIThemePreference['customTheme'], pipelineType?: PipelineType ) => { if (isRequiredDetailsAvailable && ingestionDataLength === 0) { return ( - {getPipelineExtraInfo(isPlatFormDisabled, pipelineType)} + {getPipelineExtraInfo(isPlatFormDisabled, theme, pipelineType)} ); }