Skip to content

Commit 9ebb492

Browse files
committed
feat: add server side apps pagination
Signed-off-by: yang.xiao <[email protected]>
1 parent e55840a commit 9ebb492

File tree

10 files changed

+4184
-1125
lines changed

10 files changed

+4184
-1125
lines changed

assets/swagger.json

Lines changed: 377 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apiclient/application/application.pb.go

Lines changed: 847 additions & 178 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/application/v1alpha1/generated.pb.go

Lines changed: 1836 additions & 922 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/application/v1alpha1/generated.proto

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/application/v1alpha1/types.go

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,31 @@ type ApplicationWatchEvent struct {
16931693
type ApplicationList struct {
16941694
metav1.TypeMeta `json:",inline"`
16951695
metav1.ListMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"`
1696-
Items []Application `json:"items" protobuf:"bytes,2,rep,name=items"`
1696+
Items []Application `json:"items" protobuf:"bytes,2,rep,name=items"`
1697+
Stats ApplicationListStats `json:"stats,omitempty" protobuf:"bytes,3,opt,name=stats"`
1698+
}
1699+
1700+
type ApplicationLabelStats struct {
1701+
Key string `json:"key" protobuf:"bytes,1,opt,name=key"`
1702+
Values []string `json:"values" protobuf:"bytes,2,opt,name=values"`
1703+
}
1704+
1705+
// ApplicationListStats holds additional information about the list of applications
1706+
type ApplicationListStats struct {
1707+
Total int64 `json:"total" protobuf:"bytes,1,opt,name=total"`
1708+
TotalBySyncStatus map[SyncStatusCode]int64 `json:"totalBySyncStatus,omitempty" protobuf:"bytes,2,opt,name=totalBySyncStatus"`
1709+
TotalByHealthStatus map[health.HealthStatusCode]int64 `json:"totalByHealthStatus,omitempty" protobuf:"bytes,3,opt,name=totalByHealthStatus"`
1710+
AutoSyncEnabledCount int64 `json:"autoSyncEnabledCount" protobuf:"bytes,4,opt,name=autoSyncEnabledCount"`
1711+
Destinations []ApplicationDestination `json:"destinations" protobuf:"bytes,5,opt,name=destinations"`
1712+
Namespaces []string `json:"namespaces" protobuf:"bytes,6,opt,name=namespaces"`
1713+
Labels []ApplicationLabelStats `json:"labels,omitempty" protobuf:"bytes,7,opt,name=labels"`
1714+
}
1715+
1716+
func NewApplicationListStats() ApplicationListStats {
1717+
return ApplicationListStats{
1718+
TotalBySyncStatus: make(map[SyncStatusCode]int64),
1719+
TotalByHealthStatus: make(map[health.HealthStatusCode]int64),
1720+
}
16971721
}
16981722

16991723
// ComponentParameter contains information about component parameter value

pkg/apis/application/v1alpha1/zz_generated.deepcopy.go

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)