Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1.2 For #296. #299

Merged
merged 2 commits into from
May 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,6 @@
height: 20px;
background: #f4f5f7;
}
#modal-dialog-width{
width: 60%;
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ <h1>作业运行轨迹</h1>
</section>
</div>
</div>
<div id="show-failure-reason" class="modal" tabindex="-1" aria-hidden="true" >
<div class="modal-dialog" id="modal-dialog-width">
<div class="modal-content">
<div class="modal-body">
<div id="show-failure-reason-log"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn-xs btn-success" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
<script src="lib/bootstrap-table/bootstrap-table.min.js"></script>
<script src="lib/bootstrap-table/bootstrap-table-zh-CN.js"></script>
<script src="lib/daterangepicker/moment.min.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,32 @@ <h1>作业运行状态</h1>
</div>
<div class="form-group toolbar">
<label for="source">执行来源:</label>
<input type="text" class="form-control" id="source" placeholder="">
<select id="source" name="source" class="form-control" data-toggle="tooltip" data-placement="bottom" >
<option value="">全部</option>
<option value="CLOUD_SCHEDULER">CLOUD_SCHEDULER</option>
<option value="CLOUD_EXECUTOR">CLOUD_EXECUTOR</option>
</select>
</div>
<div class="form-group toolbar">
<label for="execution-type">执行类型:</label>
<input type="text" class="form-control" size="13" id="execution-type" placeholder="">
<label for="execution-type">任务来源:</label>
<select id="execution-type" name="jobExecutionType" class="form-control" data-toggle="tooltip" data-placement="bottom" >
<option value="">全部</option>
<option value="FAILOVER" >FAILOVER</option>
<option value="READY">READY</option>
</select>
</div>
<br/>
<div class="form-group toolbar">
<label for="state">状态:</label>
<input type="text" class="form-control" id="state" placeholder="">
<select id="state" name="state" class="form-control" data-toggle="tooltip" data-placement="bottom" >
<option value="">全部</option>
<option value="TASK_STAGING" >TASK_STAGING</option>
<option value="TASK_FAILED">TASK_FAILED</option>
<option value="TASK_FINISHED">TASK_FINISHED</option>
<option value="TASK_RUNNING">TASK_RUNNING</option>
<option value="TASK_ERROR">TASK_ERROR</option>
<option value="TASK_KILLED">TASK_KILLED</option>
</select>
</div>
<div class="form-group toolbar">
<label>创建时间:</label>
Expand Down Expand Up @@ -72,7 +88,7 @@ <h1>作业运行状态</h1>
<th data-field="executionType" data-sortable="true">任务来源</th>
<th data-field="state" data-sortable="true">状态</th>
<th data-field="creationTime" data-sortable="true" data-formatter="dateTimeFormatter">创建时间</th>
<th data-field="message" data-formatter="splitFormatter">备注</th>
<th data-field="message" data-formatter="splitRemarkFormatter">备注</th>
</tr>
</thead>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<section class="content-header">
<h1>作业状态</h1>
<ol class="breadcrumb">
<li class="active"><i class="fa fa-edit"></i> 作业</li>
<li class="active"><i class="fa fa-tasks"></i> 作业</li>
<li class="active">作业状态</li>
</ol>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<section class="content-header">
<h1>作业定义</h1>
<ol class="breadcrumb">
<li class="active"><i class="fa fa-edit"></i> 作业</li>
<li class="active"><i class="fa fa-tasks"></i> 作业</li>
<li class="active">作业定义</li>
</ol>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<body class="hold-transition skin-blue-light sidebar-mini">
<div class="wrapper">
<header class="main-header">
<a href="" class="logo">
<span class="logo-lg"><b>Elastic Job Cloud Console</b></span>
<a class="logo">
<span class="logo-lg">Elastic Job Cloud Console</span>
</a>
<nav class="navbar navbar-static-top" role="navigation">
<div id="navbar" class="navbar-custom-menu">
Expand All @@ -50,7 +50,7 @@
</li>
<li class="treeview" id="job">
<a href="#">
<i class="fa fa-edit">&nbsp;&nbsp;作业</i><i class="pull-right fa fa-angle-left"></i>
<i class="fa fa-tasks">&nbsp;&nbsp;作业</i><i class="pull-right fa fa-angle-left"></i>
<div class="pull-right">
<span id="job-nav-tag" class="label label-primary"></span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,3 @@ function dateTimeFormatter(value) {
}
return new Date(value).format("yyyy-MM-dd HH:mm:ss");
}

function splitFormatter(value) {
var maxLength = 50;
var replacement = "...";
if(null != value && value.length > maxLength) {
return "<div title ='" + value + "'>" + value.substring(0 , maxLength - replacement.length) + replacement + "</div>";
}
return value;
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,26 @@ function successFormatter(value) {
switch(value)
{
case true:
return "Y";
return "<span class='label label-success'>成功</span>";
case false:
return "N";
return "<span class='label label-danger'>失败</span>";
default:
return "N/A";
return "";
}
}

function splitFormatter(value) {
var maxLength = 50;
var replacement = "...";
if(null != value && value.length > maxLength) {
var vauleDetail = value.substring(0 , maxLength - replacement.length) + replacement;
return '<a href="javascript: void(0);" style="color:#FF0000;" onClick="showFailureReason(\'' + value.replace(/\n/g,"<br/>") + '\')">' + vauleDetail + '</a>';
}
return value;
}

function showFailureReason(value){
$("#show-failure-reason-log").html(value);
$("#show-failure-reason").modal("show");
$("#show-failure-reason").modal({backdrop: "static", keyboard: true});
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,13 @@ function queryParams(params) {
endTime: $("#end-time").val(),
};
}

function splitRemarkFormatter(value) {
var maxLength = 50;
var replacement = "...";
if(null != value && value.length > maxLength) {
return "<div title ='" + value + "'>" + value.substring(0 , maxLength - replacement.length) + replacement + "</div>";
}
return value;
}

Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@
height: 20px;
background: #f4f5f7;
}
#modal-dialog-width{
width: 60%;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ <h4>历史作业执行状态 </h4>
</div>
<div class="form-group toolbar">
<label for="state">状态:</label>
<input type="text" class="form-control" id="state" placeholder="">
<select id="state" name="state" class="form-control" data-toggle="tooltip" data-placement="bottom" >
<option value="">全部</option>
<option value="TASK_STAGING" >TASK_STAGING</option>
<option value="TASK_FAILED">TASK_FAILED</option>
<option value="TASK_FINISHED">TASK_FINISHED</option>
<option value="TASK_RUNNING">TASK_RUNNING</option>
<option value="TASK_ERROR">TASK_ERROR</option>
<option value="TASK_KILLED">TASK_KILLED</option>
</select>
</div>
<br/>
<div class="form-group toolbar">
Expand Down Expand Up @@ -50,7 +58,7 @@ <h4>历史作业执行状态 </h4>
<th data-field="shardingItems">分片</th>
<th data-field="state" data-sortable="true">状态</th>
<th data-field="creationTime" data-sortable="true" data-formatter="dateTimeFormatter">创建时间</th>
<th data-field="message" data-formatter="splitFormatter">备注</th>
<th data-field="message" data-formatter="splitRemarkFormatter">备注</th>
</tr>
</thead>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,5 +377,17 @@ <h4>确认要删除吗?</h4>
</div>
</div>
</div>
<div id="show-failure-reason" class="modal" tabindex="-1" aria-hidden="true" >
<div class="modal-dialog" id="modal-dialog-width">
<div class="modal-content">
<div class="modal-body">
<div id="show-failure-reason-log"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn-xs btn-success" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,25 @@ function successFormatter(value) {
switch(value)
{
case true:
return "Y";
case false:
return "N";
default:
return "N/A";
return "<span class='label label-success'>成功</span>";
case false:
return "<span class='label label-danger'>失败</span>";
default:
return "";
}
}

function splitFormatter(value) {
var maxLength = 50;
var replacement = "...";
if(null != value && value.length > maxLength) {
var vauleDetail = value.substring(0 , maxLength - replacement.length) + replacement;
return '<a href="javascript: void(0);" style="color:#FF0000;" onClick="showFailureReason(\'' + value.replace(/\n/g,"<br/>") + '\')">' + vauleDetail + '</a>';
}
return value;
}

function showFailureReason(value){
$("#show-failure-reason-log").html(value);
$("#show-failure-reason").modal("show");
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,12 @@ function queryParams(params) {
endTime: $("#end-time").val()
};
}

function splitRemarkFormatter(value) {
var maxLength = 50;
var replacement = "...";
if(null != value && value.length > maxLength) {
return "<div title ='" + value + "'>" + value.substring(0 , maxLength - replacement.length) + replacement + "</div>";
}
return value;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,3 @@ function dateTimeFormatter(value) {
}
return new Date(value).format("yyyy-MM-dd HH:mm:ss");
}

function splitFormatter(value) {
var maxLength = 50;
var replacement = "...";
if(null != value && value.length > maxLength) {
return "<div title ='" + value + "'>" + value.substring(0 , maxLength - replacement.length) + replacement + "</div>";
}
return value;
}