Skip to content

Commit 95f0f86

Browse files
committed
fix: change interface of load and load_sum methods
Signed-off-by: seolmin <[email protected]>
1 parent b238a6d commit 95f0f86

File tree

2 files changed

+57
-6
lines changed

2 files changed

+57
-6
lines changed

proto/spaceone/api/dashboard/v1/private_widget.proto

+29-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ service PrivateWidget{
4040
};
4141
}
4242

43-
rpc load_sum (LoadPrivateWidgetRequest) returns (google.protobuf.Struct) {
43+
rpc load_sum (LoadSumPrivateWidgetRequest) returns (google.protobuf.Struct) {
4444
option (google.api.http) = {
4545
post: "/dashboard/v1/private-widget/load-sum"
4646
body: "*"
@@ -62,6 +62,17 @@ service PrivateWidget{
6262
}
6363
}
6464

65+
66+
message PrivateWidgetSort {
67+
string key = 1;
68+
bool desc = 2;
69+
}
70+
71+
message PrivateWidgetPage {
72+
int32 start = 1;
73+
int32 limit = 2;
74+
}
75+
6576
message CreatePrivateWidgetRequest {
6677
enum State {
6778
STATE_NONE = 0;
@@ -123,9 +134,24 @@ message PrivateWidgetRequest {
123134

124135
message LoadPrivateWidgetRequest {
125136
string widget_id = 1;
126-
spaceone.api.core.v2.TimeSeriesAnalyzeQuery query = 2;
137+
string granularity = 2;
138+
string start = 3;
139+
string end = 4;
140+
// +optional
141+
repeated PrivateWidgetSort sort = 5;
142+
// +optional
143+
PrivateWidgetPage page = 6;
144+
// +optional
145+
google.protobuf.Struct vars = 7;
146+
}
147+
148+
message LoadSumPrivateWidgetRequest {
149+
string widget_id = 1;
150+
string granularity = 2;
151+
string start = 3;
152+
string end = 4;
127153
// +optional
128-
google.protobuf.Struct vars = 3;
154+
google.protobuf.Struct vars = 7;
129155
}
130156

131157
message PrivateWidgetQuery {

proto/spaceone/api/dashboard/v1/public_widget.proto

+28-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ service PublicWidget{
4040
};
4141
}
4242

43-
rpc load_sum (LoadPublicWidgetRequest) returns (google.protobuf.Struct) {
43+
rpc load_sum (LoadSumPublicWidgetRequest) returns (google.protobuf.Struct) {
4444
option (google.api.http) = {
4545
post: "/dashboard/v1/public-widget/load-sum"
4646
body: "*"
@@ -62,6 +62,16 @@ service PublicWidget{
6262
}
6363
}
6464

65+
message PublicWidgetSort {
66+
string key = 1;
67+
bool desc = 2;
68+
}
69+
70+
message PublicWidgetPage {
71+
int32 start = 1;
72+
int32 limit = 2;
73+
}
74+
6575
message CreatePublicWidgetRequest {
6676
enum State {
6777
STATE_NONE = 0;
@@ -123,9 +133,24 @@ message PublicWidgetRequest {
123133

124134
message LoadPublicWidgetRequest {
125135
string widget_id = 1;
126-
spaceone.api.core.v2.TimeSeriesAnalyzeQuery query = 2;
136+
string granularity = 2;
137+
string start = 3;
138+
string end = 4;
139+
// +optional
140+
repeated PublicWidgetSort sort = 5;
141+
// +optional
142+
PublicWidgetPage page = 6;
143+
// +optional
144+
google.protobuf.Struct vars = 7;
145+
}
146+
147+
message LoadSumPublicWidgetRequest {
148+
string widget_id = 1;
149+
string granularity = 2;
150+
string start = 3;
151+
string end = 4;
127152
// +optional
128-
google.protobuf.Struct vars = 3;
153+
google.protobuf.Struct vars = 7;
129154
}
130155

131156
message PublicWidgetQuery {

0 commit comments

Comments
 (0)