|
|
|
@@ -40,8 +40,11 @@ public class ImageController extends BaseController { |
|
|
|
* @return 查询结果 |
|
|
|
*/ |
|
|
|
@GetMapping |
|
|
|
@ApiOperation("分页查询") |
|
|
|
public GenericsAjaxResult<Page<Image>> queryByPage(Image image, int page, int size) { |
|
|
|
@ApiOperation("分页查询,根据image_type查询公开镜像和自定义镜像; 1公开0私有") |
|
|
|
public GenericsAjaxResult<Page<Image>> queryByPage(Image image, @RequestParam("page") int page, |
|
|
|
@RequestParam("size") int size, |
|
|
|
@RequestParam(value = "image_type") int imageType) { |
|
|
|
image.setImageType(imageType); |
|
|
|
PageRequest pageRequest = PageRequest.of(page,size); |
|
|
|
return genericsSuccess(this.imageService.queryByPage(image, pageRequest)); |
|
|
|
} |
|
|
|
@@ -76,7 +79,7 @@ public class ImageController extends BaseController { |
|
|
|
* @return 新增结果 |
|
|
|
*/ |
|
|
|
@PostMapping |
|
|
|
@ApiOperation("新增镜像") |
|
|
|
@ApiOperation("新增镜像,不包含镜像版本") |
|
|
|
public GenericsAjaxResult<Image> add(@RequestBody Image image) { |
|
|
|
return genericsSuccess(this.imageService.insert(image)); |
|
|
|
} |
|
|
|
@@ -101,6 +104,7 @@ public class ImageController extends BaseController { |
|
|
|
* @return 编辑结果 |
|
|
|
*/ |
|
|
|
@PutMapping |
|
|
|
@ApiOperation("编辑镜像") |
|
|
|
public GenericsAjaxResult<Image> edit(@RequestBody Image image) { |
|
|
|
return genericsSuccess(this.imageService.update(image)); |
|
|
|
} |
|
|
|
@@ -117,7 +121,7 @@ public class ImageController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("/net") |
|
|
|
@ApiOperation("从本地上传构建镜像") |
|
|
|
@ApiOperation("从网络上传构建镜像") |
|
|
|
public GenericsAjaxResult<String> createImageFromNet(@RequestParam("name") String imageName, |
|
|
|
@RequestParam("tag") String imageTag, |
|
|
|
@RequestParam("path") String path) throws Exception { |
|
|
|
|