blob: 18ace8e588906303b749ca781cee2646a7f8a563 [file] [log] [blame]
@*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one or more *
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. *
* The ASF licenses this file to You 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. *
*******************************************************************************@
@(serviceLogs: List[metadata.ServiceLog], userId: String, start: String, end: String, jsonData: String)
@import helper._
@scripts = {
<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.3/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var user = $('#user').text();
var start = $('#start').text();
var end = $('#end').text();
$("#user2").val(user);
$("#startTime2").val(start);
$("#endTime2").val(end);
if(jsonData!=null){
var jsonString = $('#jsonData').text();
var obj = JSON.parse(jsonString);
var data = "text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(obj));
$('<a href="data:' + data + '" download="data.json">download JSON</a>').appendTo('#download');
}
});
</script>
}
@main("Result Service Logs", scripts){
@flash_message()
<div id="download"></div>
<div id="user" style="display: none">@userId</div>
<div id="start" style="display: none">@start</div>
<div id="end" style="display: none">@end</div>
<div id="jsonData" style="display: none;">@jsonData</div>
@helper.form(routes.AccountController.getJsonData()) {
<div align="right">
<input type="hidden" id="user2" name="User Id"></input>
<input type="hidden" id="startTime2" name="Start Time"></input>
<input type="hidden" id="endTime2" name="End Time"></input>
<input id="workflow-gen" type="submit" class="btn btn-info text-right" value="Generate Workflow"></input>
</div>
}
<h1>@serviceLogs.size() Service Logs</h1>
<table class="table table-striped table-bordered table-condensed">
<tr>
<td>ServiceId</td>
<td>User</td>
<td>Purpose</td>
<td>StartTime</td>
<td>EndTime</td>
<td>ServiceConfigurationId</td>
</tr>
@for(serviceLog <- serviceLogs) {
<tr>
<td>@serviceLog.getServiceId</td>
<td>@serviceLog.getUserId</td>
<td>@serviceLog.getPurpose</td>
<td>@serviceLog.getExecutionStartTime</td>
<td>@serviceLog.getExecutionEndTime</td>
<td>
@form(routes.ClimateServiceController.getConfigurationByConfId()){
<input
name="serviceId" class="hidden" type="hidden"
value="@serviceLog.getServiceId">
<input
name="logId" class="hidden" type="hidden"
value="@serviceLog.getServiceConfigurationId">
<input
type="submit" class="btn btn-link" value="see detail">
}
</td>
</tr>
}
</table>
}