feat(#5128): reimplement broken quartz view and add additional actuator functionallities#5196
Merged
feat(#5128): reimplement broken quartz view and add additional actuator functionallities#5196
Conversation
… icons and translations
…ling and new UI elements
…d i18n Convert all trigger detail components from Options API to Composition API: - Migrate cron-details.vue, simple-details.vue, custom-details.vue - Migrate daily-time-interval-details.vue, calendar-interval-details.vue - Add TypeScript interfaces for type safety - Integrate useI18n() composable for internationalization support This provides: - Full TypeScript support for props and methods - Better IDE auto-completion and type checking - Cleaner code using Composition API - Proper i18n integration with vue-i18n
Sort all quartz i18n JSON properties alphabetically for: - Better maintainability and readability - Easier key lookup and consistency checks - Standard code formatting Affects all 10 language files: - English, German, Spanish, French, Icelandic - Korean, Portuguese (Brazil), Russian - Simplified Chinese, Traditional Chinese
Move hardcoded job trigger success and failure messages to translation files: - Add trigger_success_message: Job notification with job name interpolation - Add trigger_success_title: Success notification title - Add trigger_failed: Failure notification title - Add trigger_failed_message: Error message with error interpolation - Add trigger_failed_notification: Detailed error notification with job name and error Update job-row.vue to use i18n for all notification messages: - Import useI18n() composable - Use interpolation for dynamic values (jobName, error) - Support all 10 languages This enables consistent multi-language support for user notifications
Add missing 'description' translation key to all i18n files: - English: Description - German: Beschreibung - Spanish: Descripción - French: Description - Icelandic: Lýsing - Korean: 설명 - Portuguese: Descrição - Russian: Описание - Chinese (Simplified): 描述 - Chinese (Traditional): 描述 Update trigger-row.vue to use i18n for the description label in expanded trigger details
Add previously missing translation keys referenced in job and trigger sections: - 'name': Used in jobs-section, triggers-section, and trigger details - 'group': Used in job-row, jobs-section, triggers-section headers Translations for all 10 languages: - English: Name, Group - German: Name, Gruppe - Spanish: Nombre, Grupo - French: Nom, Groupe - Icelandic: Heiti, Hópur - Korean: 이름, 그룹 - Portuguese: Nome, Grupo - Russian: Имя, Группа - Simplified Chinese: 名称, 组 - Traditional Chinese: 名稱, 組 This completes the translation coverage with all 68 keys now properly defined and used
Update test setup to include all 68 translation keys needed for component tests: - Expand createQuartzI18n() mock with complete translation key set - All i18n keys now available for proper rendering in tests Update job-row.spec.ts to use i18n plugin: - Add import of createQuartzI18n from test-setup - Create createWrapper helper function to setup i18n plugin - Replace all mount() calls with createWrapper() - Properly inject i18n instance into component tests All 481 tests now pass successfully
… test-utils Convert from @vue/test-utils mount() to @testing-library/vue render(): - Use render() from @/test-utils which wraps @testing-library/vue - Remove createWrapper helper function for cleaner, more direct testing - Use container.textContent for content assertions - Check for i18n keys instead of translated text for reliability - Use userEvent.setup() for user interaction testing Benefits: - Uses testing-library patterns aligned with codebase standards - Cleaner, more maintainable test structure - Better alignment with modern testing practices - Full compatibility with @testing-library/vue All 481 tests pass successfully
- Update test-utils.ts to properly load i18n translations using fallback for modules without .default export - Update all quartz test files to assert against actual translated values instead of i18n keys - All 55 tests now passing: - job-row.spec.ts: 25 tests - jobs-section.spec.ts: 9 tests - trigger-row.spec.ts: 22 tests - triggers-section.spec.ts: 7 tests This ensures tests verify the actual rendered output that users see in the application.
…translations Tests should assert against i18n keys that appear in the rendered output, not against the final translated values. This approach is more robust as it: - Doesn't depend on i18n translation loading in test environment - Verifies the correct i18n keys are being used in components - Aligns with testing library best practices Reverted test-utils.ts to original i18n loading approach. Updated all quartz test files to check for i18n keys: - job-row.spec.ts: 25 tests - jobs-section.spec.ts: 7 tests - trigger-row.spec.ts: 22 tests - triggers-section.spec.ts: 7 tests All 54 tests passing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new sample configuration for Quartz jobs in the servlet sample, and refactors the frontend codebase to provide a dedicated service for interacting with the Quartz actuator endpoints. It also adds several new FontAwesome icons for future UI enhancements and makes minor style and copyright updates.
Quartz Actuator Integration and Sample Jobs
QuartzJobsConfigurationclass to the servlet sample to define sample Quartz jobs and triggers for demonstration and testing purposes. This enables easier testing of the Quartz actuator endpoint in the Spring Boot Admin UI.spring-boot-starter-quartzdependency to the servlet sample'spom.xmlto support Quartz scheduling.Frontend Refactoring and Service Layer
Instanceclass and introduced a newQuartzActuatorServicewith static methods for fetching job/trigger groups, job/trigger details, and triggering jobs. This centralizes Quartz-related API logic and provides better abstraction and error handling. [1] [2]Frontend UI and Style Updates
faBriefcase,faClock,faCalendar,faCalendarCheck,faHourglass,faLink,faPauseCircle,faPlayCircle,faShield) to the icon library, preparing for enhanced UI features related to Quartz jobs and triggers. [1] [2] [3] [4] [5]@importstatements. [1] [2]Other Minor Updates
axiosproperty in theInstanceclass from private to public to enable usage in the new service layer.fixes #5195
closes #5128