add status label

This commit is contained in:
Kaoru FUZITA 2015-12-01 13:43:03 +09:00
parent cc96836ba9
commit 0f413d664a
8 changed files with 57 additions and 15 deletions

View file

@ -1665,7 +1665,7 @@ public class FessLabels extends ActionMessages {
/** The key of the message: Active */
public static final String LABELS_scheduledjob_active = "{labels.scheduledjob_active}";
/** The key of the message: - */
/** The key of the message: Inactive */
public static final String LABELS_scheduledjob_nojob = "{labels.scheduledjob_nojob}";
/** The key of the message: Start now */
@ -1695,6 +1695,15 @@ public class FessLabels extends ActionMessages {
/** The key of the message: Status */
public static final String LABELS_joblog_jobStatus = "{labels.joblog_jobStatus}";
/** The key of the message: Ok */
public static final String LABELS_joblog_status_ok = "{labels.joblog_status_ok}";
/** The key of the message: Failed */
public static final String LABELS_joblog_status_fail = "{labels.joblog_status_fail}";
/** The key of the message: Running */
public static final String LABELS_joblog_status_running = "{labels.joblog_status_running}";
/** The key of the message: Create New */
public static final String LABELS_joblog_link_create = "{labels.joblog_link_create}";

View file

@ -553,7 +553,7 @@ labels.scheduledjob_jobLogging=Logging
labels.scheduledjob_crawler=Crawler Job
labels.scheduledjob_running=Running
labels.scheduledjob_active=Active
labels.scheduledjob_nojob=-
labels.scheduledjob_nojob=Inactive
labels.scheduledjob_button_start=Start now
labels.scheduledjob_button_stop=Stop
labels.scheduledjob_script_template=return container.getComponent("crawlJob").logLevel("info").execute(executor, [{0}] as String[],[{1}] as String[],[{2}] as String[], "");
@ -563,6 +563,9 @@ labels.joblog_configuration=Job Log
labels.joblog_endTime=End Time
labels.joblog_jobName=Name
labels.joblog_jobStatus=Status
labels.joblog_status_ok=Ok
labels.joblog_status_fail=Failed
labels.joblog_status_running=Running
labels.joblog_link_create=Create New
labels.joblog_link_delete=Delete
labels.joblog_link_details=Details

View file

@ -64,9 +64,11 @@
<td>${f:h(data.name)}</td>
<td class="text-center"><c:if
test="${data.available=='true'}">
<la:message key="labels.enabled" />
<span class="label label-primary"><la:message
key="labels.enabled" /></span>
</c:if> <c:if test="${data.available=='false'}">
<la:message key="labels.disabled" />
<span class="label label-default"><la:message
key="labels.disabled" /></span>
</c:if></td>
</tr>
</c:forEach>

View file

@ -66,9 +66,11 @@
<td>${f:h(data.name)}</td>
<td class="text-center"><c:if
test="${data.available=='true'}">
<la:message key="labels.enabled" />
<span class="label label-primary"><la:message
key="labels.enabled" /></span>
</c:if> <c:if test="${data.available=='false'}">
<la:message key="labels.disabled" />
<span class="label label-default"><la:message
key="labels.disabled" /></span>
</c:if></td>
</tr>
</c:forEach>

View file

@ -58,7 +58,8 @@
<thead>
<tr>
<th><la:message key="labels.joblog_jobName" /></th>
<th><la:message key="labels.joblog_jobStatus" /></th>
<th class="text-center"><la:message
key="labels.joblog_jobStatus" /></th>
<th><la:message key="labels.joblog_startTime" /></th>
<th><la:message key="labels.joblog_endTime" /></th>
</tr>
@ -68,7 +69,23 @@
<tr
data-href="${contextPath}/admin/joblog/details/4/${f:u(data.id)}">
<td>${f:h(data.jobName)}</td>
<td>${f:h(data.jobStatus)}</td>
<td class="text-center"><c:choose>
<c:when test="${data.jobStatus == 'ok'}">
<span class="label label-primary"><la:message
key="labels.joblog_status_ok" /></span>
</c:when>
<c:when test="${data.jobStatus == 'fail'}">
<span class="label label-danger"><la:message
key="labels.joblog_status_fail" /></span>
</c:when>
<c:when test="${data.jobStatus == 'running'}">
<span class="label label-danger"><la:message
key="labels.joblog_status_running" /></span>
</c:when>
<c:otherwise>
<span class="label label-default">${f:h(data.jobStatus)}</span>
</c:otherwise>
</c:choose></td>
<td><fmt:formatDate
value="${fe:date(data.startTime)}"
pattern="yyyy-MM-dd'T'HH:mm:ss" /></td>

View file

@ -52,7 +52,8 @@
<thead>
<tr>
<th><la:message key="labels.scheduledjob_name" /></th>
<th><la:message key="labels.scheduledjob_status" /></th>
<th class="text-center"><la:message
key="labels.scheduledjob_status" /></th>
<th><la:message key="labels.scheduledjob_target" /></th>
<th><la:message
key="labels.scheduledjob_cronExpression" /></th>
@ -64,14 +65,17 @@
<tr
data-href="${contextPath}/admin/scheduler/details/4/${f:u(data.id)}">
<td>${f:h(data.name)}</td>
<td><c:if test="${data.running}">
<la:message key="labels.scheduledjob_running" />
<td class="text-center"><c:if test="${data.running}">
<span class="label label-success"><la:message
key="labels.scheduledjob_running" /></span>
</c:if> <c:if test="${!data.running}">
<c:if test="${data.available}">
<la:message key="labels.scheduledjob_active" />
<span class="label label-primary"><la:message
key="labels.scheduledjob_active" /></span>
</c:if>
<c:if test="${!data.available}">
<la:message key="labels.scheduledjob_nojob" />
<span class="label label-default"><la:message
key="labels.scheduledjob_nojob" /></span>
</c:if>
</c:if></td>
<td>${f:h(data.target)}</td>

View file

@ -64,9 +64,10 @@
<td>${f:h(data.name)}</td>
<td class="text-center"><c:if
test="${data.available=='true'}">
<la:message key="labels.enabled" />
<span class="label label-primary"><la:message key="labels.enabled" /></span>
</c:if> <c:if test="${data.available=='false'}">
<la:message key="labels.disabled" />
<span class="label label-default"><la:message
key="labels.disabled" /></span>
</c:if></td>
</tr>
</c:forEach>

View file

@ -83,6 +83,10 @@ section.content table td {
overflow-wrap: break-word;
}
section.content table .label {
color: #fff;
}
textarea.systemInfoData {
height: 22em;
line-height: 1.5em;