Skip to content

Commit

Permalink
Ensures all case and incident priorities and severities are returned …
Browse files Browse the repository at this point in the history
…for rendering dashboard charts (Netflix#3048) (#29)

Co-authored-by: Marc Vilanova <39573146+mvilanova@users.noreply.github.com>
  • Loading branch information
rutvijmehta-harness and mvilanova authored Mar 17, 2023
1 parent 7f6479e commit eb253f8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/dispatch/incident/severity/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
router = APIRouter()


@router.get("", response_model=IncidentSeverityPagination, tags=["case_severities"])
def get_case_severities(*, common: dict = Depends(common_parameters)):
"""Returns all case severities."""
@router.get("", response_model=IncidentSeverityPagination, tags=["incident_severities"])
def get_incident_severities(*, common: dict = Depends(common_parameters)):
"""Returns all incident severities."""
return search_filter_sort_paginate(model="IncidentSeverity", **common)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ export default {
},
created: function () {
CaseSeverityApi.getAll().then((response) => {
let filterOptions = {
itemsPerPage: -1,
}
CaseSeverityApi.getAll(filterOptions).then((response) => {
this.severities = [
...new Set(
map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ export default {
},
created: function () {
IncidentPriorityApi.getAll().then((response) => {
let filterOptions = {
itemsPerPage: -1,
}
IncidentPriorityApi.getAll(filterOptions).then((response) => {
this.priorities = [
...new Set(
map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ export default {
},
created: function () {
IncidentSeverityApi.getAll().then((response) => {
let filterOptions = {
itemsPerPage: -1,
}
IncidentSeverityApi.getAll(filterOptions).then((response) => {
this.severities = [
...new Set(
map(
Expand Down

0 comments on commit eb253f8

Please sign in to comment.