From f0f051615af832a0cad644e248109fa925904c8b Mon Sep 17 00:00:00 2001 From: Will Sheldon <114631109+wssheldon@users.noreply.github.com> Date: Thu, 9 Nov 2023 14:59:30 -0800 Subject: [PATCH] [WIP] - First pass at migrating case page to Vue 3 --- .../src/case/CaseStatusSelectGroup.vue | 179 +++++ .../static/dispatch/src/case/Page.vue | 758 ++++++++++++++++++ .../dispatch/src/case/ParticipantChips.vue | 270 +++++++ .../dispatch/src/case/ParticipantSelect.vue | 141 ++++ .../static/dispatch/src/case/Table.vue | 10 +- .../static/dispatch/src/case/TagChips.vue | 170 ++++ .../case/priority/CasePrioritySelectChip.vue | 93 +++ .../case/severity/CaseSeveritySelectChip.vue | 95 +++ .../src/case/type/CaseTypeSelectChip.vue | 116 +++ .../dispatch/src/components/RichEditor.vue | 56 ++ .../src/project/ProjectSelectChip.vue | 104 +++ .../static/dispatch/src/router/config.js | 9 +- .../src/signal/NewRawSignalViewer.vue | 82 ++ .../src/signal/SignalInstanceCardViewer.vue | 82 ++ 14 files changed, 2163 insertions(+), 2 deletions(-) create mode 100644 src/dispatch/static/dispatch/src/case/CaseStatusSelectGroup.vue create mode 100644 src/dispatch/static/dispatch/src/case/Page.vue create mode 100644 src/dispatch/static/dispatch/src/case/ParticipantChips.vue create mode 100644 src/dispatch/static/dispatch/src/case/ParticipantSelect.vue create mode 100644 src/dispatch/static/dispatch/src/case/TagChips.vue create mode 100644 src/dispatch/static/dispatch/src/case/priority/CasePrioritySelectChip.vue create mode 100644 src/dispatch/static/dispatch/src/case/severity/CaseSeveritySelectChip.vue create mode 100644 src/dispatch/static/dispatch/src/case/type/CaseTypeSelectChip.vue create mode 100644 src/dispatch/static/dispatch/src/components/RichEditor.vue create mode 100644 src/dispatch/static/dispatch/src/project/ProjectSelectChip.vue create mode 100644 src/dispatch/static/dispatch/src/signal/NewRawSignalViewer.vue create mode 100644 src/dispatch/static/dispatch/src/signal/SignalInstanceCardViewer.vue diff --git a/src/dispatch/static/dispatch/src/case/CaseStatusSelectGroup.vue b/src/dispatch/static/dispatch/src/case/CaseStatusSelectGroup.vue new file mode 100644 index 000000000000..1b55d19464f2 --- /dev/null +++ b/src/dispatch/static/dispatch/src/case/CaseStatusSelectGroup.vue @@ -0,0 +1,179 @@ + + + + + Update Case Status + Are you sure you want to change the case status from {{ _case.status }} to + {{ selectedStatus }} + + + Submit + + + + + + + + + + + + + + + + + {{ status.label }} + + + + {{ status.label }} + + {{ + status.tooltip ? status.tooltip : `Not yet ${status.label.toLowerCase()}` + }} + + + + + {{ + status.tooltip ? status.tooltip : `Not yet ${status.label.toLowerCase()}` + }} + + + + + + + + + + + + diff --git a/src/dispatch/static/dispatch/src/case/Page.vue b/src/dispatch/static/dispatch/src/case/Page.vue new file mode 100644 index 000000000000..75ad2a8508d7 --- /dev/null +++ b/src/dispatch/static/dispatch/src/case/Page.vue @@ -0,0 +1,758 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mdi-clock-outline + Timeline + + + mdi-semantic-web + Resources + + + mdi-broadcast + + + Signals + + + Signals + + + mdi-account-group + + + Entities + + + Entities + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mdi-loading + mdi-update + {{ lastUpdatedTime }} + + + + + + + + + + mdi-lock-open + mdi-lock + + + + Update Case Visibility + Are you sure you want to change the case visibility from + {{ this.selected.visibility }} to {{ newVisibility }} + + Submit + + + + + mdi-fire + + + + + mdi-dots-vertical + + + + mdi-delete Delete + + + + + + + + Assigned to + + + + + + + + Reported by + + + + + + + + Priority + + + + + + + + Severity + + + + + + + + Type + + + + + + + + Project + + + + + + + Resolution Details + + + + + + + + mdi-pencil + {{ + selected.resolution_reason + ? selected.resolution_reason + : "Select a resolution reason" + }} + + + + + {{ reason }} + + + + + + + Submit + + + + + + + + + mdi-tag + + + + Submit + + + + + + Duplicates + + Submit + + + + + Related + + Submit + + + + + Incidents + + Submit + + + + + + mdi-content-duplicate + Duplicates + mdi-plus + + + + mdi-fire + Incidents + mdi-plus + + + + mdi-animation + Related + mdi-plus + + + + mdi-tag + Tags + mdi-plus + + + + + + + + + + + + + + + + diff --git a/src/dispatch/static/dispatch/src/case/ParticipantChips.vue b/src/dispatch/static/dispatch/src/case/ParticipantChips.vue new file mode 100644 index 000000000000..fb5eb40dc773 --- /dev/null +++ b/src/dispatch/static/dispatch/src/case/ParticipantChips.vue @@ -0,0 +1,270 @@ + + + + + + + + + + {{ initials(participant.individual.name) }} + + + + + + + + {{ initials(participant.individual.name) }} + + + {{ participant.individual.name }} + {{ + participant.participant_roles | activeRoles + }} + + + + mdi-close-circle + + + + + + + + mdi-email + + {{ participant.individual.email }} + + + + + business + + {{ participant.individual.company }} + + + + groups + + {{ participant.department }} + + + + group + + {{ participant.team }} + + + + mdi-map-marker + + {{ participant.location }} + + + + + open_in_new + + External Profile + + + + + + + + + Other Participants + + + + + + + + {{ participant.individual.name }} ({{ + participant.participant_roles | activeRoles + }}) + + + {{ participant.team }} - {{ participant.location }} + + + + + open_in_new + + + + + + + + No participant data available. + + + + + + + + + +{{ hiddenParticipants.length }} + + + + + + + + + + + + diff --git a/src/dispatch/static/dispatch/src/case/ParticipantSelect.vue b/src/dispatch/static/dispatch/src/case/ParticipantSelect.vue new file mode 100644 index 000000000000..812688d56af7 --- /dev/null +++ b/src/dispatch/static/dispatch/src/case/ParticipantSelect.vue @@ -0,0 +1,141 @@ + + + + + + + No individuals matching " + {{ search }}". + + + + + + + + + + + + + + + + + + + Load More + + + + + + + diff --git a/src/dispatch/static/dispatch/src/case/Table.vue b/src/dispatch/static/dispatch/src/case/Table.vue index 7b5ec121faea..2fd4d4445d6b 100644 --- a/src/dispatch/static/dispatch/src/case/Table.vue +++ b/src/dispatch/static/dispatch/src/case/Table.vue @@ -89,13 +89,21 @@ + + View + - View / Edit + Edit + + + {{ tag }} + + + Add tag mdi-plus + Close mdi-close + + + + Update Case Tags + + + + + + Update + + + + + + + + + + + diff --git a/src/dispatch/static/dispatch/src/case/priority/CasePrioritySelectChip.vue b/src/dispatch/static/dispatch/src/case/priority/CasePrioritySelectChip.vue new file mode 100644 index 000000000000..c711f3cd73b8 --- /dev/null +++ b/src/dispatch/static/dispatch/src/case/priority/CasePrioritySelectChip.vue @@ -0,0 +1,93 @@ + + + + + + mdi-alert-plus-outline + + {{ _case.case_priority.name }} + + + + + {{ priority }} + + + + + + + + diff --git a/src/dispatch/static/dispatch/src/case/severity/CaseSeveritySelectChip.vue b/src/dispatch/static/dispatch/src/case/severity/CaseSeveritySelectChip.vue new file mode 100644 index 000000000000..60350de878bb --- /dev/null +++ b/src/dispatch/static/dispatch/src/case/severity/CaseSeveritySelectChip.vue @@ -0,0 +1,95 @@ + + + + + + mdi-alert-plus-outline + + {{ _case.case_severity.name }} + + + + + {{ severity }} + + + + + + + + diff --git a/src/dispatch/static/dispatch/src/case/type/CaseTypeSelectChip.vue b/src/dispatch/static/dispatch/src/case/type/CaseTypeSelectChip.vue new file mode 100644 index 000000000000..2a1e06e67111 --- /dev/null +++ b/src/dispatch/static/dispatch/src/case/type/CaseTypeSelectChip.vue @@ -0,0 +1,116 @@ + + + + + {{ value ? value.name : "None" }} + + + + + {{ item.name }} + + + + + + + + diff --git a/src/dispatch/static/dispatch/src/components/RichEditor.vue b/src/dispatch/static/dispatch/src/components/RichEditor.vue new file mode 100644 index 000000000000..3e2246d5bd17 --- /dev/null +++ b/src/dispatch/static/dispatch/src/components/RichEditor.vue @@ -0,0 +1,56 @@ + + + + + + + + diff --git a/src/dispatch/static/dispatch/src/project/ProjectSelectChip.vue b/src/dispatch/static/dispatch/src/project/ProjectSelectChip.vue new file mode 100644 index 000000000000..8f808a5317eb --- /dev/null +++ b/src/dispatch/static/dispatch/src/project/ProjectSelectChip.vue @@ -0,0 +1,104 @@ + + + + + {{ project ? project.name : "None" }} + + + + + {{ item.name }} + + + + + + + + diff --git a/src/dispatch/static/dispatch/src/router/config.js b/src/dispatch/static/dispatch/src/router/config.js index df77f94e7bea..d9b47543bbd0 100644 --- a/src/dispatch/static/dispatch/src/router/config.js +++ b/src/dispatch/static/dispatch/src/router/config.js @@ -194,7 +194,7 @@ export const protectedRoute = [ component: () => import("@/case/Table.vue"), children: [ { - path: "/:organization/cases/:name", + path: "/:organization/cases/:name/edit", name: "CaseTableEdit", component: () => import("@/case/EditSheet.vue"), props: true, @@ -204,6 +204,13 @@ export const protectedRoute = [ }, ], }, + { + path: "/:organization/cases/:name/page", + name: "CasePage", + meta: { title: "Page" }, + component: () => import("@/case/Page.vue"), + props: true, + }, ], }, { diff --git a/src/dispatch/static/dispatch/src/signal/NewRawSignalViewer.vue b/src/dispatch/static/dispatch/src/signal/NewRawSignalViewer.vue new file mode 100644 index 000000000000..4af376a73e57 --- /dev/null +++ b/src/dispatch/static/dispatch/src/signal/NewRawSignalViewer.vue @@ -0,0 +1,82 @@ + + + + + + No example signals are currently available for this definition. + + + + + + + {{ index + 1 }} {{ item.created_at }} + + + + mdi-arrow-right + + + + + + + + + + + + + + + + + diff --git a/src/dispatch/static/dispatch/src/signal/SignalInstanceCardViewer.vue b/src/dispatch/static/dispatch/src/signal/SignalInstanceCardViewer.vue new file mode 100644 index 000000000000..3faa035e16b7 --- /dev/null +++ b/src/dispatch/static/dispatch/src/signal/SignalInstanceCardViewer.vue @@ -0,0 +1,82 @@ + + + + + + No example signals are currently available for this definition. + + + + + + + {{ index + 1 }} {{ item.created_at }} + + + + mdi-arrow-right + + + + + + + + + + + + + + + + +
No participant data available.