Skip to content

Commit

Permalink
Allow app filter to be unselected (#349)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:
As same as filtering for piped list.

**Which issue(s) this PR fixes**:

Fixes #

**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
-->
```release-note
NONE
```

This PR was merged by Kapetanios.
  • Loading branch information
nakabonne authored Jul 9, 2020
1 parent 015c764 commit c90d730
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/app/api/api/web_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,11 @@ func (a *WebAPI) ListApplications(ctx context.Context, req *webservice.ListAppli
},
}
if o := req.Options; o != nil {
if !o.IncludeDisabled {
if o.Enabled != nil {
filters = append(filters, datastore.ListFilter{
Field: "Disabled",
Operator: "==",
Value: false,
Value: !o.Enabled.GetValue(),
})
}
// TODO: Support multiple filtering of Kinds, SyncStatuses and EnvIds
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/api/service/webservice/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ message DisableApplicationResponse {

message ListApplicationsRequest {
message Options {
bool include_disabled = 1;
google.protobuf.BoolValue enabled = 1;
repeated model.ApplicationKind kinds = 2;
repeated model.ApplicationSyncStatus sync_statuses = 3;
repeated string env_ids = 4;
Expand Down

0 comments on commit c90d730

Please sign in to comment.