Skip to content

Instantly share code, notes, and snippets.

@simcen
Created October 19, 2016 12:35
Show Gist options
  • Save simcen/2bc98bcce54d0599f8d336868301273f to your computer and use it in GitHub Desktop.
Save simcen/2bc98bcce54d0599f8d336868301273f to your computer and use it in GitHub Desktop.
Broken pagination fix in Alert Manager for Splunk 6.5
From 77670a9230d7972ab7b15eff7284f1380fc87d08 Mon Sep 17 00:00:00 2001
From: Simon Balz <[email protected]>
Date: Wed, 19 Oct 2016 14:31:36 +0200
Subject: [PATCH] Fixed broken pagination in Splunk 6.5
---
src/appserver/static/incident_posture.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/appserver/static/incident_posture.js b/src/appserver/static/incident_posture.js
index 3a959ca..322c30b 100644
--- a/src/appserver/static/incident_posture.js
+++ b/src/appserver/static/incident_posture.js
@@ -305,12 +305,14 @@ require([
tableView.table.render();
});
-
+
var rendered = false;
incidentsOverViewTable.on("rendered", function(obj) {
- if(rendered == false) {
- rendered = true;
- obj.settings.set({ pageSize: settings.entry.content.get('incident_list_length') });
+ if (settings.entry.content.get('incident_list_length') != undefined) {
+ if(rendered == false) {
+ rendered = true;
+ obj.settings.set({ pageSize: settings.entry.content.get('incident_list_length') });
+ }
}
});
--
2.8.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment