fix: add summary-stats options (#22219)

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
Jian Qiu
2025-03-03 10:10:34 +08:00
committed by GitHub
co-authored by Qiu Jian
parent 4756215435
commit 58b90f1d9c
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -168,6 +168,8 @@ type ModelBaseListInput struct {
ExportKeys string `json:"export_keys" help:"Export field keys"`
// 返回结果携带delete_fail_reason和update_fail_reason字段
ShowFailReason *bool `json:"show_fail_reason"`
// 是否返回状态统计信息,默认为False
SummaryStats *bool `json:"summary_stats"`
}
func (o ModelBaseListInput) GetExportKeys() string {
+2
View File
@@ -264,6 +264,8 @@ type BaseListOptions struct {
// Name []string `help:"fitler by name"`
Status []string `help:"filter by status"`
SummaryStats bool `help:"show summary stats" json:"summary_stats"`
}
func (opts *BaseListOptions) addTag(keyPrefix, tagstr string, idx int, params *jsonutils.JSONDict) error {