Skip to content

Commit

Permalink
http(old): modernize color palette
Browse files Browse the repository at this point in the history
Motivation:
match dcache.org page colors

Modification:
pulled colors into css variables
synced colors across pages
fixed html generation

Result:
new look-and-feel

Acked-by: Lea Morschel
Target: master, 10.2
Require-book: no
Require-notes: yes
(cherry picked from commit 7e2040e)
Signed-off-by: Tigran Mkrtchyan <[email protected]>
  • Loading branch information
kofemann committed Oct 15, 2024
1 parent 53173e1 commit adbbd49
Show file tree
Hide file tree
Showing 11 changed files with 343 additions and 220 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ private void printMenu(PrintWriter pw, String sort, String grep) {
"Path", "path"
};
pw.println("<form name=\"input\" action=\"" + action + "\" method=\"get\">");
pw.println("<center><table border=0 cellspacing=2 width=\"95%\" bgcolor=\"" + tableColor
pw.println("<center><table width=\"95%\" bgcolor=\"" + tableColor
+ "\">");
pw.println(" <tr>");
pw.println(" <td align=center bgcolor=\"" + tableDataColor + "\">");
Expand Down Expand Up @@ -364,6 +364,7 @@ private void printMenu(PrintWriter pw, String sort, String grep) {

}

// FIXME: REMOVE!
private void printCssFile(PrintWriter pw, String filename) {
if (filename.equals("test.html")) {
//
Expand Down Expand Up @@ -394,6 +395,7 @@ private void printCssFile(PrintWriter pw, String filename) {
}
}

// FIXME: REMOVE!
private void printInternalCssFile(PrintWriter pw) {
pw.println("body { background-color:orange; }");
pw.println(
Expand Down Expand Up @@ -548,9 +550,14 @@ private void printConfigurationHeader(PrintWriter pw) {
pw.println("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + _cssFile + "\">");
pw.println("</head>");

pw.println("<body>");
pw.println("<div id='header'>");
pw.println("<div id='bird_small'>");
pw.println("<a href='/'><img src='/images/dCache-logo.svg'></a>");
pw.println("<br/>Birds Home</div>");
pw.println("<div id ='bird_large'><img src='/images/eagle-grey.gif'></div>");
pw.println("</div>");
pw.println("<div id=\"main\">");
pw.println("<body class=\"m-body\">");

}

private void printConfigurationPages(PrintWriter pw, String[] urlItems, HttpRequest request)
Expand Down Expand Up @@ -704,7 +711,7 @@ private void printParameterEntry(PrintWriter pw, Partition p) {
int column = 0;
int maxColumn = 2;

pw.println("<center><table width=\"90%\" cellspacing=4 cellpadding=4 bgcolor=yellow>");
pw.println("<center><table id=\"params\">");

pw.print("<tr>");
for (int l = 0; l < (maxColumn + 1); l++) {
Expand Down Expand Up @@ -991,18 +998,11 @@ private void showRestoreInfo(HTMLWriter html,
}

private void printPoolManagerHeader(PrintWriter pw, String title) {
pw.println("<table class=\"m-table\" border=0 cellpadding=10 cellspacing=0 width=\"90%\">");
pw.println("<tr><td align=center valign=center width=\"1%\">");
pw.println("<a href=\"/\"><img border=0 src=\"/images/eagleredtrans.gif\"></a>");
pw.println("<br><font color=red>Birds Home</font>");
pw.println("</td><td align=center>");
if (title != null) {
pw.println("<h1>" + title + "</h1>");
} else {
pw.println("<h1>Pool Manager Database V3</h1>");
}
pw.println("</td></tr></table>");

}

private void showDirectory(PrintWriter pw) {
Expand Down Expand Up @@ -1241,7 +1241,7 @@ private void queryPool(PrintWriter pw, String poolName)
boolean enabled = (Boolean) o[3];
boolean rdOnly = (Boolean) o[5];
long active = (Long) o[4];
pw.println("<table border=0 cellspacing=4 cellpadding=4>");
pw.println("<table id=\"pools\">");
pw.print("<tr><th align=right>Enabled : </th><td align=left>");
pw.print(enabled ? "Yes" : "No");
pw.println("</td></tr>");
Expand Down Expand Up @@ -1277,7 +1277,7 @@ private void queryUnit(PrintWriter pw, String unitName)
String type = o[1].toString();
Object[] groupList = (Object[]) o[2];

pw.println("<table border=0 cellspacing=4 cellpadding=4>");
pw.println("<table>");
pw.print("<tr><th align=right>Selection Unit : </th><td align=left>");
pw.print(unitName);
pw.println("</td></tr>");
Expand Down Expand Up @@ -1367,8 +1367,8 @@ private void queryLinkList(PrintWriter pw)
pw.print("<th class=\"s-table\">Read</th><th class=\"s-table\">Write</th>");
pw.print("<th class=\"s-table\">Cache</th><th class=\"s-table\">P2p</th>");
pw.println("</tr>");
int row = 0;

int row = 0;
for (LinkProperties lp : list) {
pw.println("<tr class=\"" + ROW_ODDNESS[row % ROW_ODDNESS.length] + "\">");
printLinkPropertyRow(pw, lp);
Expand Down Expand Up @@ -1528,7 +1528,7 @@ private void queryUnitGroup(PrintWriter pw, String groupName)
Object[] unitList = (Object[]) o[1];
Object[] linkList = (Object[]) o[2];

pw.println("<table border=0 cellspacing=4 cellpadding=4>");
pw.println("<table id=\"units\">");
pw.print("<tr><th align=right>Unit Group : </th><td align=left>");
pw.print(groupName);
pw.println("</td></tr>");
Expand Down Expand Up @@ -1560,7 +1560,7 @@ private void queryPoolGroup(PrintWriter pw, String groupName)
Object[] poolList = (Object[]) o[1];
Object[] linkList = (Object[]) o[2];

pw.println("<table border=0 cellspacing=4 cellpadding=4>");
pw.println("<table id=\"pgroup\">");
pw.print("<tr><th align=right>Pool Group : </th><td align=left>");
pw.print(groupName);
pw.println("</td></tr>");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void addHeader(String css, String title) {
println("<body>");
println("<div id='header'>");
println("<div id='bird_small'>");
println("<a href='/'><img src='/images/eagleredtrans.gif'></a>");
println("<a href='/'><img src='/images/dCache-logo.svg'></a>");
println("<br/>Birds Home</div>");
println("<div id='bird_large'><img src='/images/eagle-grey.gif'></div>");
println("</div>");
Expand Down
131 changes: 131 additions & 0 deletions skel/share/httpd/static/images/dCache-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed skel/share/httpd/static/images/eagleredtrans.gif
Binary file not shown.
Loading

0 comments on commit adbbd49

Please sign in to comment.