Commit 81b3705
committed
Resolves #4048 ([FR-1318](https://lablup.atlassian.net/browse/FR-1318))
## Summary
Adds a "Run This Model" button to the ModelCardModal that enables users to start model services immediately after cloning folders if no cloned folder exists. The implementation includes smart folder management, validation, and user confirmation workflows.
## Changes
### Core Implementation
- **ModelTryContentButton**: Enhanced component with folder cloning and service creation workflow
- Removed `modelCardMetadata` dependency for cleaner
interface
- Added folder existence checking and validation logic
- Implemented smart workflow: clone folder → validate
files → create service
- Added proper error handling and user confirmation
dialogs
### Key Features
- **Smart Folder Management**: Detects existing folders vs.
new cloning needs
- **File Validation**: Checks for required
`service-definition.toml` and `model-definition.yaml` files
- **User Confirmation**: Modal dialogs for cloning and
using existing folders
- **Background Tasks**: Progress tracking with
notifications for clone and service operations
- **Error Handling**: User-friendly error messages when
files are missing or operations fail
### UI Integration
- **ModelCardModal**: Re-enabled ModelTryContentButton in
modal footer
- **Internationalization**: Added translation keys across
all language files
## Technical Details
The component now follows this workflow:
1. Check if similar named folder exists using GraphQL query
with filters
2. If no folder exists → Confirm clone → Clone folder →
Validate service definition → Create service
3. If folder exists → Confirm use existing → Validate
service definition → Create service
4. Show progress notifications throughout the process
## Test Plan
> Endpoint: 10.100.6.113
- [ ] Verify "Run This Model" button appears in
ModelCardModal
- [ ] Test cloning workflow when no similar folder exists
- [ ] Test using existing folder workflow
- [ ] Verify service-definition.toml validation
- [ ] Check error handling for missing files
- [ ] Confirm progress notifications work properly
- [ ] Test across different language localizations
[FR-1318]: https://lablup.atlassian.net/browse/FR-1318?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 7486f48 commit 81b3705
File tree
26 files changed
+828
-396
lines changed- react/src/components
- resources
- i18n
26 files changed
+828
-396
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
47 | 56 | | |
48 | 57 | | |
49 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
115 | | - | |
116 | | - | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
125 | 131 | | |
126 | 132 | | |
127 | 133 | | |
| |||
0 commit comments