From 0fa58716cc2ff3837eed1814db3f8d52cc9ae7fd Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Mon, 17 Mar 2025 23:15:20 -0400 Subject: [PATCH] move templates into subdir --- www/kojiweb/Makefile | 2 +- www/kojiweb/{includes => templates}/Makefile | 0 www/kojiweb/{ => templates}/activesession.html.j2 | 6 +++--- www/kojiweb/{ => templates}/api.html.j2 | 4 ++-- www/kojiweb/{ => templates}/archiveinfo.html.j2 | 6 +++--- www/kojiweb/{ => templates}/archivelist.html.j2 | 6 +++--- www/kojiweb/{ => templates}/buildinfo.html.j2 | 4 ++-- www/kojiweb/{ => templates}/buildrootinfo.html.j2 | 4 ++-- www/kojiweb/{ => templates}/buildrootinfo_cg.html.j2 | 4 ++-- www/kojiweb/{ => templates}/buildroots.html.j2 | 6 +++--- www/kojiweb/{ => templates}/builds.html.j2 | 6 +++--- www/kojiweb/{ => templates}/buildsbystatus.html.j2 | 4 ++-- www/kojiweb/{ => templates}/buildsbytarget.html.j2 | 6 +++--- www/kojiweb/{ => templates}/buildsbyuser.html.j2 | 6 +++--- www/kojiweb/{ => templates}/buildtargetedit.html.j2 | 4 ++-- www/kojiweb/{ => templates}/buildtargetinfo.html.j2 | 4 ++-- www/kojiweb/{ => templates}/buildtargets.html.j2 | 6 +++--- www/kojiweb/{ => templates}/channelinfo.html.j2 | 6 +++--- www/kojiweb/{ => templates}/clusterhealth.html.j2 | 4 ++-- www/kojiweb/{ => templates}/error.html.j2 | 4 ++-- www/kojiweb/{ => templates}/externalrepoinfo.html.j2 | 4 ++-- www/kojiweb/{ => templates}/fileinfo.html.j2 | 4 ++-- www/kojiweb/{includes => templates}/footer.html.j2 | 0 www/kojiweb/{includes => templates}/header.html.j2 | 0 www/kojiweb/{ => templates}/hostedit.html.j2 | 4 ++-- www/kojiweb/{ => templates}/hostinfo.html.j2 | 6 +++--- www/kojiweb/{ => templates}/hosts.html.j2 | 6 +++--- www/kojiweb/{ => templates}/index.html.j2 | 6 +++--- www/kojiweb/{includes => templates}/macros.html.j2 | 0 www/kojiweb/{ => templates}/notificationedit.html.j2 | 4 ++-- www/kojiweb/{ => templates}/packageinfo.html.j2 | 6 +++--- www/kojiweb/{ => templates}/packages.html.j2 | 6 +++--- www/kojiweb/{ => templates}/packagesbyuser.html.j2 | 6 +++--- www/kojiweb/{ => templates}/recentbuilds.html.j2 | 0 www/kojiweb/{ => templates}/repoinfo.html.j2 | 4 ++-- www/kojiweb/{ => templates}/reports.html.j2 | 4 ++-- www/kojiweb/{ => templates}/rpminfo.html.j2 | 6 +++--- www/kojiweb/{ => templates}/rpmlist.html.j2 | 6 +++--- www/kojiweb/{ => templates}/rpmsbyhost.html.j2 | 6 +++--- www/kojiweb/{ => templates}/search.html.j2 | 6 +++--- www/kojiweb/{ => templates}/tagedit.html.j2 | 4 ++-- www/kojiweb/{ => templates}/taginfo.html.j2 | 4 ++-- www/kojiweb/{ => templates}/taginfo_deleted.html.j2 | 4 ++-- www/kojiweb/{ => templates}/tagparent.html.j2 | 4 ++-- www/kojiweb/{ => templates}/tags.html.j2 | 6 +++--- www/kojiweb/{ => templates}/taskinfo.html.j2 | 4 ++-- www/kojiweb/{ => templates}/tasks.html.j2 | 6 +++--- www/kojiweb/{ => templates}/tasksbyhost.html.j2 | 6 +++--- www/kojiweb/{ => templates}/tasksbyuser.html.j2 | 6 +++--- www/kojiweb/{ => templates}/userinfo.html.j2 | 6 +++--- www/kojiweb/{ => templates}/users.html.j2 | 6 +++--- www/lib/kojiweb/util.py | 5 +---- 52 files changed, 117 insertions(+), 120 deletions(-) rename www/kojiweb/{includes => templates}/Makefile (100%) rename www/kojiweb/{ => templates}/activesession.html.j2 (92%) rename www/kojiweb/{ => templates}/api.html.j2 (93%) rename www/kojiweb/{ => templates}/archiveinfo.html.j2 (98%) rename www/kojiweb/{ => templates}/archivelist.html.j2 (97%) rename www/kojiweb/{ => templates}/buildinfo.html.j2 (99%) rename www/kojiweb/{ => templates}/buildrootinfo.html.j2 (97%) rename www/kojiweb/{ => templates}/buildrootinfo_cg.html.j2 (95%) rename www/kojiweb/{ => templates}/buildroots.html.j2 (97%) rename www/kojiweb/{ => templates}/builds.html.j2 (98%) rename www/kojiweb/{ => templates}/buildsbystatus.html.j2 (96%) rename www/kojiweb/{ => templates}/buildsbytarget.html.j2 (97%) rename www/kojiweb/{ => templates}/buildsbyuser.html.j2 (96%) rename www/kojiweb/{ => templates}/buildtargetedit.html.j2 (95%) rename www/kojiweb/{ => templates}/buildtargetinfo.html.j2 (91%) rename www/kojiweb/{ => templates}/buildtargets.html.j2 (96%) rename www/kojiweb/{ => templates}/channelinfo.html.j2 (93%) rename www/kojiweb/{ => templates}/clusterhealth.html.j2 (97%) rename www/kojiweb/{ => templates}/error.html.j2 (78%) rename www/kojiweb/{ => templates}/externalrepoinfo.html.j2 (90%) rename www/kojiweb/{ => templates}/fileinfo.html.j2 (96%) rename www/kojiweb/{includes => templates}/footer.html.j2 (100%) rename www/kojiweb/{includes => templates}/header.html.j2 (100%) rename www/kojiweb/{ => templates}/hostedit.html.j2 (95%) rename www/kojiweb/{ => templates}/hostinfo.html.j2 (95%) rename www/kojiweb/{ => templates}/hosts.html.j2 (98%) rename www/kojiweb/{ => templates}/index.html.j2 (98%) rename www/kojiweb/{includes => templates}/macros.html.j2 (100%) rename www/kojiweb/{ => templates}/notificationedit.html.j2 (96%) rename www/kojiweb/{ => templates}/packageinfo.html.j2 (98%) rename www/kojiweb/{ => templates}/packages.html.j2 (98%) rename www/kojiweb/{ => templates}/packagesbyuser.html.j2 (96%) rename www/kojiweb/{ => templates}/recentbuilds.html.j2 (100%) rename www/kojiweb/{ => templates}/repoinfo.html.j2 (92%) rename www/kojiweb/{ => templates}/reports.html.j2 (90%) rename www/kojiweb/{ => templates}/rpminfo.html.j2 (98%) rename www/kojiweb/{ => templates}/rpmlist.html.j2 (97%) rename www/kojiweb/{ => templates}/rpmsbyhost.html.j2 (97%) rename www/kojiweb/{ => templates}/search.html.j2 (97%) rename www/kojiweb/{ => templates}/tagedit.html.j2 (96%) rename www/kojiweb/{ => templates}/taginfo.html.j2 (98%) rename www/kojiweb/{ => templates}/taginfo_deleted.html.j2 (82%) rename www/kojiweb/{ => templates}/tagparent.html.j2 (96%) rename www/kojiweb/{ => templates}/tags.html.j2 (96%) rename www/kojiweb/{ => templates}/taskinfo.html.j2 (99%) rename www/kojiweb/{ => templates}/tasks.html.j2 (98%) rename www/kojiweb/{ => templates}/tasksbyhost.html.j2 (96%) rename www/kojiweb/{ => templates}/tasksbyuser.html.j2 (96%) rename www/kojiweb/{ => templates}/userinfo.html.j2 (97%) rename www/kojiweb/{ => templates}/users.html.j2 (96%) diff --git a/www/kojiweb/Makefile b/www/kojiweb/Makefile index 7ef61d9d..ec059375 100644 --- a/www/kojiweb/Makefile +++ b/www/kojiweb/Makefile @@ -1,4 +1,4 @@ -SUBDIRS = includes +SUBDIRS = templates SERVERDIR = /usr/share/koji-web/scripts FILES = $(wildcard *.py *.html.j2) diff --git a/www/kojiweb/includes/Makefile b/www/kojiweb/templates/Makefile similarity index 100% rename from www/kojiweb/includes/Makefile rename to www/kojiweb/templates/Makefile diff --git a/www/kojiweb/activesession.html.j2 b/www/kojiweb/templates/activesession.html.j2 similarity index 92% rename from www/kojiweb/activesession.html.j2 rename to www/kojiweb/templates/activesession.html.j2 index 2577228b..4b2a27b3 100644 --- a/www/kojiweb/activesession.html.j2 +++ b/www/kojiweb/templates/activesession.html.j2 @@ -1,5 +1,5 @@ -#include "includes/header.html.j2" -# from "includes/macros.html.j2" import rowToggle +#include "header.html.j2" +# from "macros.html.j2" import rowToggle #set _PASSTHROUGH = ['userID'] @@ -26,4 +26,4 @@ #endfor -#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/api.html.j2 b/www/kojiweb/templates/api.html.j2 similarity index 93% rename from www/kojiweb/api.html.j2 rename to www/kojiweb/templates/api.html.j2 index 7b995e5f..0e1f9ac6 100644 --- a/www/kojiweb/api.html.j2 +++ b/www/kojiweb/templates/api.html.j2 @@ -1,4 +1,4 @@ -#include "includes/header.html.j2" +#include "header.html.j2"

API reference (hub version: {{ koji_version }}, web version: {{ web_version }})

@@ -34,4 +34,4 @@ except koji.GenericError: #endfor -#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/archiveinfo.html.j2 b/www/kojiweb/templates/archiveinfo.html.j2 similarity index 98% rename from www/kojiweb/archiveinfo.html.j2 rename to www/kojiweb/templates/archiveinfo.html.j2 index 11a0e1b9..0908a0c6 100644 --- a/www/kojiweb/archiveinfo.html.j2 +++ b/www/kojiweb/templates/archiveinfo.html.j2 @@ -1,8 +1,8 @@ #set _PASSTHROUGH = ['archiveID', 'fileOrder', 'fileStart', 'buildrootOrder', 'buildrootStart'] -#include "includes/header.html.j2" -# from "includes/macros.html.j2" import rowToggle +#include "header.html.j2" +# from "macros.html.j2" import rowToggle

Information for archive {{ archive.filename }}

@@ -157,4 +157,4 @@ #endif
-#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/archivelist.html.j2 b/www/kojiweb/templates/archivelist.html.j2 similarity index 97% rename from www/kojiweb/archivelist.html.j2 rename to www/kojiweb/templates/archivelist.html.j2 index 79ce7829..99199245 100644 --- a/www/kojiweb/archivelist.html.j2 +++ b/www/kojiweb/templates/archivelist.html.j2 @@ -1,6 +1,6 @@ -#include "includes/header.html.j2" -# from "includes/macros.html.j2" import rowToggle +#include "header.html.j2" +# from "macros.html.j2" import rowToggle #macro getID() #if type == 'image' @@ -90,4 +90,4 @@ buildrootID={{ buildroot.id }} -#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/buildinfo.html.j2 b/www/kojiweb/templates/buildinfo.html.j2 similarity index 99% rename from www/kojiweb/buildinfo.html.j2 rename to www/kojiweb/templates/buildinfo.html.j2 index 88ad1ae7..f92fcc42 100644 --- a/www/kojiweb/buildinfo.html.j2 +++ b/www/kojiweb/templates/buildinfo.html.j2 @@ -1,5 +1,5 @@ -#include "includes/header.html.j2" +#include "header.html.j2" #set nvrpath = pathinfo.build(build)

Information for build {{ koji.buildLabel(build) }}

@@ -258,4 +258,4 @@ #endif -#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/buildrootinfo.html.j2 b/www/kojiweb/templates/buildrootinfo.html.j2 similarity index 97% rename from www/kojiweb/buildrootinfo.html.j2 rename to www/kojiweb/templates/buildrootinfo.html.j2 index 2c3fa3cb..3206ac6a 100644 --- a/www/kojiweb/buildrootinfo.html.j2 +++ b/www/kojiweb/templates/buildrootinfo.html.j2 @@ -1,5 +1,5 @@ -#include "includes/header.html.j2" +#include "header.html.j2"

Information for buildroot {{ util.brLabel(buildroot) }}

@@ -56,4 +56,4 @@ -#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/buildrootinfo_cg.html.j2 b/www/kojiweb/templates/buildrootinfo_cg.html.j2 similarity index 95% rename from www/kojiweb/buildrootinfo_cg.html.j2 rename to www/kojiweb/templates/buildrootinfo_cg.html.j2 index 2b487600..7b99e41f 100644 --- a/www/kojiweb/buildrootinfo_cg.html.j2 +++ b/www/kojiweb/templates/buildrootinfo_cg.html.j2 @@ -1,5 +1,5 @@ -#include "includes/header.html.j2" +#include "header.html.j2"

Information for external buildroot {{ util.brLabel(buildroot) }}

@@ -41,4 +41,4 @@ -#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/buildroots.html.j2 b/www/kojiweb/templates/buildroots.html.j2 similarity index 97% rename from www/kojiweb/buildroots.html.j2 rename to www/kojiweb/templates/buildroots.html.j2 index a8cf94cb..07595710 100644 --- a/www/kojiweb/buildroots.html.j2 +++ b/www/kojiweb/templates/buildroots.html.j2 @@ -1,8 +1,8 @@ #set _PASSTHROUGH = ['repoID', 'order', 'state'] -#include "includes/header.html.j2" -# from "includes/macros.html.j2" import rowToggle +#include "header.html.j2" +# from "macros.html.j2" import rowToggle

Buildroots in repo {{ repoID }}

@@ -93,4 +93,4 @@ -#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/builds.html.j2 b/www/kojiweb/templates/builds.html.j2 similarity index 98% rename from www/kojiweb/builds.html.j2 rename to www/kojiweb/templates/builds.html.j2 index 75828d94..9da7d086 100644 --- a/www/kojiweb/builds.html.j2 +++ b/www/kojiweb/templates/builds.html.j2 @@ -1,8 +1,8 @@ #set _PASSTHROUGH = ['userID', 'tagID', 'packageID', 'order', 'prefix', 'state', 'inherited', 'latest', 'type'] -#include "includes/header.html.j2" -# from "includes/macros.html.j2" import rowToggle +#include "header.html.j2" +# from "macros.html.j2" import rowToggle #macro getDescription() #if latest @@ -185,4 +185,4 @@ in tag {{ tag.name }} -#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/buildsbystatus.html.j2 b/www/kojiweb/templates/buildsbystatus.html.j2 similarity index 96% rename from www/kojiweb/buildsbystatus.html.j2 rename to www/kojiweb/templates/buildsbystatus.html.j2 index 6d2fb2ac..6908fa23 100644 --- a/www/kojiweb/buildsbystatus.html.j2 +++ b/www/kojiweb/templates/buildsbystatus.html.j2 @@ -8,7 +8,7 @@ #set numTotal = numSucceeded + numFailed + numCanceled -#include "includes/header.html.j2" +#include "header.html.j2"

Succeeded/Failed/Canceled Builds{{ ' in the last %i days' % days if days != -1 else '' }}

@@ -60,4 +60,4 @@
-#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/buildsbytarget.html.j2 b/www/kojiweb/templates/buildsbytarget.html.j2 similarity index 97% rename from www/kojiweb/buildsbytarget.html.j2 rename to www/kojiweb/templates/buildsbytarget.html.j2 index a0481081..69eb7466 100644 --- a/www/kojiweb/buildsbytarget.html.j2 +++ b/www/kojiweb/templates/buildsbytarget.html.j2 @@ -6,8 +6,8 @@ #endmacro -#include "includes/header.html.j2" -# from "includes/macros.html.j2" import rowToggle +#include "header.html.j2" +# from "macros.html.j2" import rowToggle

Builds by Target{{ ' in the last %i days' % days if days != -1 else '' }}

@@ -96,4 +96,4 @@
-#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/buildsbyuser.html.j2 b/www/kojiweb/templates/buildsbyuser.html.j2 similarity index 96% rename from www/kojiweb/buildsbyuser.html.j2 rename to www/kojiweb/templates/buildsbyuser.html.j2 index 83a2114d..1f50d036 100644 --- a/www/kojiweb/buildsbyuser.html.j2 +++ b/www/kojiweb/templates/buildsbyuser.html.j2 @@ -1,6 +1,6 @@ -#include "includes/header.html.j2" -# from "includes/macros.html.j2" import rowToggle +#include "header.html.j2" +# from "macros.html.j2" import rowToggle

Builds by User

@@ -70,4 +70,4 @@
-#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/buildtargetedit.html.j2 b/www/kojiweb/templates/buildtargetedit.html.j2 similarity index 95% rename from www/kojiweb/buildtargetedit.html.j2 rename to www/kojiweb/templates/buildtargetedit.html.j2 index b03a3655..b7957487 100644 --- a/www/kojiweb/buildtargetedit.html.j2 +++ b/www/kojiweb/templates/buildtargetedit.html.j2 @@ -1,5 +1,5 @@ -#include "includes/header.html.j2" +#include "header.html.j2" #if target

Edit target {{ target.name }}

@@ -59,4 +59,4 @@ -#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/buildtargetinfo.html.j2 b/www/kojiweb/templates/buildtargetinfo.html.j2 similarity index 91% rename from www/kojiweb/buildtargetinfo.html.j2 rename to www/kojiweb/templates/buildtargetinfo.html.j2 index 12119228..0c84e2b0 100644 --- a/www/kojiweb/buildtargetinfo.html.j2 +++ b/www/kojiweb/templates/buildtargetinfo.html.j2 @@ -1,4 +1,4 @@ -#include "includes/header.html.j2" +#include "header.html.j2"

Information for target {{ target.name }}

@@ -25,4 +25,4 @@ #endif -#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/buildtargets.html.j2 b/www/kojiweb/templates/buildtargets.html.j2 similarity index 96% rename from www/kojiweb/buildtargets.html.j2 rename to www/kojiweb/templates/buildtargets.html.j2 index 2afbdda1..fafae321 100644 --- a/www/kojiweb/buildtargets.html.j2 +++ b/www/kojiweb/templates/buildtargets.html.j2 @@ -1,6 +1,6 @@ -#include "includes/header.html.j2" -# from "includes/macros.html.j2" import rowToggle +#include "header.html.j2" +# from "macros.html.j2" import rowToggle

Build Targets

@@ -73,4 +73,4 @@ Create new Build Target #endif -#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/channelinfo.html.j2 b/www/kojiweb/templates/channelinfo.html.j2 similarity index 93% rename from www/kojiweb/channelinfo.html.j2 rename to www/kojiweb/templates/channelinfo.html.j2 index 4ae2a0c4..565482f0 100644 --- a/www/kojiweb/channelinfo.html.j2 +++ b/www/kojiweb/templates/channelinfo.html.j2 @@ -1,6 +1,6 @@ -#include "includes/header.html.j2" -# from "includes/macros.html.j2" import rowToggle +#include "header.html.j2" +# from "macros.html.j2" import rowToggle

Information for channel {{ channel.name }}

@@ -57,4 +57,4 @@
-#include "includes/footer.html.j2" +#include "footer.html.j2" diff --git a/www/kojiweb/clusterhealth.html.j2 b/www/kojiweb/templates/clusterhealth.html.j2 similarity index 97% rename from www/kojiweb/clusterhealth.html.j2 rename to www/kojiweb/templates/clusterhealth.html.j2 index 0fd6c20c..0676ad3e 100644 --- a/www/kojiweb/clusterhealth.html.j2 +++ b/www/kojiweb/templates/clusterhealth.html.j2 @@ -6,7 +6,7 @@ #endmacro -#include "includes/header.html.j2" +#include "header.html.j2"