Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Provide perfwatcher version number #27

Merged
merged 1 commit into from

2 participants

@ymettier
Owner

Hello,

Could perfwatcher provide its version number ?
For example in "About" menu.

Note : maybe you could add an "about perfwatcher" alert box with more info on perfwatcher, including the url perfwatcher.org, the author name, and the version number ?

Regards,
Yves

@ymettier ymettier was assigned
@feraudet feraudet merged commit abe4b30 into perfwatcher:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 28, 2013
  1. @ymettier
This page is out of date. Refresh to see the latest.
View
1  VERSION
@@ -0,0 +1 @@
+Git master branch
View
6 html/mainMenu.html
@@ -56,11 +56,7 @@
</li>
<li><a>About</a>
<ul>
- <li><a href="http://www.perfwatcher.org/" target="_new"><img src="img/perfwatcher_label.png" /></a></li>
- <li><a href="http://collectd.org/" target="_new"><img src="img/collectd.png" /></a></li>
- <li><a href="http://www.php.net/" target="_new"><img src="img/php.png" /></a></li>
- <li><a href="http://jquery.com/" target="_new"><img src="img/jquery.png" /></a></li>
- <li><a href="http://www.risacher.com/la-rache/index.php?z=2" target="_new"><img src="img/la-rache.png" /></a></li>
+ <li id="menu_about_box"><a>About...</a></li>
</ul>
</li>
<li><div class="ui-widget"><a>Search <input type="text" id="searchtext" /></a></div></li>
View
14 html/version.html
@@ -0,0 +1,14 @@
+<p><a href="http://www.perfwatcher.org/" target="_new"><img src="img/perfwatcher_label.png" /></a></p>
+
+<p>Version : @VERSION@<!-- Version is set in top VERSION file --></p>
+<p>Author : Cyril Feraudet</p>
+<p>Licence : GPL version 2.0</p>
+
+<p>Thanks to : </p>
+<p>
+<a href="http://collectd.org/" target="_new"><img src="img/collectd.png" /></a><br />
+<a href="http://www.php.net/" target="_new"><img src="img/php.png" /></a><br />
+<a href="http://jquery.com/" target="_new"><img src="img/jquery.png" /></a><br />
+<a href="http://www.risacher.com/la-rache/index.php?z=2" target="_new"><img src="img/la-rache.png" /></a>
+</p>
+
View
14 js/perfwatcher.functions.js
@@ -136,6 +136,7 @@ function hide_menu_for(node_type) {
$('li[id="menu_refresh_tree"]').show();
$('li[id="menu_refresh_status"]').show();
$('li[id="menu_refresh_node"]').show();
+ $('li[id="menu_about_box"]').show();
switch (node_type) {
case 'default':
break;
@@ -309,6 +310,19 @@ function confirmfor(optionsarg, func) {
return false;
}
+function perfwatcher_about_box() {
+ $('#modalwindow').jqxWindow({ height: 287, width: 262, title: 'About Perfwatcher', isModal: true, theme: theme }).show();
+ $('#modalwindowcontent').html('<p>About Perfwatcheur</p>');
+ $.ajax({
+ async : false, type: 'POST', url: "action.php?tpl=version",
+ complete : function (r) {
+ if(r.status) {
+ $('#modalwindowcontent').html(r.responseText);
+ }
+ }
+ });
+}
+
function isRightClick(event) {
var rightclick;
if (!event) var event = window.event;
View
3  js/perfwatcher.js
@@ -150,6 +150,9 @@ $(document).ready(function() {
case 'menu_refresh_status':
refresh_status();
break;
+ case 'menu_about_box':
+ perfwatcher_about_box();
+ break;
default:
console.log('Undefined stuff : '+ $(this).attr("id"));
break;
View
32 php/version.php
@@ -0,0 +1,32 @@
+<?php # vim: set filetype=php fdm=marker sw=4 ts=4 tw=78 et :
+/**
+ *
+ * PHP version 5
+ *
+ * LICENSE: This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @category Monitoring
+ * @author Yves Mettier <ymettier@free.fr>
+ * @copyright 2013 Yves Mettier
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @link http://www.perfwatcher.org/
+ */
+
+$html = file_get_contents("html/version.html");
+$version = file_get_contents("VERSION");
+if(!$version) {
+ $version = "(not found)";
+}
+
+print preg_replace("/@VERSION@/", $version, $html);
+
+?>
Something went wrong with that request. Please try again.