Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/dispatch/static/dispatch/src/case/type/NewEditSheet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ import PluginMetadataInput from "@/plugin/PluginMetadataInput.vue"
import ServiceSelect from "@/service/ServiceSelect.vue"
import ProjectSelect from "@/project/ProjectSelect.vue"
import TemplateSelect from "@/document/template/TemplateSelect.vue"
import ProjectApi from "@/project/api"

export default {
setup() {
Expand Down Expand Up @@ -220,8 +221,12 @@ export default {
},
created() {
if (this.$route.query.project) {
// required for plugin metadata
this.project = { name: this.$route.query.project }
this.incidentProject = this.project
ProjectApi.getAll({ q: this.$route.query.project }).then((response) => {
this.incidentProject = response.data.items[0]
this.project = response.data.items[0]
})
}
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default {

if (this.project) {
filterOptions.filters = {
project: [this.project],
project_id: this.project_id,
enabled: ["true"],
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/dispatch/static/dispatch/src/service/ServiceSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ export default {
}

if (this.project) {
filterOptions.filters.project_id = this.project.map((p) => p.id)
filterOptions.filters.project_id = this.project.id
}

if (this.healthMetrics) {
filterOptions.filters.health_metrics = ["true"]
}

filterOptions = SearchUtils.createParametersFromTableOptions({ ...filterOptions })
filterOptions = SearchUtils.createParametersFromTableOptions({ ...filterOptions }, "Service")

ServiceApi.getAll(filterOptions).then((response) => {
this.items = response.data.items
Expand Down
Loading