Skip to content

Commit

Permalink
Update tree UI legend
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Rossi committed Dec 22, 2015
1 parent 8ea80c7 commit 13a0879
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 41 deletions.
41 changes: 18 additions & 23 deletions src/main/java/net/apachegui/web/GUIViewController.java
Original file line number Diff line number Diff line change
@@ -1,33 +1,15 @@
package net.apachegui.web;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import apache.conf.global.Utils;
import apache.conf.parser.File;
import net.apachegui.conf.ServerMime;
import net.apachegui.db.LogDataDao;
import net.apachegui.db.Timestamp;
import net.apachegui.db.UsersDao;
import net.apachegui.directives.Group;
import net.apachegui.directives.KeepAlive;
import net.apachegui.directives.KeepAliveTimeout;
import net.apachegui.directives.ListenBackLog;
import net.apachegui.directives.MaxKeepAliveRequests;
import net.apachegui.directives.ServerSignature;
import net.apachegui.directives.ServerTokens;
import net.apachegui.directives.Timeout;
import net.apachegui.directives.User;
import net.apachegui.directives.*;
import net.apachegui.global.Constants;
import net.apachegui.global.Utilities;
import net.apachegui.server.ServerInfo;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
Expand All @@ -36,8 +18,15 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import apache.conf.global.Utils;
import apache.conf.parser.File;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

@Controller
public class GUIViewController {
Expand Down Expand Up @@ -367,4 +356,10 @@ public String renderModulesViewJsp(Model model) throws Exception {
return "views/global_settings/Modules";
}

@RequestMapping(value = "/jsp/configuration_tree/{jspName}.jsp")
public String renderConfigurationTreeViewJsp(@PathVariable String jspName) {
return "views/configuration_tree/" + jspName;
}


}
17 changes: 2 additions & 15 deletions src/main/webapp/WEB-INF/jsp/views/VirtualHosts.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -224,21 +224,8 @@
<div class="centerPanel" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region: 'center', tabPosition: 'top'">

<div class="centerPanel" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'top', title:'Modify'">
<div class="tree_container" id="example_container">
<span class="example dijitFolderOpened"></span> = Enclosure <span class="example dijitLeaf"></span> = Directive
</div>

<div id="right_click_container">
<span id="rightClickTooltip" class="warningTooltip" onmouseover="dijit.Tooltip.defaultPosition=['below', 'above']"></span>
<div class="dijitHidden">
<div data-dojo-type="dijit.Tooltip" data-dojo-props="connectId:'rightClickTooltip'">
<div class="warningDialog">You may right click a line
below for various options. If you choose to add a Directive
or Enclosure then it will be added to the configuration file
after the line that has been right clicked.</div>
</div>
</div>
</div>

<jsp:include page="/jsp/configuration_tree/Legend.jsp" flush="true" />

<div id="select_host_container">
Host: <div id="select_host_box"></div>
Expand Down
21 changes: 21 additions & 0 deletions src/main/webapp/WEB-INF/jsp/views/configuration_tree/Legend.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<div class="configuration_tree_legend_container">
<div class="tree_container" id="example_container">
<span class="example dijitFolderOpened"></span> = Enclosure <span class="example dijitLeaf"></span> = Directive
</div>

<div id="right_click_container">
<span id="rightClickTooltip" class="warningTooltip" onmouseover="dijit.Tooltip.defaultPosition=['below', 'above']"></span>
<div class="dijitHidden">
<div data-dojo-type="dijit.Tooltip" data-dojo-props="connectId:'rightClickTooltip'">
<div class="warningDialog">You may right click a line
below for various options. If you choose to add a Directive
or Enclosure then it will be added to the configuration file
after the line that has been right clicked.</div>
</div>
</div>
</div>
</div>
21 changes: 18 additions & 3 deletions src/main/webapp/WEB-INF/jsp/views/global_settings/GlobalTree.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<jsp:include page="/jsp/ConfigurationTree.jsp" flush="true" />
<jsp:include page="/jsp/configuration_tree/Dialogs.jsp" flush="true" />

<div class="tree_container" id="global_tree_container">
<div class="centerPanel" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region: 'center', tabPosition: 'top'">

<div class="centerPanel" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'top'">

<jsp:include page="/jsp/configuration_tree/Legend.jsp" flush="true" />

</div>

<div class="centerPanel" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'" >

<div class="tree_container" id="global_tree_container">

</div>

</div>

</div>


</div>
9 changes: 9 additions & 0 deletions src/main/webapp/resources/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,14 @@ h1 {
height: 16px;
}

.configuration_tree_legend_container,
.configuration_tree_legend_container #example_container,
.configuration_tree_legend_container #right_click_container {
display: inline-block;
vertical-align: middle;
margin-right: 10px;
}

/* Control specific css */
#controlBody .running {
color: #00ff00;
Expand Down Expand Up @@ -481,6 +489,7 @@ body.editor #filename_container em {
margin-bottom: 35px;
}

#virtualHostsBody .configuration_tree_legend_container,
#virtualHostsBody #example_container,
#virtualHostsBody #select_host_container,
#virtualHostsBody #right_click_container {
Expand Down

0 comments on commit 13a0879

Please sign in to comment.