diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..e3903657c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,62 @@ +name: "Bug Report" +description: Report a bug to help improve blueking-apigateway. +title: "bug: ......" +body: + - type: markdown + attributes: + value: | + _请提供足够详细的信息, 以便我们能够快速帮助你__ + + 提交 Issue 前,请先搜索 [开放的 Issue](https://github.com/TencentBlueKing/blueking-apigateway/issues),避免重复提交。 + + _The more information you share, the faster we can help you_ + + Search the [open issues](https://github.com/apache/apisix/issues) before you open a new issue. + + - type: textarea + id: current-behavior + attributes: + label: Current Behavior + description: 遇到的问题 (Describe the issue you are facing) + validations: + required: true + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: 预期行为 (Describe what you expected to happen) + validations: + required: false + - type: textarea + id: error + attributes: + label: Error Logs + description: 错误日志 (Paste the error logs if any) + validations: + required: false + - type: textarea + id: steps + attributes: + label: Steps to Reproduce + description: 复现步骤 (Share the steps you took so that we can reproduce the issue. Reports without proper steps details will likely be closed.) + placeholder: | + 1. ... + 2. ... + 3. ... + validations: + required: true + - type: textarea + id: version-environment + attributes: + label: Version and Environment + description: 版本及环境信息 (Share your version and environment details) + value: | + - 蓝鲸版本号 (the version of BlueKing platform): + - 容器化部署还是二进制部署 (deployed on Kubernetes or using binary files): + - 二进制部署请提供网关版本号 (the version of bk-apigateway, required for binary distribution): + - 容器化部署请提供 (provide the following information, required for Kubernetes helm chart distribution): + - bk-apigateway helm chart version: + - `values.yaml` 中是否做了修改 (whether you have modified the `values.yaml`): + - `values.yaml` 中的配置, 注意去除敏感信息 (the contents of the `values.yaml` file, remember to remove any sensitive information): + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000..aa5ecc10a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,24 @@ +name: "Feature Request" +description: Suggest an enhancement to blueking-apigateway. +title: "feat: ......" +body: + - type: markdown + attributes: + value: | + _请提供足够详细的信息, 以便我们能够快速帮助你__ + + 提交 Issue 前,请先搜索 [开放的 Issue](https://github.com/TencentBlueKing/blueking-apigateway/issues),避免重复提交。 + + _The more information you share, the faster we can help you_ + + Search the [open issues](https://github.com/apache/apisix/issues) before you open a new issue. + + - type: textarea + id: description + attributes: + label: Description + description: 描述你期望支持的特性 (Describe the feature you would like to see.) + placeholder: | + 功能需求描述, 包含具体需求背景和功能描述 (Functional requirements description, including specific requirements background and functional description) + validations: + required: true \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..b6cc17123 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,14 @@ +### Description + + + + +Fixes # (issue) + +### Checklist + +- [ ] 填写 PR 描述及相关 issue (write PR description and related issue) +- [ ] 代码风格检查通过 (code style check passed) +- [ ] PR 中包含单元测试 (include unit test) +- [ ] 单元测试通过 (unit test passed) +- [ ] 本地开发联调环境验证通过 (local development environment verification passed) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9cb17a9e2..384ea335f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,10 +57,12 @@ repos: - id: Name check name: Check sensitive info verbose: true - language: script - entry: .pre_commit_hooks/rtx.sh + language: system + require_serial: true + entry: bash -c "if [[ -d pre_commit_hooks ]]; then pre_commit_hooks/rtx.sh $@; fi" - id: IP check name: Check sensitive info verbose: true - language: script - entry: .pre_commit_hooks/ip.sh \ No newline at end of file + language: system + require_serial: true + entry: bash -c "if [[ -d pre_commit_hooks ]]; then pre_commit_hooks/ip.sh $@; fi" \ No newline at end of file diff --git a/src/dashboard-front/src/App.vue b/src/dashboard-front/src/App.vue index daf4db54a..2e883155f 100644 --- a/src/dashboard-front/src/App.vue +++ b/src/dashboard-front/src/App.vue @@ -550,7 +550,8 @@ 3: ['componentAPI', 'ComponentAPIDetailIntro', 'ComponentAPIDetailDoc'], 4: ['apigwSDK'], 5: ['esbSDK'] - } + }, + isSwitch: false } }, computed: { @@ -991,7 +992,7 @@ this.$router.push({ name: routeName, params: { - id: this.apigwId + id: routeName === 'index' ? '' : this.apigwId } }) } @@ -1053,7 +1054,10 @@ emitSideToggleEnd () { bus.$emit('side-toggle-end') }, - handleApigwSelect (index) { + handleApigwSelect (id) { + if (!id) { + return + } const routeParams = { name: this.$route.meta.matchRoute || this.$route.name, params: this.$route.params, @@ -1062,7 +1066,7 @@ if (routeParams.name !== 'apigwVersionCreate') { routeParams.query = this.$route.query } - routeParams.params.id = index + routeParams.params.id = this.isSwitch ? this.activeApigwId : id this.$router.push(routeParams) }, async changeLanguage (languageType) { @@ -1110,6 +1114,7 @@ }) } else { optionInput.removeEventListener('keydown', this.handleNavigate) + this.isSwitch = false } }, // 键盘上下键回车处理 @@ -1122,15 +1127,18 @@ } else { this.selectIndex-- } + this.isSwitch = true break case 40: this.selectIndex < length - 1 ? this.selectIndex++ : this.selectIndex = 0 + this.isSwitch = true break case 13: e.preventDefault() this.selectApigwId = this.activeApigwId break default: + this.isSwitch = false break } }, diff --git a/src/dashboard-front/src/components/user/index.vue b/src/dashboard-front/src/components/user/index.vue index a34b2879b..da2145516 100644 --- a/src/dashboard-front/src/components/user/index.vue +++ b/src/dashboard-front/src/components/user/index.vue @@ -79,6 +79,9 @@ focus () { this.$refs.userSelector.focus() }, + handleBlur () { + this.$refs.userSelector.handleBlur() + }, async fuzzySearchMethod (keyword, page = 1) { const users = await this.$http.get(this.api, { params: { diff --git a/src/dashboard-front/src/views/index.vue b/src/dashboard-front/src/views/index.vue index ecca2c863..65885b98a 100644 --- a/src/dashboard-front/src/views/index.vue +++ b/src/dashboard-front/src/views/index.vue @@ -39,7 +39,7 @@ - + @@ -173,6 +173,9 @@ }) } finally { this.isDataLoading = false + this.$nextTick(() => { + this.hasElemnetScrollbar('.container-content') + }) } }, @@ -284,6 +287,15 @@ item.isNewCreated = true } }) + }, + + /** + * 当前容器是否存在滚动条 + */ + hasElemnetScrollbar (elClassName) { + const element = document.querySelector(elClassName) + const hasVerticalScrollbar = element.scrollHeight > element.clientHeight + hasVerticalScrollbar ? element.classList.add('content-scroll-cls') : element.classList.remove('content-scroll-cls') } } } @@ -299,7 +311,7 @@ top: 0; left: 0; height: 80px; - background: linear-gradient(to right, #f5f7fa 99%, transparent 0px); + background: #f5f7fa; z-index: 9; overflow: hidden; .content { @@ -398,7 +410,7 @@ left: 0; overflow: hidden; z-index: 9; - background: linear-gradient(to right, #f5f7fa 99%, transparent 0px); + background: #f5f7fa; tr { display: block; width: 1280px; @@ -571,4 +583,13 @@ .gateway-wrapper /deep/ .bk-loading .bk-loading-wrapper { top: 260px; } + + .container-content.content-scroll-cls { + .header { + width: calc(100% - 6px); + } + .apigw-table-thead { + width: calc(100% - 6px); + } + } diff --git a/src/dashboard-front/src/views/resource/index.vue b/src/dashboard-front/src/views/resource/index.vue index b09f765c7..e7d7539b0 100644 --- a/src/dashboard-front/src/views/resource/index.vue +++ b/src/dashboard-front/src/views/resource/index.vue @@ -118,7 +118,7 @@ :data="resourceList" :size="setting.size" :pagination="pagination" - :ext-cls="resourceList.length > 1 ? 'ag-resources-table' : 'ag-resource-table'" + :ext-cls="resourceList.length > 0 ? 'ag-resources-table' : 'ag-resource-table'" v-bkloading="{ isLoading: isDataLoading, opacity: 1, immediate: true }" :default-expand-all="false" @page-limit-change="handlePageLimitChange" @@ -404,7 +404,7 @@ key="updateTime" :render-header="$renderHeader"> - +
{{ $t('网关名') }} {{ $t('网关名') }} {{ $t('描述') }} {{ $t('创建者') }} {{ $t('环境列表') }}