diff --git a/app/web/views/components/vsource/common.templ b/app/web/views/components/vsource/common.templ
index 7f495a2..06d8ee7 100644
--- a/app/web/views/components/vsource/common.templ
+++ b/app/web/views/components/vsource/common.templ
@@ -5,6 +5,7 @@ import "github.com/cloudness-io/cloudness/types"
import "github.com/cloudness-io/cloudness/app/web/views/shared"
import "github.com/cloudness-io/cloudness/helpers"
import "github.com/cloudness-io/cloudness/app/services/spec"
+import "strings"
templ Image(app *types.Application) {
@shared.Icon(spec.GetSourceIcon(app), "")
@@ -34,14 +35,25 @@ func getSourceLink(spec *types.ApplicationSpec) templ.Component {
return gitLink(owner+"/"+repo, httpUrl, branch, commit, commitUrl)
} else if spec.IsRegistry() {
- return getRegistryLink(spec.Build.Source.Registry.Image)
+ imageUrl := spec.Build.Source.Registry.Image
+ if !strings.HasPrefix(imageUrl, "https://") {
+ imageUrl = "https://hub.docker.com/r/" + strings.TrimSpace(imageUrl)
+ }
+ //remove tag if present
+ imageUrl = removeTag(imageUrl)
+ return getRegistryLink(spec.Build.Source.Registry.Image, imageUrl)
}
return emptyLink("unknow source")
}
-templ getRegistryLink(image string) {
-
- { image } { imageName }