Skip to content

Commit

Permalink
Provide entries for all columns in datatable columns definitions
Browse files Browse the repository at this point in the history
Due to a [recent
change](jbox-web/ajax-datatables-rails@0b934f0...81662a8#diff-80d0432c49b2b316f927e4faca3c1a6af69be69fbf98adb7e5b0aa579ca88e87R95)
we need to set all columns used in a datatable in the `@view_columns` map.
  • Loading branch information
danidoni committed Jan 11, 2021
1 parent 1f99079 commit 4bbaff9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/api/app/datatables/excluded_request_datatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ def initialize(params, opts = {})
def view_columns
@view_columns ||= {
request: { source: 'BsRequestAction.target_package', cond: :like },
description: { source: 'Staging::RequestExclusion.description', cond: :like }
description: { source: 'Staging::RequestExclusion.description', cond: :like },
actions: {}
}
end

Expand Down
3 changes: 2 additions & 1 deletion src/api/app/datatables/maintained_project_datatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def initialize(params, opts = {})

def view_columns
@view_columns ||= {
name: { source: 'Project.name', cond: :like }
name: { source: 'Project.name', cond: :like },
actions: {}
}
end

Expand Down
8 changes: 7 additions & 1 deletion src/api/app/datatables/maintenance_incident_datatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ def initialize(params, opts = {})
end

def view_columns
@view_columns ||= { summary: { source: 'Project.name', orderable: true } }
@view_columns ||= {
summary: { source: 'Project.name', orderable: true },
category: {},
packages: {},
info: {},
release_targets: {}
}
end

# rubocop:disable Naming/AccessorMethodName
Expand Down
3 changes: 2 additions & 1 deletion src/api/app/datatables/user_configuration_datatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ def view_columns
@view_columns ||= {
name: { source: 'User.login' },
local_user: { source: 'User.ignore_auth_services', searchable: false },
state: { source: 'User.state' }
state: { source: 'User.state' },
actions: {}
}
end

Expand Down

0 comments on commit 4bbaff9

Please sign in to comment.