This commit is contained in:
@@ -21,6 +21,7 @@ def generate_markdown_table(apps_data):
|
|||||||
'name': app['name'],
|
'name': app['name'],
|
||||||
'type': app['type'],
|
'type': app['type'],
|
||||||
'url': app['url'],
|
'url': app['url'],
|
||||||
|
'internal_url': app.get('internal_url', '-'),
|
||||||
'group': app['group'],
|
'group': app['group'],
|
||||||
'description': app['description'],
|
'description': app['description'],
|
||||||
'icon': app['icon'],
|
'icon': app['icon'],
|
||||||
@@ -34,6 +35,7 @@ def generate_markdown_table(apps_data):
|
|||||||
'name': app['name'],
|
'name': app['name'],
|
||||||
'type': app['type'],
|
'type': app['type'],
|
||||||
'url': app['url'],
|
'url': app['url'],
|
||||||
|
'internal_url': '-', # OAuth apps don't have internal URLs
|
||||||
'group': app['group'],
|
'group': app['group'],
|
||||||
'description': app['description'],
|
'description': app['description'],
|
||||||
'icon': app['icon'],
|
'icon': app['icon'],
|
||||||
@@ -53,15 +55,31 @@ def generate_markdown_table(apps_data):
|
|||||||
markdown.append("")
|
markdown.append("")
|
||||||
|
|
||||||
# Table
|
# Table
|
||||||
markdown.append("| Icon | Name | Type | URL | Group | Description |")
|
markdown.append("| Icon | Name | Type | External URL | Internal URL | Group | Description |")
|
||||||
markdown.append("|------|------|------|-----|-------|-------------|")
|
markdown.append("|:----:|------|------|--------------|--------------|-------|-------------|")
|
||||||
|
|
||||||
for app in all_apps:
|
for app in all_apps:
|
||||||
icon = f"" if app['icon'] else "📱"
|
# Icon with size constraint
|
||||||
url_link = f"[🔗 Open]({app['url']})" if app['url'] else "-"
|
if app['icon']:
|
||||||
|
icon = f'<img src="{app["icon"]}" width="32" height="32" alt="{app["name"]}">'
|
||||||
|
else:
|
||||||
|
icon = "📱"
|
||||||
|
|
||||||
|
# External URL link
|
||||||
|
external_link = f"[🔗 {app['url'].replace('https://', '').replace('http://', '')}]({app['url']})" if app.get('url') else "-"
|
||||||
|
|
||||||
|
# Internal URL (only for proxy apps)
|
||||||
|
internal_url = app.get('internal_url', '-')
|
||||||
|
if internal_url != '-':
|
||||||
|
# Shorten internal URL for display
|
||||||
|
internal_display = internal_url.replace('http://', '').replace('https://', '')
|
||||||
|
if len(internal_display) > 30:
|
||||||
|
internal_display = internal_display[:27] + '...'
|
||||||
|
internal_url = f"`{internal_display}`"
|
||||||
|
|
||||||
description = app['description'] if app['description'] else "-"
|
description = app['description'] if app['description'] else "-"
|
||||||
|
|
||||||
markdown.append(f"| {icon} | **{app['name']}** | {app['type']} | {url_link} | {app['group']} | {description} |")
|
markdown.append(f"| {icon} | **{app['name']}** | {app['type']} | {external_link} | {internal_url} | {app['group']} | {description} |")
|
||||||
|
|
||||||
markdown.append("")
|
markdown.append("")
|
||||||
|
|
||||||
|
@@ -99,13 +99,14 @@ output "applications_for_wiki" {
|
|||||||
value = {
|
value = {
|
||||||
proxy_apps = {
|
proxy_apps = {
|
||||||
for k, v in var.proxy_applications : k => {
|
for k, v in var.proxy_applications : k => {
|
||||||
name = v.name
|
name = v.name
|
||||||
type = "Proxy"
|
type = "Proxy"
|
||||||
url = v.external_host
|
url = v.external_host
|
||||||
group = v.group
|
internal_url = v.internal_host
|
||||||
description = v.meta_description
|
group = v.group
|
||||||
icon = v.meta_icon
|
description = v.meta_description
|
||||||
slug = v.slug
|
icon = v.meta_icon
|
||||||
|
slug = v.slug
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
oauth_apps = {
|
oauth_apps = {
|
||||||
|
Reference in New Issue
Block a user