federated-dash/cmd/web/app-links.go

175 lines
4.2 KiB
Go
Raw Normal View History

2024-06-25 20:17:08 +00:00
package main
2024-06-28 15:09:41 +00:00
import (
"slices"
"strings"
)
2024-06-25 20:17:08 +00:00
type AppLink struct {
Title string
Url string
DocumentationUrl string
2024-06-25 20:17:08 +00:00
Image string
Description string
SpecialNote string
LDAP bool
2024-06-25 20:17:08 +00:00
}
func getAppLinks(tier, baseUri string) []AppLink {
2024-06-28 15:09:41 +00:00
var output []AppLink
//Get Links Based on Tier
2024-06-25 20:17:08 +00:00
if tier == "enterprise" {
2024-06-28 15:09:41 +00:00
output = getEnterpriseLinks(baseUri)
2024-06-25 20:17:08 +00:00
} else if tier == "creator" {
2024-06-28 15:09:41 +00:00
output = getCreatorLinks(baseUri)
2024-06-25 20:17:08 +00:00
} else if tier == "teams" {
2024-06-28 15:09:41 +00:00
output = getTeamsLinks(baseUri)
} else {
output = getStarterLinks(baseUri)
2024-06-25 20:17:08 +00:00
}
2024-06-28 15:09:41 +00:00
//Sort in alphabetical order
slices.SortFunc(output, func(a, b AppLink) int {
return strings.Compare(a.Title, b.Title)
})
return output
2024-06-25 20:17:08 +00:00
}
func getStarterLinks(baseUri string) []AppLink {
return []AppLink {
{
Title: "Panel",
Description: "Create & Manage Users",
2024-06-25 21:28:39 +00:00
Image: "/static/img/users.png",
2024-06-28 15:23:38 +00:00
Url: "https://panel." + baseUri + "/log_in/",
LDAP: true,
DocumentationUrl: "https://documentation.federated.computer/docs/core_applications/panel/",
2024-06-25 20:17:08 +00:00
},
{
Title: "Nextcloud",
Description: "Email, Files, Documents",
2024-06-25 21:28:39 +00:00
Image: "/static/img/nextcloud.png",
2024-06-25 20:17:08 +00:00
Url: "https://nextcloud." + baseUri,
LDAP: true,
DocumentationUrl: "https://docs.nextcloud.com/server/latest/user_manual/en/",
2024-06-25 20:17:08 +00:00
},
{
Title: "Vaultwarden",
Description: "Passwords",
2024-06-25 21:28:39 +00:00
Image: "/static/img/vaultwarden.png",
2024-06-25 20:17:08 +00:00
Url: "https://vaultwarden." + baseUri,
LDAP: false,
SpecialNote: "Must create your own admin user at setup.",
2024-07-02 15:47:43 +00:00
DocumentationUrl: "https://bitwarden.com/help/onboarding-and-succession/",
2024-06-25 20:17:08 +00:00
},
2024-06-25 21:28:39 +00:00
{
Title: "Power DNS",
Description: "DNS Management",
Image: "/static/img/powerdns.png",
Url: "https://powerdns." + baseUri,
LDAP: false,
2024-07-02 15:47:43 +00:00
DocumentationUrl: "https://doc.powerdns.com/",
2024-06-25 21:28:39 +00:00
},
2024-06-25 20:17:08 +00:00
}
}
func getCreatorLinks(baseUri string) []AppLink {
creatorLinks := []AppLink {
{
Title: "Element",
2024-06-25 20:17:08 +00:00
Description: "Team Chat",
2024-06-25 21:28:39 +00:00
Image: "/static/img/element.png",
2024-06-25 20:17:08 +00:00
Url: "https://element." + baseUri,
LDAP: true,
2024-07-02 15:47:43 +00:00
DocumentationUrl: "https://element.io/user-guide",
2024-06-25 20:17:08 +00:00
},
{
Title: "Wordpress",
Description: "Your Website",
2024-06-25 21:28:39 +00:00
Image: "/static/img/wordpress.png",
2024-06-28 15:23:38 +00:00
Url: "https://" + baseUri + "/wp-admin",
LDAP: false,
2024-07-02 15:47:43 +00:00
DocumentationUrl: "https://wordpress.org/documentation/",
2024-06-25 20:17:08 +00:00
},
}
return append(creatorLinks, getStarterLinks(baseUri)...)
}
func getTeamsLinks(baseUri string) []AppLink {
teamsLinks := []AppLink {
{
Title: "Espo CRM",
Description: "Customer Relationship Manager",
2024-06-25 21:28:39 +00:00
Image: "/static/img/espo.png",
2024-06-25 20:17:08 +00:00
Url: "https://espocrm." + baseUri,
LDAP: true,
2024-07-02 15:47:43 +00:00
DocumentationUrl: "https://docs.espocrm.com/user-guide/sales-management/",
2024-06-25 20:17:08 +00:00
},
{
Title: "FreeScout",
Description: "Customer Help Desk",
2024-06-25 21:28:39 +00:00
Image: "/static/img/freescout.png",
2024-06-25 20:17:08 +00:00
Url: "https://freescout." + baseUri,
LDAP: false,
2024-06-25 20:17:08 +00:00
},
}
return append(teamsLinks, getCreatorLinks(baseUri)...)
}
func getEnterpriseLinks(baseUri string) []AppLink {
enterpriseLinks := []AppLink{
{
Title: "Jitsi",
Description: "Video Chat",
2024-06-25 21:28:39 +00:00
Image: "/static/img/jitsi.png",
2024-06-25 20:17:08 +00:00
Url: "https://jitsi." + baseUri,
LDAP: true,
2024-07-02 15:47:43 +00:00
DocumentationUrl: "https://jitsi.github.io/handbook/docs/intro/",
2024-06-25 20:17:08 +00:00
},
{
Title: "Listmonk",
Description: "Email Marketing",
2024-06-25 21:28:39 +00:00
Image: "/static/img/listmonk.png",
2024-06-25 20:17:08 +00:00
Url: "https://listmonk." + baseUri,
LDAP: false,
2024-07-02 15:47:43 +00:00
DocumentationUrl: "https://listmonk.app/docs/concepts/",
2024-06-25 20:17:08 +00:00
},
{
Title: "Baserow",
Description: "Visual Databases",
2024-06-25 21:28:39 +00:00
Image: "/static/img/baserow.png",
2024-06-25 20:17:08 +00:00
Url: "https://baserow." + baseUri,
LDAP: false,
DocumentationUrl: "https://baserow.io/user-docs",
2024-06-25 20:17:08 +00:00
},
{
Title: "Bookstack",
Description: "Wiki Knowledgebase",
2024-06-25 21:28:39 +00:00
Image: "/static/img/bookstack.png",
2024-06-25 20:17:08 +00:00
Url: "https://bookstack." + baseUri,
LDAP: false,
DocumentationUrl: "https://www.bookstackapp.com/docs/",
2024-06-25 20:17:08 +00:00
},
{
Title: "Gitea",
Description: "GIT Source Control",
2024-06-25 21:28:39 +00:00
Image: "/static/img/gitea.png",
2024-06-25 20:17:08 +00:00
Url: "https://gitea." + baseUri,
LDAP: false,
2024-07-02 15:47:43 +00:00
DocumentationUrl: "https://docs.gitea.com/category/usage",
2024-06-25 20:17:08 +00:00
},
{
Title: "Castopod",
Description: "Podcast Distribution",
2024-06-25 21:28:39 +00:00
Image: "/static/img/castopod.png",
2024-06-28 15:23:38 +00:00
Url: "https://castopod." + baseUri + "/cp-auth/login",
LDAP: false,
2024-06-25 20:17:08 +00:00
},
}
return append(enterpriseLinks, getTeamsLinks(baseUri)...)
}