Skip to content
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
10 changes: 9 additions & 1 deletion core/frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ export default Vue.extend({
icon: service.metadata?.icon?.startsWith('/')
? `${address}${service.metadata.icon}`
: service.metadata?.icon ?? 'mdi-puzzle',
route: service.metadata?.route ?? address,
route: this.addExtraQuery(service.metadata?.route ?? address, service.metadata?.extra_queries),
new_page: service.metadata?.new_page ?? undefined,
advanced: false,
text: service.metadata?.description ?? 'Service text',
Expand Down Expand Up @@ -651,6 +651,14 @@ export default Vue.extend({
this.bootstrap_version = await VCU.loadBootstrapCurrentVersion()
},
methods: {
addExtraQuery(url: string, extra_queries?: string) {
if (!extra_queries) {
return url
}
// adds additional query parameters to a url
const separator = url.includes('?') ? '&' : '?'
return url + separator + extra_queries
},
getWidget(name: string) {
return this.widgets.filter((widget) => widget.name === name)?.[0]?.component
},
Expand Down
1 change: 1 addition & 0 deletions core/frontend/src/types/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface ServiceMetadata {
route?: string
new_page?: boolean
sanitized_name?: string
extra_query?: string
}

export interface Service {
Expand Down
1 change: 1 addition & 0 deletions core/services/helper/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class ServiceMetadata(BaseModel):
webpage: str
route: Optional[str]
new_page: Optional[bool]
extra_query: Optional[str]
api: str
sanitized_name: Optional[str]

Expand Down
Loading