diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9485310..355966a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ on: env: LATEST_TAG: latest - WEBCLIENT_SOURCE_LOCATION: ${{ github.event.inputs.WEBCLIENT_SOURCE_LOCATION }} + WEBCLIENT_SOURCE_LOCATION: ${{ github.event.inputs.WEBCLIENT_SOURCE_LOCATION || 'https://github.com/lejianwen/rustdesk-api-web' }} BASE_IMAGE_NAMESPACE: ${{ github.event.inputs.BASE_IMAGE_NAMESPACE || github.actor }} DOCKERHUB_IMAGE_NAMESPACE: ${{ github.event.inputs.DOCKERHUB_IMAGE_NAMESPACE || github.actor }} GHCR_IMAGE_NAMESPACE: ${{ github.event.inputs.GHCR_IMAGE_NAMESPACE || github.actor }} @@ -256,8 +256,8 @@ jobs: uses: Noelware/docker-manifest-action@master with: base-image: ${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }} - extra-images: ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-amd64, - ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-arm64 + extra-images: ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-amd64, + ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-arm64 push: true - name: Create and push manifest GHCR (:version) @@ -265,8 +265,8 @@ jobs: uses: Noelware/docker-manifest-action@master with: base-image: ghcr.io/${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }} - extra-images: ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-amd64, - ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-arm64 + extra-images: ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-amd64, + ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-arm64 push: true amend: true @@ -275,8 +275,8 @@ jobs: uses: Noelware/docker-manifest-action@master with: base-image: ${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:latest - extra-images: ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:latest-amd64, - ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:latest-arm64 + extra-images: ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:latest-amd64, + ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:latest-arm64 push: true - name: Create and push manifest GHCR (:latest) @@ -284,7 +284,7 @@ jobs: uses: Noelware/docker-manifest-action@master with: base-image: ghcr.io/${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:latest - extra-images: ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:latest-amd64, - ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:latest-arm64 + extra-images: ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:latest-amd64, + ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:latest-arm64 push: true amend: true \ No newline at end of file diff --git a/docs/admin/admin_docs.go b/docs/admin/admin_docs.go index 55fa762..0fa498e 100644 --- a/docs/admin/admin_docs.go +++ b/docs/admin/admin_docs.go @@ -22,7 +22,7 @@ const docTemplateadmin = `{ "token": [] } ], - "description": "创建地址簿", + "description": "批量创建地址簿", "consumes": [ "application/json" ], @@ -32,7 +32,7 @@ const docTemplateadmin = `{ "tags": [ "地址簿" ], - "summary": "创建地址簿", + "summary": "批量创建地址簿", "parameters": [ { "description": "地址簿信息", @@ -1242,7 +1242,7 @@ const docTemplateadmin = `{ "token": [] } ], - "description": "设备删除", + "description": "批量设备删除", "consumes": [ "application/json" ], @@ -1252,15 +1252,15 @@ const docTemplateadmin = `{ "tags": [ "设备" ], - "summary": "设备删除", + "summary": "批量设备删除", "parameters": [ { - "description": "设备信息", + "description": "设备id", "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/admin.PeerForm" + "$ref": "#/definitions/admin.PeerBatchDeleteForm" } } ], @@ -1365,6 +1365,12 @@ const docTemplateadmin = `{ "description": "页大小", "name": "page_size", "in": "query" + }, + { + "type": "integer", + "description": "时间", + "name": "time_ago", + "in": "query" } ], "responses": { @@ -2311,6 +2317,12 @@ const docTemplateadmin = `{ "user_id": { "type": "integer" }, + "user_ids": { + "type": "array", + "items": { + "type": "integer" + } + }, "username": { "type": "string" } @@ -2398,6 +2410,20 @@ const docTemplateadmin = `{ } } }, + "admin.PeerBatchDeleteForm": { + "type": "object", + "required": [ + "row_ids" + ], + "properties": { + "row_ids": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, "admin.PeerForm": { "type": "object", "properties": { diff --git a/docs/admin/admin_swagger.json b/docs/admin/admin_swagger.json index f7c55f7..1b7cb6b 100644 --- a/docs/admin/admin_swagger.json +++ b/docs/admin/admin_swagger.json @@ -15,7 +15,7 @@ "token": [] } ], - "description": "创建地址簿", + "description": "批量创建地址簿", "consumes": [ "application/json" ], @@ -25,7 +25,7 @@ "tags": [ "地址簿" ], - "summary": "创建地址簿", + "summary": "批量创建地址簿", "parameters": [ { "description": "地址簿信息", @@ -1235,7 +1235,7 @@ "token": [] } ], - "description": "设备删除", + "description": "批量设备删除", "consumes": [ "application/json" ], @@ -1245,15 +1245,15 @@ "tags": [ "设备" ], - "summary": "设备删除", + "summary": "批量设备删除", "parameters": [ { - "description": "设备信息", + "description": "设备id", "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/admin.PeerForm" + "$ref": "#/definitions/admin.PeerBatchDeleteForm" } } ], @@ -1358,6 +1358,12 @@ "description": "页大小", "name": "page_size", "in": "query" + }, + { + "type": "integer", + "description": "时间", + "name": "time_ago", + "in": "query" } ], "responses": { @@ -2304,6 +2310,12 @@ "user_id": { "type": "integer" }, + "user_ids": { + "type": "array", + "items": { + "type": "integer" + } + }, "username": { "type": "string" } @@ -2391,6 +2403,20 @@ } } }, + "admin.PeerBatchDeleteForm": { + "type": "object", + "required": [ + "row_ids" + ], + "properties": { + "row_ids": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, "admin.PeerForm": { "type": "object", "properties": { diff --git a/docs/admin/admin_swagger.yaml b/docs/admin/admin_swagger.yaml index d92d04f..bbd8766 100644 --- a/docs/admin/admin_swagger.yaml +++ b/docs/admin/admin_swagger.yaml @@ -46,6 +46,10 @@ definitions: type: array user_id: type: integer + user_ids: + items: + type: integer + type: array username: type: string required: @@ -107,6 +111,15 @@ definitions: - op - redirect_url type: object + admin.PeerBatchDeleteForm: + properties: + row_ids: + items: + type: integer + type: array + required: + - row_ids + type: object admin.PeerForm: properties: cpu: @@ -473,7 +486,7 @@ paths: post: consumes: - application/json - description: 创建地址簿 + description: 批量创建地址簿 parameters: - description: 地址簿信息 in: body @@ -499,7 +512,7 @@ paths: $ref: '#/definitions/response.Response' security: - token: [] - summary: 创建地址簿 + summary: 批量创建地址簿 tags: - 地址簿 /admin/address_book/delete: @@ -1196,14 +1209,14 @@ paths: post: consumes: - application/json - description: 设备删除 + description: 批量设备删除 parameters: - - description: 设备信息 + - description: 设备id in: body name: body required: true schema: - $ref: '#/definitions/admin.PeerForm' + $ref: '#/definitions/admin.PeerBatchDeleteForm' produces: - application/json responses: @@ -1217,7 +1230,7 @@ paths: $ref: '#/definitions/response.Response' security: - token: [] - summary: 设备删除 + summary: 批量设备删除 tags: - 设备 /admin/peer/detail/{id}: @@ -1266,6 +1279,10 @@ paths: in: query name: page_size type: integer + - description: 时间 + in: query + name: time_ago + type: integer produces: - application/json responses: