View | Details | Raw Unified | Return to bug 22894
Collapse All | Expand All

(-)debian/control (+21 lines)
Line 0    Link Here 
1
Source: univention-management-console-module-mrtg
2
Section: univention
3
Priority: optional
4
Maintainer: Univention GmbH <packages@univention.de>
5
Build-Depends: debhelper (>= 7.0.50~),
6
 python-support,
7
 univention-management-console-dev,
8
 python-all
9
Standards-Version: 3.5.2
10
XS-Python-Version: all
11
12
Package: univention-management-console-module-mrtg
13
Architecture: all
14
Depends: univention-management-console-server
15
Description: UMC module for system statistics
16
 This package contains the UMC module for the system statistics section
17
 .
18
 It is part of Univention Corporate Server (UCS), an
19
 integrated, directory driven solution for managing
20
 corporate environments. For more information about UCS,
21
 refer to: http://www.univention.de/
(-)debian/compat (+1 lines)
Line 0    Link Here 
1
7
(-)debian/changelog (+5 lines)
Line 0    Link Here 
1
univention-management-console-module-mrtg (1.0.0-1) unstable; urgency=low
2
3
  * Initial release (Bug #22848)
4
5
 -- Frank Greif <fg@it25.de>  Tue, 16 Aug 2011 09:40:22 +0200
(-)debian/copyright (+27 lines)
Line 0    Link Here 
1
Copyright 2011 Univention GmbH
2
3
http://www.univention.de/
4
5
All rights reserved.
6
7
The source code of the software contained in this package
8
as well as the source package itself are made available
9
under the terms of the GNU Affero General Public License version 3
10
(GNU AGPL V3) as published by the Free Software Foundation.
11
12
Binary versions of this package provided by Univention to you as
13
well as other copyrighted, protected or trademarked materials like
14
Logos, graphics, fonts, specific documentations and configurations,
15
cryptographic keys etc. are subject to a license agreement between
16
you and Univention and not subject to the GNU AGPL V3.
17
18
In the case you use the software under the terms of the GNU AGPL V3,
19
the program is provided in the hope that it will be useful,
20
but WITHOUT ANY WARRANTY; without even the implied warranty of
21
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
GNU Affero General Public License for more details.
23
24
You should have received a copy of the GNU Affero General Public
25
License with the Debian GNU/Linux or Univention distribution in file
26
/usr/share/common-licenses/AGPL-3; if not, see
27
<http://www.gnu.org/licenses/>.
(-)debian/rules (+42 lines)
Line 0    Link Here 
1
#!/usr/bin/make -f
2
#
3
# Mrtg
4
#  rules file for the debian package
5
#
6
# Copyright 2004-2011 Univention GmbH
7
#
8
# http://www.univention.de/
9
#
10
# All rights reserved.
11
#
12
# The source code of this program is made available
13
# under the terms of the GNU Affero General Public License version 3
14
# (GNU AGPL V3) as published by the Free Software Foundation.
15
#
16
# Binary versions of this program provided by Univention to you as
17
# well as other copyrighted, protected or trademarked materials like
18
# Logos, graphics, fonts, specific documentations and configurations,
19
# cryptographic keys etc. are subject to a license agreement between
20
# you and Univention and not subject to the GNU AGPL V3.
21
#
22
# In the case you use this program under the terms of the GNU AGPL V3,
23
# the program is provided in the hope that it will be useful,
24
# but WITHOUT ANY WARRANTY; without even the implied warranty of
25
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
# GNU Affero General Public License for more details.
27
#
28
# You should have received a copy of the GNU Affero General Public
29
# License with the Debian GNU/Linux or Univention distribution in file
30
# /usr/share/common-licenses/AGPL-3; if not, see
31
# <http://www.gnu.org/licenses/>.
32
33
%:
34
	dh $@
35
36
override_dh_auto_build:
37
	dh-umc-module-build
38
	dh_auto_build
39
40
override_dh_auto_install:
41
	dh-umc-module-install
42
	dh_auto_install
0
  + *
43
  + *
(-)debian/univention-management-console-module-mrtg.umc-modules (+7 lines)
Line 0    Link Here 
1
Module: mrtg
2
Python: umc/module
3
Definition: umc/mrtg.xml
4
Javascript: umc/js
5
Icons: umc/icons
6
Syntax: umc/syntax/mrtg.xml
7
(-)umc/module/mrtg/de.po (+14 lines)
Line 0    Link Here 
1
# This file is auto-generated by the dh-umc tools and should not be edited!
2
#, fuzzy
3
msgid ""
4
msgstr ""
5
"Project-Id-Version: univention-management-console-module-mrtg\n"
6
"Report-Msgid-Bugs-To: packages@univention.de\n"
7
"POT-Creation-Date: 2011-08-16 12:22+0200\n"
8
"PO-Revision-Date: 2011-08-18 09:15+0200\n"
9
"Last-Translator: Frank Greif <fg@it25.de>\n"
10
"Language-Team: LANGUAGE <LL@li.org>\n"
11
"Language: de\n"
12
"MIME-Version: 1.0\n"
13
"Content-Type: text/plain; charset=UTF-8\n"
14
"Content-Transfer-Encoding: 8bit\n"
(-)umc/module/mrtg/__init__.py (+49 lines)
Line 0    Link Here 
1
#!/usr/bin/python2.6
2
# -*- coding: utf-8 -*-
3
#
4
# Univention Management Console
5
#  module: system usage statistics
6
#
7
# Copyright 2011 Univention GmbH
8
#
9
# http://www.univention.de/
10
#
11
# All rights reserved.
12
#
13
# The source code of this program is made available
14
# under the terms of the GNU Affero General Public License version 3
15
# (GNU AGPL V3) as published by the Free Software Foundation.
16
#
17
# Binary versions of this program provided by Univention to you as
18
# well as other copyrighted, protected or trademarked materials like
19
# Logos, graphics, fonts, specific documentations and configurations,
20
# cryptographic keys etc. are subject to a license agreement between
21
# you and Univention and not subject to the GNU AGPL V3.
22
#
23
# In the case you use this program under the terms of the GNU AGPL V3,
24
# the program is provided in the hope that it will be useful,
25
# but WITHOUT ANY WARRANTY; without even the implied warranty of
26
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
# GNU Affero General Public License for more details.
28
#
29
# You should have received a copy of the GNU Affero General Public
30
# License with the Debian GNU/Linux or Univention distribution in file
31
# /usr/share/common-licenses/AGPL-3; if not, see
32
# <http://www.gnu.org/licenses/>.
33
34
import subprocess
35
import univention.info_tools as uit
36
import univention.management.console as umc
37
import univention.management.console.modules as umcm
38
39
from univention.management.console.log import MODULE
40
from univention.management.console.protocol.definitions import *
41
42
_ = umc.Translation('univention-management-console-modules-mrtg').translate
43
44
# Teststring zum Wiederfinden
45
46
class Instance(umcm.Base):
47
	def init(self):
48
		uit.set_language(str(self.locale))
49
(-)umc/de.po (+19 lines)
Line 0    Link Here 
1
# This file is auto-generated by the dh-umc tools and should not be edited!
2
msgid ""
3
msgstr ""
4
"Project-Id-Version: univention-management-console-module-mrtg\n"
5
"Report-Msgid-Bugs-To: packages@univention.de\n"
6
"POT-Creation-Date: Tue, 16 Aug 2011 12:22:50 +0200\n"
7
"PO-Revision-Date: Thu, 18 Aug 2011 09:15:00 +0200\n"
8
"Last-Translator: Frank Greif <fg@it25.de>\n"
9
"Language-Team: Univention GmbH <packages@univention.de>\n"
10
"Language: de\n"
11
"MIME-Version: 1.0\n"
12
"Content-Type: text/plain; charset=UTF-8\n"
13
"Content-Transfer-Encoding: 8bit\n"
14
15
msgid "Show system usage statistics"
16
msgstr "System-Statistiken anzeigen"
17
18
msgid "Statistics"
19
msgstr "Statistiken"
(-)umc/syntax/mrtg.xml (+5 lines)
Line 0    Link Here 
1
<?xml version="1.0" encoding="UTF-8"?>
2
<umc version="2.0">
3
  <definitions>
4
  </definitions>
5
</umc>
(-)umc/mrtg.xml (+13 lines)
Line 0    Link Here 
1
<?xml version="1.0" encoding="UTF-8"?>
2
<umc version="2.0">
3
  <module id="mrtg" icon="mrtg" version="1.0">
4
	<name>Statistics</name>
5
	<description>Show system usage statistics</description>
6
	<categories>
7
	  <category name="system"/>
8
	</categories>
9
	<!-- CAUTION: this is a dummy command that is not implemented -->
10
	<command name="mrtg/show" function="show">
11
	</command>
12
  </module>
13
</umc>
(-)umc/js/mrtg.js (+133 lines)
Line 0    Link Here 
1
/* global console MyError dojo dojox dijit umc */
2
3
dojo.provide("umc.modules.mrtg");
4
5
dojo.require("umc.i18n");
6
dojo.require("umc.widgets.ContainerWidget");
7
dojo.require("umc.widgets.Module");
8
dojo.require("umc.widgets.Page");
9
dojo.require("umc.widgets.Text");
10
dojo.require("umc.widgets.ExpandingTitlePane");
11
dojo.require("umc.widgets.ContainerForm");
12
dojo.require("umc.widgets.TabbedModule");
13
dojo.require("dojox.layout.TableContainer");
14
dojo.require("dojox.string.sprintf");
15
16
// Inheriting from umc.widgets.TabbedModule so any pages being added
17
// will become tabs automatically.
18
dojo.declare("umc.modules.mrtg", [ umc.widgets.TabbedModule, umc.i18n.Mixin ], {
19
20
	_page: null,
21
	_form: null,
22
	
23
	// TODO should be set in the base class -> then remove it here.
24
	nested: true,		// my tabs are 2nd level
25
26
	i18nClass: 'umc.modules.mrtg',
27
28
	buildRendering: function() {
29
		this.inherited(arguments);
30
		
31
		// key ...... the file name stub for all images on this tab
32
		// label .... the label of the tab itself
33
		// heading .. page heading of the tab contents
34
		// desc ..... help text (switchable)
35
		var page_setup = [
36
			{
37
				key:		"0load",
38
				label:		this._("Load"),
39
				heading:	this._("System load"),
40
				desc:		this._("System load in percent")
41
			},
42
			{
43
				key:		"1sessions",
44
				label:		this._("Sessions"),
45
				heading:	this._("Terminal server sessions"),
46
				desc:		this._("Number of active terminal server sessions")
47
			},
48
			{
49
				key:		"2mem",
50
				label:		this._("Memory"),
51
				heading:	this._("Memory usage"),
52
				desc:		this._("Utilization of system memory in percent")
53
			},
54
			{
55
				key:		"3swap",
56
				label:		this._("Swap"),
57
				heading:	this._("Swap space"),
58
				desc:		this._("Utilization of swap space in percent")
59
			}
60
		];
61
		
62
		// key ...... file name stub (2nd part) for the corresponding PNG image
63
		// label .... how to label this image
64
		var tab_setup = [
65
			{
66
				key:		"day",
67
				label:		this._("previous day")
68
			},
69
			{
70
				key:		"week",
71
				label:		this._("previous week")
72
			},
73
			{
74
				key:		"month",
75
				label:		this._("previous month")
76
			},
77
			{
78
				key:		"year",
79
				label:		this._("previous year")
80
			}
81
		];
82
83
		// Build tabs and attach them to page
84
		for (var idx=0; idx<page_setup.length; idx++)
85
		{
86
			var tab = new umc.widgets.Page({
87
				title:			page_setup[idx].label,
88
				headerText:		page_setup[idx].heading,
89
				helpText:		page_setup[idx].desc,
90
				closable:		false
91
				});
92
			this.addChild(tab);
93
94
			// Title pane without rollup/down
95
			var cont = new umc.widgets.ExpandingTitlePane({
96
				title:			this._("Statistics")
97
			});
98
			tab.addChild(cont);
99
			
100
			// ExpandingTitlePane doesn't honor 'scrollable'
101
			// but we might need it
102
			var scroll = new umc.widgets.ContainerWidget({
103
				scrollable:		true
104
			});
105
			cont.addChild(scroll);
106
			
107
			// three-column grid layout
108
			var grid = new dojox.layout.TableContainer({
109
				cols: 3
110
			});
111
			scroll.addChild(grid);
112
			for (var i=0; i<tab_setup.length; i++)
113
			{
114
				grid.addChild(new dijit.layout.ContentPane({
115
					content: 	dojox.string.sprintf(
116
									"<h1 style='white-space:nowrap;'>%s: %s<h1>",
117
									this._("Period"),
118
									tab_setup[i].label)
119
				}));
120
				grid.addChild(new dijit.layout.ContentPane({
121
					content:	dojox.string.sprintf(
122
									"<img src='/statistik/ucs_%s-%s.png'>",
123
									page_setup[idx].key,
124
									tab_setup[i].key)
125
				}));
126
				// third column used as spacer
127
				grid.addChild(new dijit.layout.ContentPane({
128
					content:	'&nbsp;'
129
				}));
130
			}
131
		}
132
	}	
133
});
(-)umc/js/de.po (+88 lines)
Line 0    Link Here 
1
# This file is auto-generated by the dh-umc tools and should not be edited!
2
#, fuzzy
3
msgid ""
4
msgstr ""
5
"Project-Id-Version: univention-management-console-module-mrtg\n"
6
"Report-Msgid-Bugs-To: packages@univention.de\n"
7
"POT-Creation-Date: 2011-08-18 08:39+0200\n"
8
"PO-Revision-Date: 2011-08-18 09:15+0200\n"
9
"Last-Translator: Frank Greif <fg@it25.de>\n"
10
"Language-Team: LANGUAGE <LL@li.org>\n"
11
"Language: de\n"
12
"MIME-Version: 1.0\n"
13
"Content-Type: text/plain; charset=UTF-8\n"
14
"Content-Transfer-Encoding: 8bit\n"
15
16
#: umc/js/mrtg.js:43
17
msgid "Load"
18
msgstr "Last"
19
20
#: umc/js/mrtg.js:55
21
msgid "Memory"
22
msgstr "Hauptspeicher"
23
24
#: umc/js/mrtg.js:56
25
msgid "Memory usage"
26
msgstr "Auslastung des Hauptspeichers"
27
28
#: umc/js/mrtg.js:51
29
msgid "Number of active terminal server sessions"
30
msgstr "Anzahl der aktiven Terminalserver Sitzungen"
31
32
#: umc/js/mrtg.js:120
33
msgid "Period"
34
msgstr "Zeitraum"
35
36
#: umc/js/mrtg.js:49
37
msgid "Sessions"
38
msgstr "Sitzungen"
39
40
#: umc/js/mrtg.js:99
41
msgid "Statistics"
42
msgstr "Statistiken"
43
44
#: umc/js/mrtg.js:61
45
msgid "Swap"
46
msgstr "Swap"
47
48
#: umc/js/mrtg.js:62
49
msgid "Swap space"
50
msgstr "Auslagerungsspeicher"
51
52
#: umc/js/mrtg.js:44
53
#, fuzzy
54
msgid "System load"
55
msgstr "Systemauslastung"
56
57
#: umc/js/mrtg.js:45
58
#, fuzzy
59
msgid "System load in percent"
60
msgstr "Systemauslastung in Prozent"
61
62
#: umc/js/mrtg.js:50
63
msgid "Terminal server sessions"
64
msgstr "Terminalserver Sitzungen"
65
66
#: umc/js/mrtg.js:63
67
msgid "Utilization of swap space in percent"
68
msgstr "Auslastung des Auslagerungsspeichers in Prozent"
69
70
#: umc/js/mrtg.js:57
71
msgid "Utilization of system memory in percent"
72
msgstr "Auslastung des Hauptspeichers in Prozent"
73
74
#: umc/js/mrtg.js:72
75
msgid "previous day"
76
msgstr "vergangener Tag"
77
78
#: umc/js/mrtg.js:80
79
msgid "previous month"
80
msgstr "vergangener Monat"
81
82
#: umc/js/mrtg.js:76
83
msgid "previous week"
84
msgstr "vergangene Woche"
85
86
#: umc/js/mrtg.js:84
87
msgid "previous year"
88
msgstr "vergangenes Jahr"
(-)35univention-management-console-module-mrtg.inst (+50 lines)
Line 0    Link Here 
1
#!/bin/sh
2
# -*- coding: utf-8 -*-
3
#
4
# Univention Management Console Module mrtg
5
#  join script
6
#
7
# Copyright 2011 Univention GmbH
8
#
9
# http://www.univention.de/
10
#
11
# All rights reserved.
12
#
13
# The source code of this program is made available
14
# under the terms of the GNU Affero General Public License version 3
15
# (GNU AGPL V3) as published by the Free Software Foundation.
16
#
17
# Binary versions of this program provided by Univention to you as
18
# well as other copyrighted, protected or trademarked materials like
19
# Logos, graphics, fonts, specific documentations and configurations,
20
# cryptographic keys etc. are subject to a license agreement between
21
# you and Univention and not subject to the GNU AGPL V3.
22
#
23
# In the case you use this program under the terms of the GNU AGPL V3,
24
# the program is provided in the hope that it will be useful,
25
# but WITHOUT ANY WARRANTY; without even the implied warranty of
26
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
# GNU Affero General Public License for more details.
28
#
29
# You should have received a copy of the GNU Affero General Public
30
# License with the Debian GNU/Linux or Univention distribution in file
31
# /usr/share/common-licenses/AGPL-3; if not, see
32
# <http://www.gnu.org/licenses/>.
33
34
VERSION=1
35
36
. /usr/share/univention-join/joinscripthelper.lib
37
. /usr/share/univention-lib/umc.sh
38
39
joinscript_init
40
41
umc_init
42
umc_operation_create "mrtg" "Mrtg" "mrtg/*"
43
umc_acl_create "mrtg-all" "Mrtg" "All operations" "mrtg/*"
44
umc_policy_append "default-admin" "mrtg-all"
45
46
joinscript_save_current_version
47
48
exit 0
49
50

Return to bug 22894