Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wiki
Manage
Activity
Members
Labels
Plan
Issues
53
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MDM Lab
Wiki
Commits
8da25b97
Commit
8da25b97
authored
11 months ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
use client for serverDbtable
parent
6e535f35
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/ServerDbTable.vue
+14
-3
14 additions, 3 deletions
components/ServerDbTable.vue
docker-compose.yml
+1
-1
1 addition, 1 deletion
docker-compose.yml
with
15 additions
and
4 deletions
components/ServerDbTable.vue
+
14
−
3
View file @
8da25b97
...
...
@@ -7,6 +7,7 @@ import { useDisplay } from "vuetify";
import
{
useThrottleFn
}
from
'
@vueuse/core
'
import
type
{
FacetInputItem
,
FilterItem
}
from
'
@/components/AutocompleteMeiliFacets.vue
'
import
{
useMeiliSearch
}
from
"
#imports
"
import
type
{
SearchResponse
}
from
'
meilisearch
'
// import { saveAs } from "file-saver";
export
interface
SortItem
{
key
:
string
,
...
...
@@ -55,9 +56,11 @@ const props = withDefaults(defineProps<Props>(), {
}
});
const
slots
=
useSlots
()
const
client
=
useMeiliSearchRef
()
const
sortByRef
=
toRef
(
props
.
sortBy
)
const
emit
=
defineEmits
([
"
refresh:search
"
])
const
{
search
:
msSearch
,
result
:
msResult
}
=
useMeiliSearch
(
props
.
autocompleteMeiliFacetsProps
.
db
)
const
msResult
=
ref
()
// const { search: msSearch, result: msResult } = useMeiliSearch(props.autocompleteMeiliFacetsProps.db)
const
search
:
Ref
<
string
>
=
ref
(
""
);
const
filterOrSearch
:
Ref
<
FilterItem
[]
|
null
>
=
ref
(
null
)
const
hitsPerPage
:
Ref
<
number
>
=
ref
(
25
)
...
...
@@ -118,7 +121,7 @@ watch([paginationParams, msSortBy, page], ([newParams, newSort, newPage]) => {
}
})
on
Before
Mount
(
async
()
=>
{
onMount
ed
(
async
()
=>
{
searchOrFilter
()
emitRefreshRes
()
})
...
...
@@ -214,7 +217,15 @@ async function searchOrFilter() {
try
{
loading
.
value
=
true
const
q
=
search
.
value
await
msSearch
(
q
,
{
...
paginationParams
.
value
,
filter
:
toValue
(
computedFilter
),
sort
:
msSortBy
.
value
})
const
response
=
await
client
.
index
(
props
.
autocompleteMeiliFacetsProps
.
db
)
.
search
(
q
,
{
...
paginationParams
.
value
,
filter
:
toValue
(
computedFilter
),
sort
:
msSortBy
.
value
})
// await msSearch(q, { ...paginationParams.value, filter: toValue(computedFilter), sort: msSortBy.value })
msResult
.
value
=
response
}
catch
(
error
:
any
)
{
filterError
.
value
=
error
console
.
log
(
error
)
...
...
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
1
−
1
View file @
8da25b97
...
...
@@ -7,7 +7,7 @@ services:
args
:
BASE_URL
:
/wiki
MEILI_HOST
:
http://localhost:7700
MEILI_API_KEY
:
f5f5f1bc48e6379fc2509f5bf0aed1fce96c1bbf86e0a194c605b258d7cfe890
MEILI_API_KEY
:
3534db2924c3938bab5fc878906aaf1b83f8f39867891c6d020b05043b04b1ef
HOST_URL
:
http://localhost:8082
container_name
:
nuxt
environment
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment