File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
frontend/src/views/domain Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,17 @@ const {$gettext, interpolate} = useGettext()
99import domain from ' @/api/domain'
1010import {Badge , message } from ' ant-design-vue'
1111import {h , ref } from ' vue'
12+ import {input } from ' @/components/StdDataEntry'
1213
1314const columns = [{
1415 title : () => $gettext (' Name' ),
1516 dataIndex: ' name' ,
1617 sorter: true ,
17- pithy: true
18+ pithy: true ,
19+ edit: {
20+ type: input
21+ },
22+ search: true
1823}, {
1924 title : () => $gettext (' Status' ),
2025 dataIndex: ' enabled' ,
@@ -40,7 +45,7 @@ const columns = [{
4045 pithy: true
4146}, {
4247 title : () => $gettext (' Action' ),
43- dataIndex: ' action' ,
48+ dataIndex: ' action'
4449}]
4550
4651const table = ref (null )
@@ -85,7 +90,6 @@ function destroy(site_name: any) {
8590 <std-table
8691 :api =" domain"
8792 :columns =" columns"
88- :disable_search =" true"
8993 row-key =" name"
9094 ref =" table"
9195 @clickEdit =" r => $router.push({
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import (
1515)
1616
1717func GetDomains (c * gin.Context ) {
18+ name := c .Query ("name" )
1819 orderBy := c .Query ("order_by" )
1920 sort := c .DefaultQuery ("sort" , "desc" )
2021
@@ -49,6 +50,9 @@ func GetDomains(c *gin.Context) {
4950 file := configFiles [i ]
5051 fileInfo , _ := file .Info ()
5152 if ! file .IsDir () {
53+ if name != "" && ! strings .Contains (file .Name (), name ) {
54+ continue
55+ }
5256 configs = append (configs , gin.H {
5357 "name" : file .Name (),
5458 "size" : fileInfo .Size (),
You can’t perform that action at this time.
0 commit comments