Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

perf: improve plugin loading #823

Merged
merged 3 commits into from
Jan 16, 2023

Conversation

ruibaby
Copy link
Member

@ruibaby ruibaby commented Jan 15, 2023

What type of PR is this?

/kind improvement

What this PR does / why we need it:

优化 Console 端加载插件资源的逻辑。

  1. 查询接口改为自定义接口,传入 enabled 参数进行筛选。
  2. 修改符合 Console 插件的筛选判断。
  3. 隐藏加载异常的提示。

Which issue(s) this PR fixes:

Fixes halo-dev/halo#3156

Special notes for your reviewer:

测试方式:

  1. 安装若干带有 Console 端拓展的插件,比如:https://github.com/halo-sigs/plugin-stackedit
  2. 检查是否有加载成功。
  3. 创建一个没有插件访问权限的角色。
  4. 登录之后检查是否有无权限提示。

Does this PR introduce a user-facing change?

优化 Console 端加载插件资源的逻辑。

@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/improvement Categorizes issue or PR as related to a improvement. labels Jan 15, 2023
@vercel
Copy link

vercel bot commented Jan 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ui ✅ Ready (Inspect) Visit Preview Jan 16, 2023 at 7:11AM (UTC)

Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 16, 2023
Copy link
Member

@wzrove wzrove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Jan 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, wzrove

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Jan 16, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 04819c1 into halo-dev:main Jan 16, 2023
@ruibaby ruibaby deleted the perf/load-plugin-assets branch January 16, 2023 10:04
@JohnNiang JohnNiang modified the milestones: 2.2.x, 2.2.0 Jan 30, 2023
JohnNiang pushed a commit to JohnNiang/halo that referenced this pull request Mar 2, 2023
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

优化 Console 端加载插件资源的逻辑。

1. 查询接口改为自定义接口,传入 enabled 参数进行筛选。
2. 修改符合 Console 插件的筛选判断。
3. 隐藏加载异常的提示。

#### Which issue(s) this PR fixes:

Fixes halo-dev#3156

#### Special notes for your reviewer:

测试方式:

1. 安装若干带有 Console 端拓展的插件,比如:https://github.com/halo-sigs/plugin-stackedit
2. 检查是否有加载成功。
3. 创建一个没有插件访问权限的角色。
4. 登录之后检查是否有无权限提示。

#### Does this PR introduce a user-facing change?


```release-note
优化 Console 端加载插件资源的逻辑。
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Console 首次加载页面请求插件需要阻止无权限提示
4 participants