Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions api/src/services/migration.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -901,14 +901,6 @@ const getLogs = async (req: Request): Promise<any> => {
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("-") ?? [];
Expand Down
8 changes: 6 additions & 2 deletions ui/src/components/AuditFilterModal/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -82,4 +86,4 @@
.text-size {
font-size: $size-font-medium;
line-height: $line-height-reset;
}
}
4 changes: 2 additions & 2 deletions ui/src/components/AuditFilterModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const AuditFilterModal = ({
onApply,
selectedLevels,
setFilterValue,
selectedFileType
selectedFileType,
}: AuditFilterModalProps) => {
const modalRef = useRef<HTMLDivElement>(null);

Expand Down Expand Up @@ -71,7 +71,7 @@ const AuditFilterModal = ({
<div className="tableFilterModalStories" ref={modalRef}>
<div className="tableFilterModalStories__header">
<span className="text-size">
{selectedFileType?.includes?.('Entries') ? 'Display Type' : 'Field Type'}
{selectedFileType?.includes?.('Entries') ? 'Display Type' : 'Select Field Data Type'}
</span>
<div className="close-btn">
<Icon version="v2" icon="CloseNoborder" size="medium" onClick={closeModal} />
Expand Down
10 changes: 4 additions & 6 deletions ui/src/components/AuditLogs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
23 changes: 17 additions & 6 deletions ui/src/components/FilterModal/FilterModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -27,12 +44,6 @@
padding: 8px 16px;
}

.tableFilterModalStories__body{
overflow: scroll;
max-height: 250px;
overflow-x: hidden;
}

.Checkbox {
display: flex;
align-items: center;
Expand Down
6 changes: 3 additions & 3 deletions ui/src/components/FilterModal/FilterModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ const FilterModal = ({
<div className="tableFilterModalStories__suggestion-item">
<Checkbox
checked={selectedLevels?.some?.((v) => v?.value === item?.value) || false}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
updateValue?.({ value: item, isChecked: e?.target?.checked })
}
}}
version="v2"
label={item?.label || ''}
className="text-size"
Expand All @@ -52,7 +52,7 @@ const FilterModal = ({

{/* Modal Footer */}
<div className="tableFilterModalStories__footer">
<Button buttonType="tertiary" version="v2" onClick={clearAll}>
<Button buttonType="tertiary" version="v2" onClick={clearAll} disabled={selectedLevels?.length === 0}>
Clear All
</Button>
<ButtonGroup>
Expand Down
18 changes: 9 additions & 9 deletions ui/src/utilities/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -166,12 +166,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',
Expand Down