bkruse: trunk r801 - in /trunk: ./ config/ config/scripts/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Fri Apr 27 13:54:56 MST 2007


Author: bkruse
Date: Fri Apr 27 15:54:54 2007
New Revision: 801

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=801
Log:
[1] Fixed the makefile so that scripts now install into /var/lib/asterisk/scripts instead of /etc/asterisk/scripts [2] Put a global var in astman.js so that you can now reference that script directory no matter if it changes in the future or not [3] Added that proof of concept into config/graphs.html

Modified:
    trunk/Makefile
    trunk/config/graphs.html
    trunk/config/scripts/astman.js

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk-gui/trunk/Makefile?view=diff&rev=801&r1=800&r2=801
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Fri Apr 27 15:54:54 2007
@@ -204,19 +204,19 @@
 	@echo "Installing into $(HTTPDIR)"
 	mkdir -p $(CONFIGDIR)
 	mkdir -p $(CONFIGDIR)/images
-	mkdir -p $(CONFIGDIR)/scripts
 	mkdir -p $(CONFIGDIR)/stylesheets
 	mkdir -p $(CONFIGDIR)/bkps
 	mkdir -p $(CONFIGDIR)/setup
 	mkdir -p $(CONFIGDIR)/graphs
-	mkdir -p $(ASTETCDIR)/scripts
+	mkdir -p $(CONFIGDIR)/scripts
+	mkdir -p $(ASTVARLIBDIR)/scripts
 	@for x in gui_configs/*; do \
 		echo "$$x  -->  $(ASTETCDIR)" ; \
 		cp $$x $(ASTETCDIR)/ ; \
 	done
 	@for x in scripts/*; do \
-		echo "$$x  -->  $(ASTETCDIR)/scripts" ; \
-		cp $$x $(ASTETCDIR)/scripts ; \
+		echo "$$x  -->  $(ASTVARLIBDIR)/scripts" ; \
+		cp $$x $(ASTVARLIBDIR)/scripts ; \
 	done
 	@for x in config/images/*; do \
 		echo "$$x  -->  $(CONFIGDIR)/images/" ; \

Modified: trunk/config/graphs.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/graphs.html?view=diff&rev=801&r1=800&r2=801
==============================================================================
--- trunk/config/graphs.html (original)
+++ trunk/config/graphs.html Fri Apr 27 15:54:54 2007
@@ -32,7 +32,7 @@
 var divs_tohide = new Array('cpu_div');
 
 function update_graph(graph) {
-	var tmp_command = "sh /etc/asterisk/scripts/graphs.sh cpu > /var/lib/asterisk/static-http/config/graphs/data_cpu.html";
+	var tmp_command = "sh " + asterisk_scriptsFolder + "graphs.sh cpu > /var/lib/asterisk/static-http/config/graphs/data_cpu.html";
 	parent.astmanEngine.run_tool(tmp_command);
 	return true;
 	}

Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=801&r1=800&r2=801
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Fri Apr 27 15:54:54 2007
@@ -35,6 +35,7 @@
 var asterisk_guiConfigFile = "guipreferences.conf"; // will be created in asterisk_configfolder, if the file does not exist 
 var asterisk_configfolder = "/etc/asterisk/";
 var asterisk_guiListFiles = "sh /etc/asterisk/scripts/listfiles" ;
+var asterisk_scriptsFolder = "/var/lib/asterisk/scripts/" ; /* Directory for gui scripts (graphs.sh, for example) */
 
 var sortbynames = false;
 var dragdata = new Object;



More information about the asterisk-gui-commits mailing list