Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api,ui): add state filter on worker model #3319

Merged
merged 3 commits into from
Sep 13, 2018

Conversation

bnjjj
Copy link
Contributor

@bnjjj bnjjj commented Sep 13, 2018

Signed-off-by: Benjamin Coenen [email protected]

  1. Description
  2. Related issues
  3. About tests
  4. Mentions

@ovh/cds

@@ -187,6 +217,10 @@ func LoadWorkerModelsByUser(db gorp.SqlExecutor, store cache.Store, user *sdk.Us
select %s from worker_model
JOIN "group" on worker_model.group_id = "group".id
where group_id = $2`, modelColumns, modelColumns)
if len(additionalFilters) > 0 {
query = fmt.Sprintf("%s AND %s", query, strings.Join(additionalFilters, " AND "))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concat strings

@@ -54,6 +55,14 @@ type dbResultWMS struct {
GroupName string `db:"groupname"`
}

// LoadOptions represent load options to load worker model
type LoadOptions struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not a state type with four constants ?

@yesnault yesnault merged commit a2e3f11 into master Sep 13, 2018
@bnjjj bnjjj deleted the feat_state_filter_worker_model branch October 30, 2018 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants