diff --git a/api/src/services/migration.service.ts b/api/src/services/migration.service.ts index 3e2cd62cc..d10bf1638 100644 --- a/api/src/services/migration.service.ts +++ b/api/src/services/migration.service.ts @@ -901,14 +901,6 @@ const getLogs = async (req: Request): Promise => { const filterOptions = Array?.from(new Set(logEntries?.map((log) => log?.level))); const auditStartIndex = logEntries?.findIndex?.(log => log?.message?.includes("Starting audit process")); const auditEndIndex = logEntries?.findIndex?.(log => log?.message?.includes("Audit process completed")); - if (auditStartIndex === -1 || auditEndIndex === -1) { - logger.warn("Audit markers not found in logs. Skipping audit-related slicing."); - } else { - logEntries = [ - ...logEntries.slice(0, auditStartIndex), - ...logEntries.slice(auditEndIndex + 1) - ]; - } logEntries = logEntries?.slice?.(1, logEntries?.length - 2); if (filter !== "all") { const filters = filter?.split("-") ?? []; diff --git a/ui/src/components/AuditFilterModal/index.scss b/ui/src/components/AuditFilterModal/index.scss index 646860218..746b30cfb 100644 --- a/ui/src/components/AuditFilterModal/index.scss +++ b/ui/src/components/AuditFilterModal/index.scss @@ -20,7 +20,11 @@ border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; - justify-content: space-between; + justify-content: flex-start; + gap: 12px; + .close-btn { + margin-left: auto; + } } .tableFilterModalStories__suggestion-item { @@ -82,4 +86,4 @@ .text-size { font-size: $size-font-medium; line-height: $line-height-reset; -} \ No newline at end of file +} diff --git a/ui/src/components/AuditFilterModal/index.tsx b/ui/src/components/AuditFilterModal/index.tsx index c3c9e1801..508dcdc18 100644 --- a/ui/src/components/AuditFilterModal/index.tsx +++ b/ui/src/components/AuditFilterModal/index.tsx @@ -17,7 +17,7 @@ const AuditFilterModal = ({ onApply, selectedLevels, setFilterValue, - selectedFileType + selectedFileType, }: AuditFilterModalProps) => { const modalRef = useRef(null); @@ -71,7 +71,7 @@ const AuditFilterModal = ({
- {selectedFileType?.includes?.('Entries') ? 'Display Type' : 'Field Type'} + {selectedFileType?.includes?.(auditLogsConstants.filterModal.entries) ? auditLogsConstants.filterModal.displayType : auditLogsConstants.filterModal.selectFieldType}
diff --git a/ui/src/components/AuditLogs/index.tsx b/ui/src/components/AuditLogs/index.tsx index 5063c89ac..ea8bdd154 100644 --- a/ui/src/components/AuditLogs/index.tsx +++ b/ui/src/components/AuditLogs/index.tsx @@ -72,6 +72,7 @@ const AuditLogs: React.FC = () => { { label: 'Entries', value: 'Entries_Select_feild' } ]; setFileOptions(predefinedOptions); + handleFileChange(predefinedOptions?.[0]); } }; const handleStackChange = async (selectedOption: StackOption | null) => { @@ -148,10 +149,7 @@ const AuditLogs: React.FC = () => { setTableUid((prevUid) => prevUid + 1); } }; - const handleSearchChange = (value: string) => { - setSearchText(value); - setTableUid((prevUid) => prevUid + 1); - }; + const ColumnFilter = () => { const closeModal = () => { setIsFilterDropdownOpen(false); @@ -408,8 +406,8 @@ const AuditLogs: React.FC = () => { columnSelector={false} canSearch={true} searchPlaceholder={auditLogsConstants?.placeholders?.searchLogs} - searchValue={searchText} - onSearchChangeEvent={handleSearchChange} + searchValue={searchText ?? ''} + onSearchChangeEvent={(value: string) => setSearchText(value)} withExportCta={{ component: exportCtaComponent, showExportCta: true diff --git a/ui/src/components/FilterModal/FilterModal.scss b/ui/src/components/FilterModal/FilterModal.scss index 81af35d31..3b00c3a26 100644 --- a/ui/src/components/FilterModal/FilterModal.scss +++ b/ui/src/components/FilterModal/FilterModal.scss @@ -12,6 +12,23 @@ max-height: 350px; overflow: hidden; font-family: 'Inter', sans-serif; + top: 100%; + left: 0; + margin-top: 8px; + + &.position-bottom { + top: auto; + bottom: 0; + left: 0; + margin-top: 0; + margin-bottom: 8px; + } + + &.position-right { + left: auto; + right: 0; + } + } .tableFilterModalStories__header { @@ -27,12 +44,6 @@ padding: 8px 16px; } -.tableFilterModalStories__body{ - overflow: scroll; - max-height: 250px; - overflow-x: hidden; -} - .Checkbox { display: flex; align-items: center; diff --git a/ui/src/components/FilterModal/FilterModal.tsx b/ui/src/components/FilterModal/FilterModal.tsx index b048ed585..dd1384f27 100644 --- a/ui/src/components/FilterModal/FilterModal.tsx +++ b/ui/src/components/FilterModal/FilterModal.tsx @@ -36,9 +36,9 @@ const FilterModal = ({
v?.value === item?.value) || false} - onChange={(e: React.ChangeEvent) => + onChange={(e: React.ChangeEvent) => { updateValue?.({ value: item, isChecked: e?.target?.checked }) - } + }} version="v2" label={item?.label || ''} className="text-size" @@ -52,7 +52,7 @@ const FilterModal = ({ {/* Modal Footer */}
- diff --git a/ui/src/utilities/constants.ts b/ui/src/utilities/constants.ts index e3627fd24..d93943c30 100644 --- a/ui/src/utilities/constants.ts +++ b/ui/src/utilities/constants.ts @@ -121,11 +121,11 @@ export const VALIDATION_DOCUMENTATION_URL: { [key: string]: string } = { export const auditLogsConstants = { - executeTestMigration: 'Try executing Test Migration', - selectModuleMessage: 'Select Module to See the Logs', - queryChangeMessage: 'Try Changing the Search Query to find what you are looking for', - noResult: 'No Matching Result Found', - noLogs: 'No Logs Found', + executeTestMigration: 'Try executing the migration', + selectModuleMessage: 'Select a module to see the logs', + queryChangeMessage: 'Try changing the search query to find what you are looking for.', + noResult: 'No matching result found', + noLogs: 'No logs', filterIcon: { filterOn: 'filterWithAppliedIcon Icon--v2 Icon--medium', filterOff: 'filterWithAppliedIcon Icon--v2 Icon--medium Icon--disabled' @@ -144,7 +144,10 @@ export const auditLogsConstants = { filterModal: { noFilterAvailable: 'No Filters Available', clearAll: 'Clear All', - apply: 'Apply' + apply: 'Apply', + displayType: 'Display Type', + selectFieldType: 'Select Field Data Type', + entries: 'Entries', } }; @@ -166,12 +169,12 @@ export const EXECUTION_LOGS_UI_TEXT = { SEARCH_PLACEHOLDER: 'Search Execution Logs', SELECT_PLACEHOLDER: 'Select a stack', EMPTY_STATE_DESCRIPTION: { - NO_RESULT: 'Try Changing the Search Query to find what you are looking for', - NO_LOGS: 'Try executing Test Migration' + NO_RESULT: 'Try changing the search query to find what you are looking for.', + NO_LOGS: 'Try executing the migration' }, EMPTY_STATE_HEADING: { - NO_LOGS: 'No Logs Found', - NO_MATCH: 'No Matching Result Found' + NO_LOGS: 'No logs', + NO_MATCH: 'No matching result found' }, EMPTY_STATE_ICON: { NO_LOGS: 'NoDataEmptyState',