feat: 应用列表增加显示本地应用过滤 (#3168)

Refs https://github.com/1Panel-dev/1Panel/issues/2865
This commit is contained in:
zhengkunwang 2023-12-04 17:00:10 +08:00 committed by GitHub
parent 10aff32bb1
commit a09fd97b10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 1 deletions

View file

@ -61,7 +61,7 @@ func (a AppService) PageApp(req request.AppSearch) (interface{}, error) {
if req.Recommend {
opts = append(opts, appRepo.GetRecommend())
}
if req.Resource != "" {
if req.Resource != "" && req.Resource != "all" {
opts = append(opts, appRepo.WithResource(req.Resource))
}
if len(req.Tags) != 0 {

View file

@ -1522,6 +1522,7 @@ const message = {
syncAllAppHelper: 'All applications are about to be synchronized. Do you want to continue? ',
hostModeHelper:
'The current application network mode is host mode. If you need to open the port, please open it manually on the firewall page.',
showLocal: 'Show Local Application',
},
website: {
website: 'Website',

View file

@ -1422,6 +1422,7 @@ const message = {
downloadLogHelper2: '即將下載 {0} 應用最近 {1} 條日誌是否繼續 ',
syncAllAppHelper: '即將同步所有應用是否繼續 ',
hostModeHelper: '目前應用網路模式為 host 模式如需放開端口請在防火牆頁面手動放開',
showLocal: '顯示本機應用程式',
},
website: {
website: '網站',

View file

@ -1422,6 +1422,7 @@ const message = {
downloadLogHelper2: '即将下载 {0} 应用最近 {1} 条日志是否继续',
syncAllAppHelper: '即将同步所有应用是否继续',
hostModeHelper: '当前应用网络模式为 host 模式如需放开端口请在防火墙页面手动放开',
showLocal: '显示本地应用',
},
website: {
website: '网站',

View file

@ -65,6 +65,11 @@
</template>
<template #rightButton>
<div class="flex justify-end">
<div class="mr-10">
<el-checkbox v-model="req.resource" true-label="all" false-label="remote" @change="search(req)">
{{ $t('app.showLocal') }}
</el-checkbox>
</div>
<fu-table-pagination
v-model:current-page="paginationConfig.currentPage"
v-model:page-size="paginationConfig.pageSize"
@ -201,6 +206,7 @@ const req = reactive({
tags: [],
page: 1,
pageSize: 60,
resource: 'all',
});
const apps = ref<App.AppDTO[]>([]);