Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix:Add k8s namespace page flipping function in the background #178

Merged
merged 9 commits into from
Dec 28, 2018

Conversation

chengyumeng
Copy link
Collaborator

/kind bug

Add k8s namespace page flipping function in the background

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@chengyumeng chengyumeng added the kind/bug Categorizes issue or PR as related to a bug. label Dec 24, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

@Injectable()
export class NamespaceClient {
constructor(private http: HttpClient) {
}

list(cluster: string): Observable<any> {
// for list all in one page
let params = new HttpParams();
params = params.set('pageSize', 102410241024 + '');
Copy link
Collaborator

Choose a reason for hiding this comment

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

这是什么意思?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这个地方是要做不分页的,但是接口里面没有 pageSize 就会默认指定为 10,因此这个地方指定了一个“足够大”的 pageSize,实现不是很优雅。如果改变这个问题,可以通过修改 参数解析来实现,比如,pageSize 指定为 -1 的时候,则代表 pageSize 为无限大

Copy link
Collaborator

Choose a reason for hiding this comment

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

为什么要做不分页?不是统一按照后台分页的模式了么?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

这个其实是getNames功能,名称可以统一改成getName 不用传分页参数

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已增加接口解决这个问题。

wilhelmguo and others added 5 commits December 26, 2018 09:40

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@wilhelmguo wilhelmguo merged commit d0f1d23 into Qihoo360:master Dec 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants