This commit refactors the API class in API.ts to improve error handling. The `getFriendlyErrorMessage` method now includes additional error cases and returns more specific error messages for network errors, timeouts, request aborts, cancellations, connection issues, and SSL certificate expiration. This change enhances the user experience by providing clearer and more informative error messages.
The prop types for the noItemsMessage prop have been updated in multiple components to include the ReactElement type. This change allows for passing React elements as the no items message, providing more flexibility in customizing the message's content and appearance.
refactor: Update defaultValue property in Field interface
The defaultValue property in the Field interface has been updated to include the number type. This change allows for setting default values of type number in form fields.
The jest.config.json files in the Model, Probe, Common, Copilot, CommonUI, Ingestor, IsolatedVM, TestServer, and CommonServer directories have been updated. The "testPathIgnorePatterns" property has been added to each file, excluding the "node_modules" and "dist" directories from test path matching. This change improves test performance and ensures that unnecessary files are not included in the test coverage.
The DuplicateModel component in CommonUI has been updated to include a new option, forceNavigate, when navigating to a new item. This option allows for forced navigation to the new item, bypassing any checks or validations. This change provides more control over the navigation behavior and ensures consistent navigation to the new item.
The Field interface in the CommonUI project has been updated to include a new property, doNotShowWhenCreating. This property allows developers to specify whether a field should be shown in the form when creating a new entity. By setting doNotShowWhenCreating to true, the field will be hidden during the creation process. This change provides more control over the visibility of fields in the form based on the create or edit mode.
This code change updates the EventItem component to dynamically apply styles based on the event type. The classNames for the title and description elements are now generated based on the eventType prop, allowing for more flexibility in styling. This change improves the visual representation of different event types in the application.
This code change updates the BaseModelTable component to improve the logic for determining whether to show the actions column. Previously, the actions column was shown based on various conditions, including permissions, action buttons, and the showViewIdButton prop. This logic has been refactored to simplify the conditions and make it easier to understand.
- The showActionsColumn variable is now initialized with the result of the Boolean function, which checks if any of the conditions are met.
- Additionally, if the user is a master admin, the actions column will always be shown, regardless of other conditions.
These changes enhance the readability and maintainability of the code, ensuring that the actions column is displayed correctly based on the specified conditions.
This code change adds lazy loading for images in the DateFilter component. By implementing lazy loading, the images in the component will only load when they are in the viewport, improving the page load performance. This enhancement provides a better user experience by reducing the initial load time of the page.
This code change adds a new date filter to the FiltersForm and FilterViewer components. The date filter allows users to filter data based on a specific date range. This enhancement improves the filtering capabilities of the components and provides users with more flexibility in data analysis.
This code change adds the ErrorMessage component to the BasicFormModal component in BasicFormModal.tsx. The ErrorMessage component is rendered when the props.error value is truthy, displaying the error message to the user. This enhancement improves the user experience by providing clear feedback when an error occurs during form submission.
This code change adds the `doNotShowWhenEditing` flag to the form fields in the `ModelTable` component. When set to `true`, this flag prevents certain fields from being shown in the form when it is in edit mode. This improvement provides better control over which fields are displayed in the form during editing, enhancing the user experience and reducing clutter.
This code change updates the TableRow component in the Table module to align the content at the top of the table cells. The classNames "align-top" are added to the relevant table cells to achieve this alignment. This improvement ensures consistent vertical alignment of content in the table rows.
This code change refactors the EventItem component to improve the display of event descriptions and labels. It updates the CSS classes for the event descriptions to enhance readability and adds CSS classes for the event labels to improve their styling. This enhancement improves the overall appearance and user experience of the EventItem component.
This code change updates the DocsNav file to include a new navigation item for the Monitor Secrets page. It adds a new object to the DocsNav array with the title "Monitor Secrets" and the URL "/docs/monitor/monitor-secrets". This enhancement improves the navigation experience for users accessing the Monitor Secrets documentation.
The code changes in this commit improve the error messages in the MetricsInfo and SSLCertificateMonitorView components. The updated error messages provide more helpful information to users, indicating that it may take a few minutes for metrics to show up for the selected probe. This enhancement improves the user experience and reduces confusion when metrics are not immediately available.
This commit updates the CodeEditor component to improve the placeholder text for the JavaScript type. The placeholder now includes additional line breaks and indentation for better readability and code organization. This change enhances the user experience when working with JavaScript code in the CodeEditor.
This commit adds support for the ArrayOfText field type in the Detail component. When the field type is ArrayOfText and there is data available, the data is joined with commas and displayed in the UI. This enhancement improves the user experience by properly rendering and handling the ArrayOfText field type in the Detail component.
This commit fixes a bug in the Pagination component where the currentPageNumber was not being properly converted to a number before performing calculations. The bug caused incorrect navigation to the previous and next pages. The issue is resolved by adding a check to convert the currentPageNumber to a number if it is a string.
This commit updates the code editor placeholders in the MonitorStep component for the CustomJavaScriptCode and SyntheticMonitor types. The placeholders now provide example code using axios and playwright modules, allowing users to easily understand and customize the code for their specific monitoring needs.
This commit modifies the `fetchDropdownOptions` function in the `Field` interface to accept an additional `item` parameter of type `FormValues<TEntity>`. This change allows for more dynamic fetching of dropdown options based on the current form values, improving the flexibility and customization of the form fields.
This commit updates the `CategoryCheckboxType` interface to make the `categoryId` property optional. This change allows for more flexibility when working with category checkboxes, as the `categoryId` is not always required.