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):
7676 return super ().post_execute(message, result)
7777```
7878
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 `
8080
81813 ) Replace ` ACCESS_TOKEN ` with any secret enough string and run:
8282``` bash
@@ -85,7 +85,7 @@ docker run -d --rm \
8585 -v ./taskiq-admin-data/:/usr/database/ \
8686 -e TASKIQ_ADMIN_API_TOKEN=supersecret \
8787 --name taskiq-admin \
88- artur10/taskiq-admin:1.1.1
88+ artur10/taskiq-admin:1.1.2
8989```
9090
91914 ) Go to ` http://localhost:3000/tasks `
Original file line number Diff line number Diff line change 22 "name" : " nuxt-app" ,
33 "private" : true ,
44 "type" : " module" ,
5- "version" : " 1.1.1 " ,
5+ "version" : " 1.1.2 " ,
66 "scripts" : {
77 "build" : " nuxt build" ,
88 "dev" : " nuxt dev" ,
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ if (!route.query.page) {
1111const perPage = 10
1212const searchRef = ref (" " )
1313
14+ const search = computed (() => route .query .search || " " )
1415const page = computed (() => Number (route .query .page ) || 1 )
15- const search = computed (() => Number (route .query .search ) || " " )
1616
1717const { data } = useAsyncData (
1818 " tasks" ,
@@ -38,6 +38,18 @@ function limitText(text: string, length: number) {
3838 return text
3939}
4040
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+
4153function handleNext() {
4254 if (page .value < totalPages .value ) {
4355 router .push ({
@@ -71,22 +83,22 @@ function handlePrev() {
7183 <NuxtLink to =" /api/tasks/backup" target =" _blank" > Backup </NuxtLink >
7284 </button >
7385 </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 >
8799 </div >
88100 </div >
89- </form >
101+ </div >
90102 </div >
91103
92104 <div class =" table-responsive" >
Original file line number Diff line number Diff line change 11import { db } from "../db"
22import { tasksTable } from "../db/schema"
3- import { count , eq , desc , ilike } from "drizzle-orm"
43import { takeUniqueOrThrow } from "../utils"
4+ import { count , eq , desc , like } from "drizzle-orm"
55
66export type TaskState = "pending" | "success" | "failed"
77
88class TasksRepository {
99 async getAll ( name : string | null , limit : number , offset : number ) {
1010 const whereCondition = name
11- ? ilike ( tasksTable . name , `%${ name } %` )
11+ ? like ( tasksTable . name , `%${ name . toLowerCase ( ) } %` )
1212 : undefined
1313
1414 const countResult = await db
You can’t perform that action at this time.
0 commit comments