diff --git a/cmd/wire_gen.go b/cmd/wire_gen.go index cf05057f..702f60df 100644 --- a/cmd/wire_gen.go +++ b/cmd/wire_gen.go @@ -297,4 +297,4 @@ func initApplication(debug bool, serverConf *conf.Server, dbConf *data.Database, cleanup2() cleanup() }, nil -} \ No newline at end of file +} diff --git a/docs/docs.go b/docs/docs.go index f73d35ae..4f5fe86e 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -3109,7 +3109,7 @@ const docTemplate = `{ }, "/answer/api/v1/embed/config": { "get": { - "description": "GetEmbedConfig", + "description": "get embed plugin config", "consumes": [ "application/json" ], @@ -3117,9 +3117,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "PluginEmbed" + "Plugin" ], - "summary": "GetEmbedConfig", + "summary": "get embed plugin config", "responses": { "200": { "description": "OK", @@ -5828,6 +5828,45 @@ const docTemplate = `{ } } }, + "/answer/api/v1/tag/merge": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "merge tag", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Tag" + ], + "summary": "merge tag", + "parameters": [ + { + "description": "tag", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.AddTagReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/handler.RespBody" + } + } + } + } + }, "/answer/api/v1/tag/recover": { "post": { "security": [ @@ -9085,6 +9124,9 @@ const docTemplate = `{ }, "slug_name": { "type": "string" + }, + "tag_id": { + "type": "string" } } }, @@ -11787,4 +11829,4 @@ var SwaggerInfo = &swag.Spec{ func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) -} \ No newline at end of file +} diff --git a/docs/swagger.json b/docs/swagger.json index 6a22fa9d..5a48fd0d 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -3082,7 +3082,7 @@ }, "/answer/api/v1/embed/config": { "get": { - "description": "GetEmbedConfig", + "description": "get embed plugin config", "consumes": [ "application/json" ], @@ -3090,9 +3090,9 @@ "application/json" ], "tags": [ - "PluginEmbed" + "Plugin" ], - "summary": "GetEmbedConfig", + "summary": "get embed plugin config", "responses": { "200": { "description": "OK", @@ -5801,6 +5801,45 @@ } } }, + "/answer/api/v1/tag/merge": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "merge tag", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Tag" + ], + "summary": "merge tag", + "parameters": [ + { + "description": "tag", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.AddTagReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/handler.RespBody" + } + } + } + } + }, "/answer/api/v1/tag/recover": { "post": { "security": [ @@ -9058,6 +9097,9 @@ }, "slug_name": { "type": "string" + }, + "tag_id": { + "type": "string" } } }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index b5d58b5d..c06ce949 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1138,6 +1138,8 @@ definitions: type: boolean slug_name: type: string + tag_id: + type: string type: object schema.GetTagPageResp: properties: @@ -4833,7 +4835,7 @@ paths: get: consumes: - application/json - description: GetEmbedConfig + description: get embed plugin config produces: - application/json responses: @@ -4848,9 +4850,9 @@ paths: $ref: '#/definitions/plugin.EmbedConfig' type: array type: object - summary: GetEmbedConfig + summary: get embed plugin config tags: - - PluginEmbed + - Plugin /answer/api/v1/file: post: consumes: @@ -6487,6 +6489,30 @@ paths: summary: update tag tags: - Tag + /answer/api/v1/tag/merge: + post: + consumes: + - application/json + description: merge tag + parameters: + - description: tag + in: body + name: data + required: true + schema: + $ref: '#/definitions/schema.AddTagReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/handler.RespBody' + security: + - ApiKeyAuth: [] + summary: merge tag + tags: + - Tag /answer/api/v1/tag/recover: post: consumes: @@ -7487,4 +7513,4 @@ securityDefinitions: in: header name: Authorization type: apiKey -swagger: "2.0" \ No newline at end of file +swagger: "2.0" diff --git a/internal/service/mock/siteinfo_repo_mock.go b/internal/service/mock/siteinfo_repo_mock.go index 7f6d89eb..1b841278 100644 --- a/internal/service/mock/siteinfo_repo_mock.go +++ b/internal/service/mock/siteinfo_repo_mock.go @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + // Code generated by MockGen. DO NOT EDIT. // Source: ./siteinfo_service.go // diff --git a/ui/src/components/AdminSideNav/index.tsx b/ui/src/components/AdminSideNav/index.tsx index 770189b4..a2d36fbd 100644 --- a/ui/src/components/AdminSideNav/index.tsx +++ b/ui/src/components/AdminSideNav/index.tsx @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + import { useEffect } from 'react'; import { NavLink } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; diff --git a/ui/src/components/Header/components/SearchInput/index.tsx b/ui/src/components/Header/components/SearchInput/index.tsx index 11dacff2..b071ab07 100644 --- a/ui/src/components/Header/components/SearchInput/index.tsx +++ b/ui/src/components/Header/components/SearchInput/index.tsx @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + import { FC, useState, useEffect } from 'react'; import { Form, FormControl } from 'react-bootstrap'; import { useSearchParams, useNavigate, useLocation } from 'react-router-dom'; diff --git a/ui/src/components/MobileSideNav/index.scss b/ui/src/components/MobileSideNav/index.scss index 5960d7ff..4a21fbb8 100644 --- a/ui/src/components/MobileSideNav/index.scss +++ b/ui/src/components/MobileSideNav/index.scss @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + #mobileSideNav { top: 62px !important; width: 240px !important; diff --git a/ui/src/components/MobileSideNav/index.tsx b/ui/src/components/MobileSideNav/index.tsx index b0ff81a8..ce1ffb5f 100644 --- a/ui/src/components/MobileSideNav/index.tsx +++ b/ui/src/components/MobileSideNav/index.tsx @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + import { Offcanvas } from 'react-bootstrap'; import { useLocation } from 'react-router-dom'; diff --git a/ui/src/pages/Tags/Info/components/MergeTagModal/index.scss b/ui/src/pages/Tags/Info/components/MergeTagModal/index.scss index d798d896..7e84109e 100644 --- a/ui/src/pages/Tags/Info/components/MergeTagModal/index.scss +++ b/ui/src/pages/Tags/Info/components/MergeTagModal/index.scss @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + .mergeTagModal { .dropdown-item.active { color: var(--bs-body-color); diff --git a/ui/test.html b/ui/test.html index 20cf636c..28577a55 100644 --- a/ui/test.html +++ b/ui/test.html @@ -1,3 +1,23 @@ +