Skip to content

Commit

Permalink
LIHADOOP-14688 Adding a timestamp to Dr. Elephant search result page
Browse files Browse the repository at this point in the history
RB=578468

G=superfriends-reviewers
R=fli,jdintruf
A=fli
  • Loading branch information
Akshay Rai committed Oct 8, 2015
1 parent 1ca9c89 commit a8a9a52
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 6 deletions.
7 changes: 5 additions & 2 deletions app/views/compareresults.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ <h3 class="panel-title">@title</h3>
<a class="list-group-item [email protected]()"
href="@routes.Application.search()[email protected]">
<p class="list-group-item-heading">
<h4 class="list-group-item-heading">[@result.username][@result.jobType] @result.jobId</h4>
@result.jobName
<div class="left">
<h4 class="list-group-item-heading">[@result.username] [@result.jobType] @result.jobId</h4>
</div>
<div class="right">@(tags.formatDate(result.analysisTime))</div>
<div>@result.jobName</div>
</p>
<p>
@for(heuristicResult <- result.heuristicResults) {
Expand Down
8 changes: 7 additions & 1 deletion app/views/multijob.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ <h3 class="panel-title">@title</h3>
<div class="list-group">
@for(result <- results) {
<a class="list-group-item [email protected]()" href="@routes.Application.search()[email protected]">
<p class="list-group-item-heading"><h4 class="list-group-item-heading">[@result.username][@result.jobType] @result.jobId</h4>@result.jobName</p>
<p class="list-group-item-heading">
<div class="left">
<h4 class="list-group-item-heading">[@result.username] [@result.jobType] @result.jobId</h4>
</div>
<div class="right">@(tags.formatDate(result.analysisTime))</div>
<div>@result.jobName</div>
</p>
<p>
@for(heuristicResult <- result.heuristicResults) {
<span class="label [email protected]()">@heuristicResult.analysisName</span>
Expand Down
6 changes: 5 additions & 1 deletion app/views/relatedjob.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ <h3 class="panel-title">
@for(result <- jobs) { <a class="list-group-item [email protected]()"
href="@routes.Application.search()[email protected]">
<p class="list-group-item-heading">
<h4 class="list-group-item-heading">[@result.username][@result.jobType] @result.jobId</h4>@result.jobName
<div class="left">
<h4 class="list-group-item-heading">[@result.username] [@result.jobType] @result.jobId</h4>
</div>
<div class="right">@(tags.formatDate(result.analysisTime))</div>
<div>@result.jobName</div>
</p>
<p>
@for(heuristicResult <- result.heuristicResults) { <span
Expand Down
3 changes: 2 additions & 1 deletion app/views/singlejob.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
@if(result != null) {
<div class="panel-heading">
<p class="panel-title">
<h4>[@result.username] [@result.jobType] @result.jobId</h4>
<div class="left"><h4>[@result.username] [@result.jobType] @result.jobId</h4></div>
<div class="right">@(tags.formatDate(result.analysisTime))</div>
<div>@result.jobName</div>
<div>
<table class="list-group-item-text table-striped table-condensed">
Expand Down
26 changes: 26 additions & 0 deletions app/views/tags/formatDate.scala.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@*
* Copyright 2015 LinkedIn Corp.
*
* 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
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*@

@(time: Long)
@{
import java.sql.Timestamp
import java.text.DateFormat
import java.util.TimeZone

val ts = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.LONG, Locale.ENGLISH)
ts.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles"))
ts.format(new Timestamp(time))
}
5 changes: 4 additions & 1 deletion public/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ a.list-group-item-danger.active:focus {
}
.list-group-item-alternate:nth-child(even){
background-color: #f2f2f2;
}
}

.left{display:inline-block}
.right{display:inline-block; float:right}

0 comments on commit a8a9a52

Please sign in to comment.