[packages/cacti-plugin-npc] Fix for graph display

jajcus jajcus at pld-linux.org
Sat Nov 24 21:31:33 CET 2012


commit ad22bf1e94ce9f15e5ef4f6381923994e2f33cc9
Author: Jacek Konieczny <jajcus at jajcus.net>
Date:   Sat Nov 24 21:30:59 2012 +0100

    Fix for graph display
    
    From: http://forums.cacti.net/viewtopic.php?p=167272#p167272

 cacti-plugin-npc-graphs_url.patch | 18 ++++++++++++++++++
 cacti-plugin-npc.spec             |  2 ++
 2 files changed, 20 insertions(+)
---
diff --git a/cacti-plugin-npc.spec b/cacti-plugin-npc.spec
index 300773a..5979e7f 100644
--- a/cacti-plugin-npc.spec
+++ b/cacti-plugin-npc.spec
@@ -14,6 +14,7 @@ License:	GPL v3
 Group:		Applications/WWW
 #Source0:	http://downloads.sourceforge.net/gibtmirdas/npc-%{version}.tar.gz
 Source0:	npc-%{version}.tar.gz
+Patch0:		%{name}-graphs_url.patch
 # Source0-md5:	7b30302c544f10ed73cff406fda14499
 URL:		https://trac.assembla.com/npc/
 BuildRequires:	rpmbuild(macros) >= 1.553
@@ -58,6 +59,7 @@ mv %{plugin}/*.debug .
 mv %{plugin}/build.xml .
 mv %{plugin}/{README,LICENSE} .
 %undos -f php README
+%patch0 -p1
 
 # dev code, not needed for production functionality
 cd %{plugin}
diff --git a/cacti-plugin-npc-graphs_url.patch b/cacti-plugin-npc-graphs_url.patch
new file mode 100644
index 0000000..6569da5
--- /dev/null
+++ b/cacti-plugin-npc-graphs_url.patch
@@ -0,0 +1,18 @@
+diff -dur cacti-plugin-npc-2.0.4.orig/npc/controllers/layout.php cacti-plugin-npc-2.0.4/npc/controllers/layout.php
+--- cacti-plugin-npc-2.0.4.orig/npc/controllers/layout.php	2012-11-24 21:25:18.000000000 +0100
++++ cacti-plugin-npc-2.0.4/npc/controllers/layout.php	2012-11-24 21:26:15.649892901 +0100
+@@ -58,10 +58,10 @@
+             npc.params.npc_service_icons   = "<?php echo read_config_option('npc_service_icons'); ?>";
+ 
+             npc.params.cacti_path          = "<?php echo URL_PATH; ?>";
+-            var strLen = npc.params.cacti_path;
+-            if (npc.params.cacti_path.charAt(strLen-1) == '/') {
+-                npc.params.cacti_path = npc.params.cacti_path.slice(0,strLen-1);
+-            }
++            //var strLen = npc.params.cacti_path;
++            //if (npc.params.cacti_path.charAt(strLen-1) == '/') {
++            //    npc.params.cacti_path = npc.params.cacti_path.slice(0,strLen-1);
++            //}
+ 
+             <?php $state = unserialize(db_fetch_cell('SELECT settings FROM npc_settings WHERE user_id = ' . $_SESSION['sess_user_id'])); ?>
+             var ExtState = Ext.decode('<?php echo json_encode($state); ?>');
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cacti-plugin-npc.git/commitdiff/ad22bf1e94ce9f15e5ef4f6381923994e2f33cc9



More information about the pld-cvs-commit mailing list