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
1 change: 1 addition & 0 deletions server/mergin/sync/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ class AdminProjectSchema(ma.SQLAlchemyAutoSchema):
id = fields.UUID(attribute="Project.id")
name = fields.Str(attribute="Project.name")
workspace = fields.Method("_workspace_name")
workspace_id = fields.Int(attribute="Project.workspace_id")
version = fields.Function(
lambda obj: ProjectVersion.to_v_name(obj.Project.latest_version)
)
Expand Down
3 changes: 2 additions & 1 deletion server/mergin/sync/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ def workspace_count():
def projects_query(self, like: str = None):
ws = self.factory_method()
query = db.session.query(
Project, literal(ws.name).label("workspace_name")
Project,
literal(ws.name).label("workspace_name"),
).filter(Project.storage_params.isnot(None))

if like:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { LoginViewTemplate, useUserStore } from '@mergin/lib'
import { mapActions } from 'pinia'
import { defineComponent } from 'vue'


export default defineComponent({
name: 'LoginView',
components: {
Expand Down
7 changes: 1 addition & 6 deletions web-app/packages/admin-app/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
SettingsView,
ProjectsView,
ProjectView,
// useAdminStore
AdminRoutes
} from '@mergin/admin-lib'
import {
Expand Down Expand Up @@ -48,11 +47,7 @@ export const createRouter = (pinia: Pinia) => {
{
path: '/',
name: 'admin',
component: NotFoundView,
beforeEnter: (to, from, next) => {
next('/accounts')
},
props: true
redirect: '/accounts'
},
{
path: '/accounts',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
<router-link
class="title-t4"
:to="{
name: `workspace`,
params: { namespace: slotProps.data.workspace }
name: `adminWorkspace`,
params: { id: slotProps.data.workspace_id }
}"
>
{{ slotProps.data.workspace }}
Expand Down
3 changes: 2 additions & 1 deletion web-app/packages/admin-lib/src/modules/admin/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export interface AdminProjectListItem extends Project {
disk_usage: number
id: string
name: string
namespace: string
workspace: string
workspace_id: number
updated: string
version: string
removed_at: string
Expand Down