Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions agent/app/dto/response/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 4 additions & 3 deletions agent/app/service/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions agent/app/service/app_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1567,8 +1567,9 @@ func handleInstalled(appInstallList []model.AppInstall, updated bool, sync bool)
Website: installed.App.Website,
Document: installed.App.Document,
},
Favorite: installed.Favorite,
Container: installed.ContainerName,
Favorite: installed.Favorite,
Container: installed.ContainerName,
ServiceName: strings.ToLower(installed.ServiceName),
}
if !updated {
installDTO.LinkDB = hasLinkDB(installed.ID)
Expand Down
1 change: 1 addition & 0 deletions frontend/src/api/interface/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export namespace App {
app: App;
webUI: string;
appKey?: string;
serviceName: string;
}

export interface AppInstalledInfo {
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/views/app-store/installed/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Loading