@@ -336,14 +336,13 @@ private Message withFlinkJobInfo(String jobName, String flinkJobInfoStr, Functio
336336 return flinkJobInfoFunction .apply (flinkJobInfo );
337337 }
338338
339- @ RequestMapping (path = "/updateTask" , method = RequestMethod .POST )
339+ @ RequestMapping (path = "/updateTask" , method = RequestMethod .GET )
340340 public Message updateTask (HttpServletRequest req ,
341- @ RequestBody Map <String , String > json ) {
341+ @ RequestParam (value = "projectName" ) String projectName ,
342+ @ RequestParam (value = "jobName" ) String jobName ,
343+ @ RequestParam (value = "appId" ) String appId ,
344+ @ RequestParam (value = "metrics" ) String metrics ) {
342345 String username = SecurityFilter .getLoginUsername (req );
343- String projectName = json .get ("projectName" );
344- String jobName = json .get ("jobName" );
345- String appId = json .get ("appId" );
346- String metrics = json .get ("metrics" );
347346 LOG .info ("User {} try to update task for Streamis job {} with appId: {}, metrics: {}." , username , jobName , appId , metrics );
348347 return withStreamJob (req , projectName , jobName , username , streamJob -> {
349348 StreamTask streamTask = streamTaskService .getLatestTaskByJobId (streamJob .getId ());
@@ -372,6 +371,16 @@ public Message updateTask(HttpServletRequest req,
372371 });
373372 }
374373
374+ @ RequestMapping (path = "/updateTask" , method = RequestMethod .POST )
375+ public Message updateTask (HttpServletRequest req ,
376+ @ RequestBody Map <String , String > json ) {
377+ String projectName = json .get ("projectName" );
378+ String jobName = json .get ("jobName" );
379+ String appId = json .get ("appId" );
380+ String metrics = json .get ("metrics" );
381+ return updateTask (req , projectName , jobName , appId , metrics );
382+ }
383+
375384 @ RequestMapping (path = "/stopTask" , method = RequestMethod .GET )
376385 public Message stopTask (HttpServletRequest req ,
377386 @ RequestParam (value = "projectName" ) String projectName ,
0 commit comments