Skip to content

Commit

Permalink
Proxy friendly relative urls (linkedin#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeli authored and akshayrai committed May 11, 2018
1 parent 50a7409 commit 79f5442
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 32 deletions.
14 changes: 7 additions & 7 deletions app/views/main.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">Dr. Elephant</a>
<a class="navbar-brand" href="./">Dr. Elephant</a>
</div>

<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li@if(page == null || page.equals("dashboard")){ class="active"}><a href="/">Dashboard</a></li>
<li@if(page.equals("search")){ class="active"}><a href="/search">Search</a></li>
<li@if(page.equals("compare")){ class="active"}><a href="/compare">Compare</a></li>
<li@if(page.equals("flowhistory")){ class="active"}><a href="/flowhistory">Flow History</a></li>
<li@if(page.equals("jobhistory")){ class="active"}><a href="/jobhistory">Job History</a></li>
<li@if(page.equals("help")){ class="active"}><a href="/help">Help</a></li>
<li@if(page == null || page.equals("dashboard")){ class="active"}><a href="./">Dashboard</a></li>
<li@if(page.equals("search")){ class="active"}><a href="./search">Search</a></li>
<li@if(page.equals("compare")){ class="active"}><a href="./compare">Compare</a></li>
<li@if(page.equals("flowhistory")){ class="active"}><a href="./flowhistory">Flow History</a></li>
<li@if(page.equals("jobhistory")){ class="active"}><a href="./jobhistory">Job History</a></li>
<li@if(page.equals("help")){ class="active"}><a href="./help">Help</a></li>
</ul>
</div>

Expand Down
4 changes: 2 additions & 2 deletions app/views/results/flowHistoryResults.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h4><a href="@flowDefPair.getId()">Flow History</a></h4>
<th class="history-table-first-column">Flow Executions</th>
@for((jobDefPair, jobName) <- idPairToJobNameMap) {
<th>
<a href='/[email protected](jobDefPair.getId)&select-graph-type=heuristics' data-toggle='tooltip'
<a href='./[email protected](jobDefPair.getId)&select-graph-type=heuristics' data-toggle='tooltip'
title='@jobDefPair.getId'>Job @{jobDefIndex = jobDefIndex + 1; jobDefIndex}<br>
@if(jobName.length > 45) { @jobName.substring(0, 41)... } else { @jobName }
</a>
Expand All @@ -85,7 +85,7 @@ <h4><a href="@flowDefPair.getId()">Flow History</a></h4>
<td>
@if(jobMap.get(jobDefPair) != null) {
@for((result,jobCount) <- jobMap.get(jobDefPair).zipWithIndex) {
<a class="hasTooltip" href='/new#/[email protected]'
<a class="hasTooltip" href='./new#/[email protected]'
style='color: @getSeverityColor(result.severity);'>&#9673;
<!-- Table Tooltip Content -->
<div id="tooltip-div">
Expand Down
2 changes: 1 addition & 1 deletion app/views/results/flowMetricsHistoryResults.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ <h4><a href="@flowDefPair.getId()">Flow History</a></h4>
<th class="history-table-first-column">Flow Executions</th>
@for((jobDefPair, jobName) <- idPairToJobNameMap) {
<th class="history-table-metrics-column">
<a href='/[email protected](jobDefPair.getUrl)&select-graph-type=@graphType' data-toggle='tooltip'
<a href='./[email protected](jobDefPair.getUrl)&select-graph-type=@graphType' data-toggle='tooltip'
title='@jobDefPair.getUrl'>Job @{jobDefIndex = jobDefIndex + 1; jobDefIndex}<br>
@if(jobName.length > 45) { @jobName.substring(0, 41)... } else { @jobName }
</a>
Expand Down
8 changes: 4 additions & 4 deletions app/views/results/jobDetails.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,24 @@
@if(!result.jobDefId.isEmpty){
@if(result.jobType.equals("Spark")) {
<tr>
<td><a href="/[email protected](result.jobDefId)&select-graph-type=heuristics">
<td><a href="./[email protected](result.jobDefId)&select-graph-type=heuristics">
Job History</a></td>
</tr>
} else {
<tr>
<td><a href="/[email protected](result.jobDefId)&select-graph-type=resources">
<td><a href="./[email protected](result.jobDefId)&select-graph-type=resources">
Job History</a></td>
</tr>
}
}
@if(!result.jobDefId.isEmpty){
@if(result.jobType.equals("Spark")) {
<tr>
<td><a href="/[email protected](result.flowDefId)&select-graph-type=heuristics">Flow&nbsp;History</a></td>
<td><a href="./[email protected](result.flowDefId)&select-graph-type=heuristics">Flow&nbsp;History</a></td>
</tr>
} else {
<tr>
<td><a href="/[email protected](result.flowDefId)">Flow&nbsp;History</a></td>
<td><a href="./[email protected](result.flowDefId)">Flow&nbsp;History</a></td>
</tr>

}
Expand Down
2 changes: 1 addition & 1 deletion app/views/results/jobHistoryResults.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h4><a href="@jobDefPair.getId()">Job History</a></h4>
<td>
@if(i <= jobs.length) {
@for((appHeuristicResult, jobCount) <- jobs(i-1).yarnAppHeuristicResults.zipWithIndex) {
<a class="hasTooltip" href='/new#/[email protected]'
<a class="hasTooltip" href='./new#/[email protected]'
style='color: @getSeverityColor(appHeuristicResult.severity);'>&#9673;
<!-- Table Tooltip Content -->
<div id="tooltip-div">
Expand Down
2 changes: 1 addition & 1 deletion app/views/results/oldFlowHistoryResults.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<th style="width:200px">Flow Executions</th>
@for((jobDefPair, jobName) <- idPairToJobNameMap) {
<th>
<a href='/[email protected](jobDefPair.getId)&select-graph-type=heuristics' data-toggle='tooltip'
<a href='./[email protected](jobDefPair.getId)&select-graph-type=heuristics' data-toggle='tooltip'
title='@jobDefPair.getId'>Job @{jobDefIndex = jobDefIndex + 1; jobDefIndex}<br>
@if(jobName.length > 45) { @jobName.substring(0, 41)... } else { @jobName }
</a>
Expand Down
2 changes: 1 addition & 1 deletion app/views/results/oldFlowMetricsHistoryResults.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<th style="min-width:200px">Flow Executions</th>
@for((jobDefPair, jobName) <- idPairToJobNameMap) {
<th style="min-width : 380px ;padding:0px;">
<a href='/[email protected](jobDefPair.getUrl)&select-graph-type=@graphType' data-toggle='tooltip'
<a href='./[email protected](jobDefPair.getUrl)&select-graph-type=@graphType' data-toggle='tooltip'
title='@jobDefPair.getUrl'>Job @{jobDefIndex = jobDefIndex + 1; jobDefIndex}<br>
@if(jobName.length > 45) { @jobName.substring(0, 41)... } else { @jobName }
</a>
Expand Down
8 changes: 4 additions & 4 deletions app/views/tags/aggregatedMetrics.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
<p class="list-group-item-heading">
<table>
<tr>
<td class="metrics-dashboard hasTooltip" width="175px"><!--<a href="/jobhistory?job-def-id=@**@helper.urlEncode(result.jobDefId)&select-graph-type=resources">--><img src='@routes.Assets.at("images/usedmemory.png")' class="metrics-icons" alt='used resources'/><!--</a>--> @Utils.getResourceInGBHours(result.resourceUsed) <div id="tooltip-div">
<td class="metrics-dashboard hasTooltip" width="175px"><!--<a href="./jobhistory?job-def-id=@**@helper.urlEncode(result.jobDefId)&select-graph-type=resources">--><img src='@routes.Assets.at("images/usedmemory.png")' class="metrics-icons" alt='used resources'/><!--</a>--> @Utils.getResourceInGBHours(result.resourceUsed) <div id="tooltip-div">
<span> The resources used by the job in GB Hours</span>
</div></td>
<td class="metrics-dashboard hasTooltip" width="100px"><!--<a href="/jobhistory?job-def-id=@**@helper.urlEncode(result.jobDefId)&select-graph-type=resources">--><img src='@routes.Assets.at("images/wastedmemory.png")' class="metrics-icons" alt='wasted resources'/><!--</a>--> @(Utils.getPercentage(result.resourceWasted, result.resourceUsed)) <div id="tooltip-div">
<td class="metrics-dashboard hasTooltip" width="100px"><!--<a href="./jobhistory?job-def-id=@**@helper.urlEncode(result.jobDefId)&select-graph-type=resources">--><img src='@routes.Assets.at("images/wastedmemory.png")' class="metrics-icons" alt='wasted resources'/><!--</a>--> @(Utils.getPercentage(result.resourceWasted, result.resourceUsed)) <div id="tooltip-div">
<span> The percent of resources wasted</span>
</div></td>
<td class="metrics-dashboard hasTooltip" width="120px"><!--<a href="/jobhistory?job-def-id=@**@helper.urlEncode(result.jobDefId)&select-graph-type=time">--><img src='@routes.Assets.at("images/runtime.png")' class="metrics-icons" alt='total runtime'/><!--</a>--> @(Utils.getDurationBreakdown(result.finishTime - result.startTime)) <div id="tooltip-div">
<td class="metrics-dashboard hasTooltip" width="120px"><!--<a href="./jobhistory?job-def-id=@**@helper.urlEncode(result.jobDefId)&select-graph-type=time">--><img src='@routes.Assets.at("images/runtime.png")' class="metrics-icons" alt='total runtime'/><!--</a>--> @(Utils.getDurationBreakdown(result.finishTime - result.startTime)) <div id="tooltip-div">
<span> Total runtime of the job in HH:MM:SS</span>
</div></td>
@if(!result.jobType.equals("Spark")) {
<td class="metrics-dashboard hasTooltip" width="100px"><!--<a href="/jobhistory?job-def-id=@**@helper.urlEncode(result.jobDefId)&select-graph-type=time">--><img src='@routes.Assets.at("images/waittime.png")' class="metrics-icons" alt='total wait time'/><!--</a>--> @(Utils.getPercentage(result.totalDelay, result.finishTime - result.startTime)) <div id="tooltip-div">
<td class="metrics-dashboard hasTooltip" width="100px"><!--<a href="./jobhistory?job-def-id=@**@helper.urlEncode(result.jobDefId)&select-graph-type=time">--><img src='@routes.Assets.at("images/waittime.png")' class="metrics-icons" alt='total wait time'/><!--</a>--> @(Utils.getPercentage(result.totalDelay, result.finishTime - result.startTime)) <div id="tooltip-div">
<span> The percent of time job waited</span>
</div></td>
}
Expand Down
4 changes: 2 additions & 2 deletions app/views/tags/pagination.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}

@if(paginationStats.getCurrentPage() == 1) {
<li class="disabled"><a href="/" onclick="return false;">Previous</a></li>
<li class="disabled"><a href="./" onclick="return false;">Previous</a></li>
} else {
<li><a href="@route?@(searchQuery())page=@(paginationStats.getCurrentPage() - 1)">Previous</a></li>
}
Expand All @@ -50,7 +50,7 @@
}

@if(paginationStats.getCurrentPage() == paginationStats.getPaginationBarEndIndex()) {
<li class="disabled"><a href="/" onclick="return false;">Next</a></li>
<li class="disabled"><a href="./" onclick="return false;">Next</a></li>
} else {
<li><a href="@route?@(searchQuery())page=@(paginationStats.getCurrentPage() + 1)">Next</a></li>
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/tags/searchPanel.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<li><a id="job_search" class="search_opt" href="javascript:void(0)">Job</a></li>
<li><a id="application_search" class="search_opt" href="javascript:void(0)">Application</a></li>
<li class="divider"></li>
<li><a href="/new#/search">Advanced</a></li>
<li><a href="./new#/search">Advanced</a></li>
</ul>
</div>

Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import Dependencies._

name := "dr-elephant"

version := "2.0.13"
version := "2.1.7"

organization := "com.linkedin.drelephant"

Expand Down
4 changes: 2 additions & 2 deletions compile.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
hadoop_version=2.3.0
spark_version=1.4.0
hadoop_version=2.7.3
spark_version=1.6.2
play_opts="-Dsbt.repository.config=app-conf/resolver.conf"
4 changes: 2 additions & 2 deletions web/app/templates/app.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<table class="info borderless">
<tr>
<td><a class="btn"
href="/newflowhistory?flow-def-id={{urlEncode model.flowdefid}}&select-graph-type=heuristics"><span
href="./newflowhistory?flow-def-id={{urlEncode model.flowdefid}}&select-graph-type=heuristics"><span
class="glyphicon glyphicon-stats"></span> FlowHistory</a></td>
<td><a class="btn" href={{model.flowdefid}}><span class="glyphicon glyphicon-info-sign"></span> Flow
definition</a></td>
Expand All @@ -76,7 +76,7 @@
</tr>
<tr>
<td><a class="btn"
href="/newjobhistory?job-def-id={{urlEncode model.jobdefid}}&select-graph-type=heuristics"><span
href="./newjobhistory?job-def-id={{urlEncode model.jobdefid}}&select-graph-type=heuristics"><span
class="glyphicon glyphicon-stats"></span> JobHistory</a></td>
<td><a class="btn" href="{{model.jobdefid}}"><span class="glyphicon glyphicon-info-sign"></span> Job
definition</a></td>
Expand Down
4 changes: 2 additions & 2 deletions web/app/templates/job.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<table class="info borderless">
<tr>
<td><a id="job_flow_history" class="btn"
href="/newflowhistory?flow-def-id={{urlEncode model.flowdefid}}&select-graph-type=resources"><span
href="./newflowhistory?flow-def-id={{urlEncode model.flowdefid}}&select-graph-type=resources"><span
class="glyphicon glyphicon-stats"></span> FlowHistory</a></td>
<td><a id="job_flow_def_id" class="btn" href={{model.flowdefid}}><span
class="glyphicon glyphicon-info-sign"></span> Flow
Expand All @@ -69,7 +69,7 @@
</tr>
<tr>
<td><a id="job_job_history" class="btn"
href="/newjobhistory?job-def-id={{urlEncode model.jobdefid}}&select-graph-type=resources"><span
href="./newjobhistory?job-def-id={{urlEncode model.jobdefid}}&select-graph-type=resources"><span
class="glyphicon glyphicon-stats"></span> JobHistory</a></td>
<td><a id="job_job_def_id" class="btn" href="{{model.jobdefid}}"><span
class="glyphicon glyphicon-info-sign"></span> Job
Expand Down
2 changes: 1 addition & 1 deletion web/app/templates/workflow.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<tr>
<div class="menu-workflow">
<a class="btn"
href="/newflowhistory?flow-def-id={{urlEncode model.flowdefid}}&select-graph-type=resources"><span
href="./newflowhistory?flow-def-id={{urlEncode model.flowdefid}}&select-graph-type=resources"><span
class="glyphicon glyphicon-stats"></span> FlowHistory</a>
<a class="btn" href={{model.flowdefid}}><span class="glyphicon glyphicon-info-sign"></span> Flow
definition</a>
Expand Down

0 comments on commit 79f5442

Please sign in to comment.