spring-cloud-dataflow icon indicating copy to clipboard operation
spring-cloud-dataflow copied to clipboard

Feature request: editing or cloning an existing schedule

Open taxone opened this issue 3 years ago • 4 comments

Problem description: The current version of SCDF allows cloning a task. It would be really useful a feature that permits to edit or clone an existing schedule. For example, a non technical user could change only the chron expression without modifying anything else.

Solution description: The user can edit a schedule in the UI. The user selects a schedule and modifies its properties. After clicking the button "Update" the actual schedule definition is updated.

Description of alternatives: If it's not possible to edit an existing schedule, a cloning functionality (like the one for task definitions) could allow the user to create a new schedule using the same values of the original one and to change only what he needs.

taxone avatar Aug 06 '21 15:08 taxone

Hi, @taxone. I can see how it'd be useful and it makes sense. If you have cycles, would you be willing to contribute to the feature enhancement?

sabbyanandan avatar Sep 20 '21 22:09 sabbyanandan

Hi, @taxone. I can see how it'd be useful and it makes sense. If you have cycles, would you be willing to contribute to the feature enhancement?

Yes, I'm happy to contribute. Please, tell me more about it.

taxone avatar Sep 22 '21 06:09 taxone

Great! There's a bit of backend and UI work. AFA we have the API endpoint, we can have @oodamien help with the UI/UX. @cppwfs: if you can help point to the controller and the related code, I'd appreciate it.

sabbyanandan avatar Sep 23 '21 15:09 sabbyanandan

Great! There's a bit of backend and UI work. AFA we have the API endpoint, we can have @oodamien help with the UI/UX. @cppwfs: if you can help point to the controller and the related code, I'd appreciate it.

Examining the task cloning functionality, it seems that:

  • the UI retrieves from backend the task definitions
  • the user is prompted for the new name
  • the new task definition is created calling the POST endpoint

I think that we can reuse the same pattern for cloning schedules. The service below needs modifications because it does not return the arguments and deployment properties of the schedule:

GET /tasks/schedules/{name}

implemented by org.springframework.cloud.dataflow.server.controller.TaskSchedulerController.getSchedule(String, String).

For the UI/UX side, it's a long time I don't use TypeScript, so probably I will need more help.

taxone avatar Sep 24 '21 15:09 taxone