Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Commit

Permalink
Rename node journal usage class to avoid conflict
Browse files Browse the repository at this point in the history
Refs #1083
  • Loading branch information
Edmundo Alvarez committed Mar 9, 2015
1 parent cefd4b2 commit b06b48e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions app/assets/javascripts/periodicals.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,12 @@ $(document).ready(function() {

// Node journal usage.
(function updateNodeJournalUsage() {
if ($(".node-journal-usage").length > 0) {
var nodeJournalInformation = $(".node-journal-information");
if (nodeJournalInformation.length > 0) {
var interval = 1000;
if (!assertUpdateEnabled(updateNodeJournalUsage)) return;

$(".node-journal-usage").each(function(i) {
nodeJournalInformation.each(function(i) {
var url = "/a/system/node/" + $(this).attr("data-node-id") + "/journal";

var thisJournal = $(this);
Expand All @@ -153,7 +154,7 @@ $(document).ready(function() {
},
complete: function() {
// Trigger next call of the whole function when we updated the last element.
if (i == $(".node-journal-usage").length-1) {
if (i == nodeJournalInformation.length-1) {
setTimeout(updateNodeJournalUsage, interval);
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/graylog2.less
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,7 @@ form.node-processing-change input {
width: 100%;
}

.node-journal-usage {
.node-journal-information {
display: inline;
}

Expand Down
2 changes: 1 addition & 1 deletion app/views/system/nodes/index.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ <h3>
</div>

@if(nodes.get(jvm.getNodeId).getJournalInfo.enabled) {
<div class="node-journal-usage" data-node-id="@jvm.getNodeId">
<div class="node-journal-information" data-node-id="@jvm.getNodeId">
There are
<strong><span class="journal-uncommitted">@nodes.get(jvm.getNodeId).getJournalInfo().uncommittedJournalEntries</span>
unprocessed messages</strong>
Expand Down

0 comments on commit b06b48e

Please sign in to comment.