mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-18 13:29:03 +08:00
fix: resolve incorrect container filter condition when redirecting applications (#10971)
This commit is contained in:
parent
b9367abfb9
commit
a4d77a1cc2
5 changed files with 13 additions and 6 deletions
|
|
@ -130,6 +130,7 @@ type AppInstallDTO struct {
|
|||
Container string `json:"container"`
|
||||
IsEdit bool `json:"isEdit"`
|
||||
LinkDB bool `json:"linkDB"`
|
||||
ServiceName string `json:"serviceName"`
|
||||
}
|
||||
|
||||
type AppInstallInfo struct {
|
||||
|
|
|
|||
|
|
@ -450,10 +450,11 @@ func (a AppService) Install(req request.AppInstallCreate) (appInstall *model.App
|
|||
}
|
||||
index++
|
||||
}
|
||||
if app.Limit == 0 && appInstall.Name != serviceName && len(servicesMap) == 1 {
|
||||
servicesMap[appInstall.Name] = servicesMap[serviceName]
|
||||
newServiceName := strings.ToLower(appInstall.Name)
|
||||
if app.Limit == 0 && newServiceName != serviceName && len(servicesMap) == 1 {
|
||||
servicesMap[newServiceName] = servicesMap[serviceName]
|
||||
delete(servicesMap, serviceName)
|
||||
serviceName = appInstall.Name
|
||||
serviceName = newServiceName
|
||||
}
|
||||
appInstall.ServiceName = serviceName
|
||||
|
||||
|
|
|
|||
|
|
@ -1569,6 +1569,7 @@ func handleInstalled(appInstallList []model.AppInstall, updated bool, sync bool)
|
|||
},
|
||||
Favorite: installed.Favorite,
|
||||
Container: installed.ContainerName,
|
||||
ServiceName: strings.ToLower(installed.ServiceName),
|
||||
}
|
||||
if !updated {
|
||||
installDTO.LinkDB = hasLinkDB(installed.ID)
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ export namespace App {
|
|||
app: App;
|
||||
webUI: string;
|
||||
appKey?: string;
|
||||
serviceName: string;
|
||||
}
|
||||
|
||||
export interface AppInstalledInfo {
|
||||
|
|
|
|||
|
|
@ -702,7 +702,10 @@ const buttons = [
|
|||
];
|
||||
|
||||
const toContainer = async (row: App.AppInstalled) => {
|
||||
routerToNameWithQuery('ContainerItem', { filters: 'com.docker.compose.project=' + row.name, uncached: true });
|
||||
routerToNameWithQuery('ContainerItem', {
|
||||
filters: 'com.docker.compose.project=' + row.serviceName,
|
||||
uncached: true,
|
||||
});
|
||||
};
|
||||
|
||||
const openBackups = (row: App.AppInstalled) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue