File tree Expand file tree Collapse file tree 4 files changed +32
-20
lines changed Expand file tree Collapse file tree 4 files changed +32
-20
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class TaskiqAdminMiddleware(TaskiqMiddleware):
76
76
return super ().post_execute(message, result)
77
77
```
78
78
79
- 2 ) Pull the image from DockerHub: ` docker pull artur10/taskiq-admin:1.1.1 `
79
+ 2 ) Pull the image from DockerHub: ` docker pull artur10/taskiq-admin:1.1.2 `
80
80
81
81
3 ) Replace ` ACCESS_TOKEN ` with any secret enough string and run:
82
82
``` bash
@@ -85,7 +85,7 @@ docker run -d --rm \
85
85
-v ./taskiq-admin-data/:/usr/database/ \
86
86
-e TASKIQ_ADMIN_API_TOKEN=supersecret \
87
87
--name taskiq-admin \
88
- artur10/taskiq-admin:1.1.1
88
+ artur10/taskiq-admin:1.1.2
89
89
```
90
90
91
91
4 ) Go to ` http://localhost:3000/tasks `
Original file line number Diff line number Diff line change 2
2
"name" : " nuxt-app" ,
3
3
"private" : true ,
4
4
"type" : " module" ,
5
- "version" : " 1.1.1 " ,
5
+ "version" : " 1.1.2 " ,
6
6
"scripts" : {
7
7
"build" : " nuxt build" ,
8
8
"dev" : " nuxt dev" ,
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ if (!route.query.page) {
11
11
const perPage = 10
12
12
const searchRef = ref (" " )
13
13
14
+ const search = computed (() => route .query .search || " " )
14
15
const page = computed (() => Number (route .query .page ) || 1 )
15
- const search = computed (() => Number (route .query .search ) || " " )
16
16
17
17
const { data } = useAsyncData (
18
18
" tasks" ,
@@ -38,6 +38,18 @@ function limitText(text: string, length: number) {
38
38
return text
39
39
}
40
40
41
+ function searchSubmit() {
42
+ if (searchRef .value ) {
43
+ router .push ({
44
+ path: " /tasks" ,
45
+ query: {
46
+ page: 1 ,
47
+ search: searchRef .value ,
48
+ },
49
+ })
50
+ }
51
+ }
52
+
41
53
function handleNext() {
42
54
if (page .value < totalPages .value ) {
43
55
router .push ({
@@ -71,22 +83,22 @@ function handlePrev() {
71
83
<NuxtLink to =" /api/tasks/backup" target =" _blank" > Backup </NuxtLink >
72
84
</button >
73
85
</div >
74
- <form method = " get " action = " " >
75
- <div class =" row mb-3 " >
76
- <div class =" col " >
77
- <div class = " d-flex justify-content-end " >
78
- < input
79
- type =" search"
80
- name = " search "
81
- class = " form-control w-auto "
82
- placeholder = " Search tasks... "
83
- v-model = " searchRef "
84
- / >
85
- < button type = " submit " class = " btn btn-primary ml-2 " > Search</ button >
86
- </div >
86
+ <div class = " row mb-3 " >
87
+ <div class =" col " >
88
+ <div class =" d-flex justify-content-end " >
89
+ <input
90
+ type = " search "
91
+ name =" search"
92
+ class = " form-control w-auto "
93
+ placeholder = " Search tasks... "
94
+ v-model = " searchRef "
95
+ />
96
+ < button @click = " searchSubmit " class = " btn btn-primary ml-2 " >
97
+ Search
98
+ </button >
87
99
</div >
88
100
</div >
89
- </form >
101
+ </div >
90
102
</div >
91
103
92
104
<div class =" table-responsive" >
Original file line number Diff line number Diff line change 1
1
import { db } from "../db"
2
2
import { tasksTable } from "../db/schema"
3
- import { count , eq , desc , ilike } from "drizzle-orm"
4
3
import { takeUniqueOrThrow } from "../utils"
4
+ import { count , eq , desc , like } from "drizzle-orm"
5
5
6
6
export type TaskState = "pending" | "success" | "failed"
7
7
8
8
class TasksRepository {
9
9
async getAll ( name : string | null , limit : number , offset : number ) {
10
10
const whereCondition = name
11
- ? ilike ( tasksTable . name , `%${ name } %` )
11
+ ? like ( tasksTable . name , `%${ name . toLowerCase ( ) } %` )
12
12
: undefined
13
13
14
14
const countResult = await db
You can’t perform that action at this time.
0 commit comments