Skip to content

Commit

Permalink
#135: fixed UI issues (latest bootstrap)
Browse files Browse the repository at this point in the history
  • Loading branch information
ypujante committed Mar 20, 2013
1 parent 96d2f22 commit c308632
Show file tree
Hide file tree
Showing 56 changed files with 249 additions and 1,002 deletions.
Expand Up @@ -227,7 +227,7 @@ public class ConsoleTagLib
out << value.encodeAsHTML()
}
out << g.link(controller: 'agents', action: 'view', id: value) {
out << "<img class=\"shortcut\" src=\"${g.resource(dir: 'images', file: 'magnifier.png')}\" />"
out << '<i class="icon-search"> </i>'
}
}
}
Expand Down Expand Up @@ -826,7 +826,7 @@ public class ConsoleTagLib
{
out << '<li class="dropdown">'
if(fabric)
out << "<a href=\"#\" class=\"dropdown-toggle\">${fabric.encodeAsHTML()}</a>"
out << "<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">${fabric.encodeAsHTML()}<b class=\"caret\"></b></a>"
out << '<ul class="dropdown-menu">'
fabricNames.each { fabricName ->
out << "<li>"
Expand All @@ -847,7 +847,7 @@ public class ConsoleTagLib
* Renders the drop down in the subtab section under the dashboard tab
*/
def renderDashboardSelectDropdown = {
out << "<a href=\"#\" class=\"dropdown-toggle\">${request.userSession?.currentCustomDeltaDefinitionName?.encodeAsHTML()}</a>"
out << "<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">${request.userSession?.currentCustomDeltaDefinitionName?.encodeAsHTML()}<b class=\"caret\"></b></a>"
out << "<ul class=\"dropdown-menu\">"
out << "<li>"
out << g.link('class': 'btn', controller: 'dashboard', action: 'redelta', params: ['session.reset': true]) {
Expand Down Expand Up @@ -878,7 +878,7 @@ public class ConsoleTagLib
}

out << "<li>"
out << "<a class=\"btn\" data-controls-modal=\"saveAsNew\" data-backdrop=\"true\" data-keyboard=\"true\">Save as new</a>"
out << '<a href="#saveAsNew" role="button" class="btn" data-toggle="modal" data-backdrop="true" data-keyboard="true">Save as new</a>'
out << "</li>"
out << "</ul>"
}
Expand Down Expand Up @@ -934,12 +934,12 @@ public class ConsoleTagLib
}

out << '<li class="dropdown">'
out << "<a href=\"#\" class=\"dropdown-toggle\">"
out << "<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">"
if(selectedFilterDisplayName)
out << selectedFilterDisplayName.encodeAsHTML()
else
out << "All [${name}]"
out << "</a>"
out << "<b class=\"caret\"></b></a>"
out << '<ul class="dropdown-menu">'
dd.values().each { v ->
out << "<li>"
Expand Down
@@ -1,5 +1,5 @@
%{--
- Copyright (c) 2012 Yan Pujante
- Copyright (c) 2012-2013 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand All @@ -26,13 +26,7 @@
padding-bottom: 0.5em;
}
.progress {
height: 14px;
margin: 0;
padding: 0;
width: 100%;
display: inline-block;
background-image: url('${g.resource(dir: 'images', file: 'progress_24x12.gif')}');
background-repeat: repeat;
}
</style>
<g:render template="/commands/command_js"/>
Expand Down Expand Up @@ -79,7 +73,7 @@ function showHide()
</g:javascript>
</head>
<body onload="refresh();">
<ul class="tabs">
<ul class="nav nav-tabs">
<li><g:link controller="agents" action="list">List</g:link></li>
<li><g:link controller="commands" action="list">All Commands</g:link></li>
<li><g:link action="view" id="${params.id}">agent [${params.id}]</g:link></li>
Expand All @@ -89,12 +83,13 @@ function showHide()
</ul>
<div class="row">
<div class="span20">
<g:form class="form-stacked" id="${params.id}" action="executeCommand" method="post">
<g:form class="form-inline" id="${params.id}" action="executeCommand" method="post">
<fieldset>
<div class="clearfix">
<g:textField name="command" value="" class="xxlarge"/>
2&gt;&amp;1 <cl:checkBoxInitFromParams name="redirectStderr" checkedByDefault="${false}"/>
<g:actionSubmit class="btn primary" action="executeCommand" value="Execute"/>
<g:textField name="command" value="" class="input-xxlarge"/>
<label class="checkbox"><cl:checkBoxInitFromParams name="redirectStderr" checkedByDefault="${false}"/> 2&gt;&amp;1 </label>

<g:actionSubmit class="btn btn-primary" action="executeCommand" value="Execute"/>
</div>
</fieldset>
</g:form>
Expand Down
@@ -1,6 +1,6 @@
%{--
- Copyright (c) 2010-2010 LinkedIn, Inc
- Portions Copyright (c) 2011 Yan Pujante
- Portions Copyright (c) 2011-2013 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand All @@ -23,7 +23,7 @@
<link rel="stylesheet" href="${resource(dir:'css',file:'agents-list.css')}"/>
</head>
<body>
<ul class="tabs">
<ul class="nav nav-tabs">
<li><g:link controller="agents" action="list">List</g:link></li>
<cl:whenFeatureEnabled feature="commands"><li><g:link controller="commands" action="list">All Commands</g:link></li></cl:whenFeatureEnabled>
<li><g:link action="view" id="${params.id}">agent [${params.id}]</g:link></li>
Expand All @@ -33,7 +33,7 @@
<li class="active"><a href="#">Directory [${params.location.encodeAsHTML()}]</a></li>
</ul>
<g:if test="${dir != null}">
<table class="bordered-table tight-table">
<table class="table table-bordered tight-table">
<g:if test="${new File(params.location).parent}">
<tr>
<td><g:link action="fileContent" id="${params.id}" params="[location: new File(params.location).parent]">../</g:link></td>
Expand Down
@@ -1,5 +1,5 @@
%{--
- Copyright (c) 2011 Yan Pujante
- Copyright (c) 2011-2013 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand All @@ -21,11 +21,11 @@
<meta name="layout" content="main"/>
</head>
<body>
<ul class="tabs">
<ul class="nav nav-tabs">
<li class="active"><a href="#">List</a></li>
<cl:whenFeatureEnabled feature="commands"><li><g:link controller="commands" action="list">All Commands</g:link></li></cl:whenFeatureEnabled>
</ul>
<table class="bordered-table xtight-table">
<table class="table table-bordered xtight-table">
<thead>
<tr>
<th>Agent</th>
Expand Down
@@ -1,6 +1,6 @@
%{--
- Copyright (c) 2010-2010 LinkedIn, Inc
- Portions Copyright (c) 2011 Yan Pujante
- Portions Copyright (c) 2011-2013 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -38,7 +38,7 @@
<li>New Version: <g:textField name="version"/></li>
<li>Coordinates: <g:textField name="coordinates" size="100"/></li>
</ul>
<g:actionSubmit class="btn primary" action="upgrade" value="Upgrade"/>
<g:actionSubmit class="btn btn-primary" action="upgrade" value="Upgrade"/>
<g:each in="${versions.keySet().sort()}" var="version">
<h2>${version}</h2>
<p>Quick Select:
Expand All @@ -49,7 +49,7 @@
| <a href="#" onClick="quickSelect('agent_${version}', 'agentCheckbox', ${pct});return false;">${pct}%</a>
</g:each>
</p>
<table class="bordered-table condensed-table" id="agent_${version}">
<table class="table table-bordered condensed-table noFullWidth" id="agent_${version}">
<g:each in="${versions[version].agentName.sort()}" var="agentName">
<tr>
<td>${agentName}</td>
Expand All @@ -61,7 +61,7 @@
</g:form>
<h2 class="separator">Agent Cleanup Upgrade</h2>
<g:form method="post" controller="agents" action="upgrade">
<g:actionSubmit class="btn primary" action="cleanup" value="Cleanup"/>
<g:actionSubmit class="btn btn-primary" action="cleanup" value="Cleanup"/>
<span class="help">Cleanup all previously leftover upgrade</span>
</g:form>
</body>
Expand Down
@@ -1,5 +1,5 @@
%{--
- Copyright (c) 2011 Yan Pujante
- Copyright (c) 2011-2013 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -39,7 +39,7 @@
</head>
<body>
<g:if test="${agent}">
<ul class="tabs">
<ul class="nav nav-tabs">
<li><g:link controller="agents" action="list">List</g:link></li>
<cl:whenFeatureEnabled feature="commands"><li><g:link controller="commands" action="list">All Commands</g:link></li></cl:whenFeatureEnabled>
<li><g:link action="view" id="${params.id}">agent [${params.id}]</g:link></li>
Expand All @@ -50,7 +50,7 @@
<g:render template="/plan/selectPlan" model="[title: title, hasDelta: hasDelta]"/>
</g:if>
<g:else>
<ul class="tabs">
<ul class="nav nav-tabs">
<li><g:link controller="agents" action="list">List</g:link></li>
<li class="active"><a href="#">agent [${params.id}]</a></li>
</ul>
Expand Down
@@ -1,6 +1,6 @@
%{--
- Copyright (c) 2010-2010 LinkedIn, Inc
- Portions Copyright (c) 2011 Yan Pujante
- Portions Copyright (c) 2011-2013 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -28,7 +28,7 @@
</head>
<body>
<g:if test="${params.pid}">
<ul class="tabs">
<ul class="nav nav-tabs">
<li><g:link controller="agents" action="list">List</g:link></li>
<cl:whenFeatureEnabled feature="commands"><li><g:link controller="commands" action="list">All Commands</g:link></li></cl:whenFeatureEnabled>
<li><g:link action="view" id="${params.id}">agent [${params.id}]</g:link></li>
Expand All @@ -39,7 +39,7 @@
</ul>
<g:if test="${ps[params.pid]}">
<g:form action="kill" id="${params.id}" params="[pid: params.pid]">
<g:textField name="signal" value="3"/> <g:submitButton class="btn primary" name="kill" value="Send Signal"/>
<g:textField name="signal" value="3"/> <g:submitButton class="btn btn-primary" name="kill" value="Send Signal"/>
</g:form>
<cl:mapToUL map="${ps[params.pid]}" specialKeys="${['args']}" var="specialEntry">
<li>
Expand All @@ -57,15 +57,15 @@
</g:else>
</g:if>
<g:else>
<ul class="tabs">
<ul class="nav nav-tabs">
<li><g:link controller="agents" action="list">List</g:link></li>
<cl:whenFeatureEnabled feature="commands"><li><g:link controller="commands" action="list">All Commands</g:link></li></cl:whenFeatureEnabled>
<li><g:link action="view" id="${params.id}">agent [${params.id}]</g:link></li>
<li><g:link action="plans" id="${params.id}">Plans</g:link></li>
<cl:whenFeatureEnabled feature="commands"><li><g:link action="commands" id="${params.id}">Commands</g:link></li></cl:whenFeatureEnabled>
<li class="active"><a href="#">All Processes</a></li>
</ul>
<table class="bordered-table tight-table zebra-striped">
<table class="table table-bordered tight-table zebra-striped">
<tr>
<th>PID</th>
<th>COMMAND</th>
Expand Down
@@ -1,6 +1,6 @@
%{--
- Copyright (c) 2010-2010 LinkedIn, Inc
- Portions Copyright (c) 2011 Yan Pujante
- Portions Copyright (c) 2011-2013 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand All @@ -24,7 +24,7 @@
</head>
<body>
<g:if test="${model}">
<ul class="tabs">
<ul class="nav nav-tabs">
<li><g:link controller="agents" action="list">List</g:link></li>
<cl:whenFeatureEnabled feature="commands"><li><g:link controller="commands" action="list">All Commands</g:link></li></cl:whenFeatureEnabled>
<li class="active"><a href="#">agent [${model.agent.agentName}]</a></li>
Expand All @@ -33,7 +33,7 @@
<li><g:link action="ps" id="${model.agent.agentName}">All Processes</g:link></li>
</ul>
&nbsp;
<h1 class="${model.state}">${model.agent.agentName} (V${model.agent.version}) <cl:renderTags tags="${model.agent.tags}" linkable="${true}"/> </h1>
<h2 class="${model.state}">${model.agent.agentName} (V${model.agent.version}) <cl:renderTags tags="${model.agent.tags}" linkable="${true}"/> </h2>
<ul class="summary">
<li>Logs: <g:link action="tailLog" id="${model.agent.agentName}" params="[maxLine: 500]">main</g:link> |
<g:link action="tailLog" id="${model.agent.agentName}" params="[log:'gc.log', maxLine: 500]">gc</g:link><g:if test="${model.agent.agentProperties['glu.agent.logDir']}"> |
Expand All @@ -46,14 +46,14 @@
<g:link class="btn" action="sync" id="${model.agent.agentName}">ZooKeeper Sync</g:link></li>
</ul>
<div id="agent-details" class="hidden">
<cl:mapToTable class="bordered-table xtight-table noFullWidth" map="${model.agent.agentProperties.findAll { !it.key.startsWith('java.') }}"/>
<cl:mapToTable class="table table-bordered xtight-table noFullWidth" map="${model.agent.agentProperties.findAll { !it.key.startsWith('java.') }}"/>
</div>

<g:each in="${ConsoleUtils.sortBy(model.mountPoints.keySet(), 'path')}" var="key" status="idx">
<g:set var="mountPoint" value="${model.mountPoints[key]}"/>
<a name="${mountPoint.mountPoint}" id="${mountPoint.mountPoint}"></a>
<h2 class="${cl.mountPointState(mountPoint: mountPoint)}"><g:if test="${mountPoint.isCommand()}"><g:link action="commands" id="${model.agent.agentName}" params="[commandId: mountPoint.mountPoint.name]">${key.encodeAsHTML()}</g:link></g:if><g:else><cl:linkToFilteredDashboard systemFilter="mountPoint='${key}'" groupBy="mountPoint">${key.encodeAsHTML()}</cl:linkToFilteredDashboard></g:else> <cl:renderTags tags="${mountPoint.tags}" linkable="${true}"/>
</h2>
<h3 class="${cl.mountPointState(mountPoint: mountPoint)}"><g:if test="${mountPoint.isCommand()}"><g:link action="commands" id="${model.agent.agentName}" params="[commandId: mountPoint.mountPoint.name]">${key.encodeAsHTML()}</g:link></g:if><g:else><cl:linkToFilteredDashboard systemFilter="mountPoint='${key}'" groupBy="mountPoint">${key.encodeAsHTML()}</cl:linkToFilteredDashboard></g:else> <cl:renderTags tags="${mountPoint.tags}" linkable="${true}"/>
</h3>
<ul class="summary">
<cl:mountPointLogs agent="${model.agent.agentName}" mountPoint="${mountPoint}"/>
<li><a href="#" class="btn" onclick="toggleShowHide('#mountPoint-details-${idx}');return false;">View Details</a>
Expand Down Expand Up @@ -95,12 +95,12 @@
</g:each>
</g:if>
<g:else>
<ul class="tabs">
<ul class="nav nav-tabs">
<li><g:link controller="agents" action="list">List</g:link></li>
<li class="active"><a href="#">agent [${params.id}]</a></li>
<cl:whenFeatureEnabled feature="commands"><li><g:link action="commands" id="${params.id}">Commands</g:link></li></cl:whenFeatureEnabled>
</ul>
<h2>No such agent ${params.id} [<g:link controller="fabric" action="listAgentFabrics">Fix it</g:link>]</h2>
<h3>No such agent ${params.id} [<g:link controller="fabric" action="listAgentFabrics">Fix it</g:link>]</h3>
</g:else>
</body>
</html>
@@ -1,6 +1,6 @@
%{--
- Copyright (c) 2010-2010 LinkedIn, Inc
- Portions Copyright (c) 2011 Yan Pujante
- Portions Copyright (c) 2011-2013 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -40,7 +40,7 @@
<g:paginate total="${auditLogInstanceTotal}" max="100"/>
</div>
<div class="list">
<table class="bordered-table xtight-table">
<table class="table table-bordered xtight-table">
<thead>
<tr>

Expand Down
@@ -1,4 +1,4 @@
%{--
<!DOCTYPE html>%{--
- Copyright (c) 2010-2010 LinkedIn, Inc
- Portions Copyright (c) 2011-2013 Yan Pujante
-
Expand All @@ -13,12 +13,13 @@
- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- License for the specific language governing permissions and limitations under
- the License.
--}%<html>
--}%
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>GLU Console Login</title>
<link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon"/>
<link rel="stylesheet" href="${resource(dir:'css/twitter-bootstrap',file:'bootstrap.min.css')}"/>
<link rel="stylesheet" href="${resource(dir:'css',file:'bootstrap.min.css')}"/>
<link rel="stylesheet" href="${resource(dir:'css',file:'main-glu.css')}"/>
<style type="text/css">
body {
Expand All @@ -44,18 +45,18 @@
}
</style>
<g:javascript library="jquery" plugin="jquery"/>
<g:javascript src="twitter-bootstrap/bootstrap-alerts.js" />
<r:layoutResources/>
<g:javascript src="bootstrap.min.js" />
</head>
<body OnLoad="document.login.username.focus();">
<g:render template="/layouts/flash"/>
<div class="content">
<div class="form">
<div class="logo"><img src="${resource(dir: 'images', file: 'glu_480_white.png')}" alt="glu deployment automation platform"/></div>
<div class="logo"><img src="${resource(dir: 'images', file: 'glu_480_white.png')}" alt="glu deployment automation platform"/></div>
<h1>Console Login</h1>
<g:form action="signIn" name="login">
<input type="hidden" name="targetUri" value="${targetUri}" />
<table class="noFullWidth">
<table class="table noFullWidth">
<tbody>
<tr>
<th>Username:</th>
Expand All @@ -67,7 +68,7 @@
</tr>
<tr>
<td></td>
<td><input class="btn primary" type="submit" value="Sign in" /></td>
<td><input class="btn btn-primary" type="submit" value="Sign in" /></td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit c308632

Please sign in to comment.