-
Notifications
You must be signed in to change notification settings - Fork 832
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
Fix:Add k8s namespace page flipping function in the background #178
Conversation
|
||
@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 + ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是什么意思?
There was a problem hiding this comment.
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 为无限大
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么要做不分页?不是统一按照后台分页的模式了么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个其实是getNames功能,名称可以统一改成getName 不用传分页参数
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已增加接口解决这个问题。
…e into fix/admin_k8s_namespace
Add k8s namespace page flipping function in the background