DNS服务商支持搜索

This commit is contained in:
刘祥超
2021-08-25 18:46:57 +08:00
parent 663ec7710c
commit 09ff5a37a9
2 changed files with 20 additions and 1 deletions

View File

@@ -15,9 +15,14 @@ func (this *IndexAction) Init() {
this.Nav("", "", "")
}
func (this *IndexAction) RunGet(params struct{}) {
func (this *IndexAction) RunGet(params struct {
Keyword string
}) {
this.Data["keyword"] = params.Keyword
countResp, err := this.RPC().DNSProviderRPC().CountAllEnabledDNSProviders(this.AdminContext(), &pb.CountAllEnabledDNSProvidersRequest{
AdminId: this.AdminId(),
Keyword: params.Keyword,
})
if err != nil {
this.ErrorPage(err)
@@ -29,6 +34,7 @@ func (this *IndexAction) RunGet(params struct{}) {
providersResp, err := this.RPC().DNSProviderRPC().ListEnabledDNSProviders(this.AdminContext(), &pb.ListEnabledDNSProvidersRequest{
AdminId: this.AdminId(),
Keyword: params.Keyword,
Offset: page.Offset,
Size: page.Size,
})