-
Notifications
You must be signed in to change notification settings - Fork 4
/
CRDashboardKPIs.sopm
451 lines (410 loc) · 16.4 KB
/
CRDashboardKPIs.sopm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
<?xml version="1.0" encoding="utf-8" ?>
<otrs_package version="1.0">
<Name>CRDashboardKPIs</Name>
<Version>0.0.1</Version>
<Framework>3.3.x</Framework>
<Vendor>Carlos Rodriguez</Vendor>
<URL>http://https://github.com/carlosfrodriguez</URL>
<License>GNU AFFERO GENERAL PUBLIC LICENSE Version 3, November 2007</License>
<Description Lang="en">The CR Dashboard KPIs Package.</Description>
<Filelist>
<File Permission="644" Location="Kernel/Config/Files/CRDashboardKPIs.xml"/>
<File Permission="644" Location="Kernel/Modules/AdminCRKPI.pm"/>
<File Permission="644" Location="Kernel/Modules/AdminCRKPIGeneric.pm"/>
<File Permission="644" Location="Kernel/Output/HTML/DashboardCRKPI.pm"/>
<File Permission="644" Location="Kernel/Output/HTML/DashboardCRKPIGeneric.pm"/>
<File Permission="644" Location="Kernel/Output/HTML/Standard/AdminCRKPI.dtl"/>
<File Permission="644" Location="Kernel/Output/HTML/Standard/AdminCRKPIGeneric.dtl"/>
<File Permission="644" Location="Kernel/Output/HTML/Standard/AgentDashboardKPI.dtl"/>
<File Permission="644" Location="Kernel/System/CRKPI.pm"/>
<File Permission="644" Location="scripts/test/CRKPI.t"/>
<File Permission="644" Location="var/httpd/htdocs/js/Core.Agent.Admin.CRKPI.js"/>
<File Permission="644" Location="var/httpd/htdocs/js/Core.Agent.DashboardCRKPI.js"/>
<File Permission="644" Location="var/httpd/htdocs/js/thirdparty/codemirror.4.3/lib/codemirror.js"/>
<File Permission="644" Location="var/httpd/htdocs/js/thirdparty/codemirror.4.3/mode/sql/sql.js"/>
<File Permission="644" Location="var/httpd/htdocs/js/thirdparty/justGage.1.0.1/resources/js/justgage.1.0.1.js"/>
<File Permission="644" Location="var/httpd/htdocs/js/thirdparty/justGage.1.0.1/resources/js/justgage.1.0.1.min.js"/>
<File Permission="644" Location="var/httpd/htdocs/js/thirdparty/justGage.1.0.1/resources/js/raphael.2.1.0.min.js"/>
<File Permission="644" Location="var/httpd/htdocs/skins/Agent/default/css/Core.Agent.Admin.CRKPIGeneric.css"/>
<File Permission="644" Location="var/httpd/htdocs/skins/Agent/default/css/thirdparty/codemirror.4.3/lib/codemirror.css"/>
</Filelist>
<DatabaseInstall Type="post">
<TableCreate Name="cr_kpi">
<Column Name="id" Required="true" PrimaryKey="true" AutoIncrement="true" Type="INTEGER"/>
<Column Name="name" Required="true" Size="250" Type="VARCHAR"/>
<Column Name="comments" Required="false" Size="250" Type="VARCHAR"/>
<Column Name="object_type" Required="false" Size="250" Type="VARCHAR"/>
<Column Name="config" Required="false" Type="LONGBLOB"/>
<Column Name="min_value" Required="true" Type="INTEGER"/>
<Column Name="max_value" Required="true" Type="INTEGER"/>
<Column Name="valid_id" Required="true" Type="SMALLINT"/>
<Column Name="create_time" Required="true" Type="DATE"/>
<Column Name="create_by" Required="true" Type="INTEGER"/>
<Column Name="change_time" Required="true" Type="DATE"/>
<Column Name="change_by" Required="true" Type="INTEGER"/>
<Unique Name="cr_kpi_name">
<UniqueColumn Name="name"/>
</Unique>
<Index Name="cr_kpi_valid_id">
<IndexColumn Name="valid_id"/>
</Index>
<ForeignKey ForeignTable="valid">
<Reference Local="valid_id" Foreign="id"/>
</ForeignKey>
<ForeignKey ForeignTable="users">
<Reference Local="create_by" Foreign="id"/>
<Reference Local="change_by" Foreign="id"/>
</ForeignKey>
</TableCreate>
<TableCreate Name="cr_kpi_group">
<Column Name="group_id" Required="true" Type="INTEGER"/>
<Column Name="kpi_id" Required="true" Type="INTEGER"/>
<Index Name="cr_kpi_group_id">
<IndexColumn Name="kpi_id"/>
</Index>
<ForeignKey ForeignTable="cr_kpi">
<Reference Local="kpi_id" Foreign="id"/>
</ForeignKey>
<ForeignKey ForeignTable="groups">
<Reference Local="group_id" Foreign="id"/>
</ForeignKey>
</TableCreate>
</DatabaseInstall>
<DatabaseUninstall Type="pre">
<TableDrop Name="cr_kpi_group"/>
<TableDrop Name="cr_kpi"/>
</DatabaseUninstall>
<!--
<CodeInstall Type="post"><![CDATA[
# define function name
my $FunctionName = 'CodeInstall';
# create the package name
my $CodeModule = 'var::packagesetup::' . $Param{Structure}->{Name}->{Content};
# load the module
if ( $Self->{MainObject}->Require($CodeModule) ) {
# create new instance
my $CodeObject = $CodeModule->new( %{$Self} );
if ($CodeObject) {
# start method
if ( !$CodeObject->$FunctionName(%{$Self}) ) {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Could not call method $FunctionName() on $CodeModule.pm."
);
}
}
# error handling
else {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Could not call method new() on $CodeModule.pm."
);
}
}
]]></CodeInstall>
<CodeReinstall Type="post"><![CDATA[
# define function name
my $FunctionName = 'CodeReinstall';
# create the package name
my $CodeModule = 'var::packagesetup::' . $Param{Structure}->{Name}->{Content};
# load the module
if ( $Self->{MainObject}->Require($CodeModule) ) {
# create new instance
my $CodeObject = $CodeModule->new( %{$Self} );
if ($CodeObject) {
# start method
if ( !$CodeObject->$FunctionName(%{$Self}) ) {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Could not call method $FunctionName() on $CodeModule.pm."
);
}
}
# error handling
else {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Could not call method new() on $CodeModule.pm."
);
}
}
]]></CodeReinstall>
<CodeUpgrade Type="post"><![CDATA[
# define function name
my $FunctionName = 'CodeUpgrade';
# create the package name
my $CodeModule = 'var::packagesetup::' . $Param{Structure}->{Name}->{Content};
# The code module has just recently been copied to it's location in the file system.
# In a persistent Perl environment an old version of the module might still be loaded,
# as watchdogs like Apache2::Reload haven't had a chance to reload it.
# So we need to make sure that the new version is being loaded.
# Kernel::System::Main::Require() checks the relative file path, so we need to remove that from %INC.
# This is only needed in persistent Perl environment, but does no harm in a CGI environment.
my $CodeModulePath = $CodeModule;
$CodeModulePath =~ s/::/\//g;
$CodeModulePath .= '.pm';
delete $INC{$CodeModulePath};
# load the module
if ( $Self->{MainObject}->Require($CodeModule) ) {
# create new instance
my $CodeObject = $CodeModule->new( %{$Self} );
if ($CodeObject) {
# start method
if ( !$CodeObject->$FunctionName(%{$Self}) ) {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Could not call method $FunctionName() on $CodeModule.pm."
);
}
}
# error handling
else {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Could not call method new() on $CodeModule.pm."
);
}
}
]]></CodeUpgrade>
<CodeUpgrade Type="post" Version="1.0.25"><![CDATA[
# define function name
my $FunctionName = 'CodeUpgradeFromLowerThan_1_0_25';
# create the package name
my $CodeModule = 'var::packagesetup::' . $Param{Structure}->{Name}->{Content};
# load the module
if ( $Self->{MainObject}->Require($CodeModule) ) {
# create new instance
my $CodeObject = $CodeModule->new( %{$Self} );
if ($CodeObject) {
# start methode
if ( !$CodeObject->$FunctionName(%{$Self}) ) {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Could not call method $FunctionName() on $CodeModule.pm."
);
}
}
# error handling
else {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Could not call method new() on $CodeModule.pm."
);
}
}
]]></CodeUpgrade>
<CodeUninstall Type="pre"><![CDATA[
# define function name
my $FunctionName = 'CodeUninstall';
# create the package name
my $CodeModule = 'var::packagesetup::' . $Param{Structure}->{Name}->{Content};
# load the module
if ( $Self->{MainObject}->Require($CodeModule) ) {
# create new instance
my $CodeObject = $CodeModule->new( %{$Self} );
if ($CodeObject) {
# start methode
if ( !$CodeObject->$FunctionName(%{$Self}) ) {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Could not call method $FunctionName() on $CodeModule.pm.",
);
}
}
# error handling
else {
$Self->{LogObject}->Log(
Priority => 'error',
Message => "Could not call method new() on $CodeModule.pm.",
);
}
}
]]></CodeUninstall>
-->
<IntroInstall Type="pre" Title="Install Information" Lang="en"><![CDATA[
<br/>
<strong>WELCOME</strong>
<br/>
<br/>
You are about to install the package CRDahsboardKPIs.<br/>
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroInstall>
<IntroInstall Type="pre" Title="Installation Information" Lang="de"><![CDATA[
<br/>
<strong>WILLKOMMEN</strong>
<br/>
<br/>
Sie sind im Begriff das Paket CRDahsboardKPIs zu installieren.<br/>
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroInstall>
<IntroInstall Type="pre" Title="Install Information" Lang="es"><![CDATA[
<br/>
<strong>BIENVENIDO</strong>
<br/>
<br/>
Usted está a punto de instalar el paquete CRDahsboardKPIs.<br/>
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroInstall>
<IntroInstall Type="post" Title="Installation Information" Lang="en"><![CDATA[
<br/>
<strong>NOTICE</strong>
<br/>
<br/>
If this system is using mod_perl, please restart the web server after the installation is complete.
<br/>
<br/>
The use of custom themes could prevent the correct behavior of this package.
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroInstall>
<IntroInstall Type="post" Title="Installation Information" Lang="de"><![CDATA[
<br/>
<strong>HINWEIS</strong>
<br/>
<br/>
Wenn dieses System mod_perl verwendet, starten Sie den Web-Server neu, nachdem die Installation abgeschlossen ist.
<br/>
<br/>
Die Verwendung eines benutzerdefinierten Oberflächen-Schema kann das richtige Verhalten dieses Pakets verhindern.
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroInstall>
<IntroInstall Type="post" Title="Installation Information" Lang="es"><![CDATA[
<br/>
<strong>AVISO</strong>
<br/>
<br/>
Si este sistema utiliza mod_perl, por favor reinicie el servidor web, cuando la instalación halla concluido.<br/>
<br/>
<br/>
El uso de temas personalizados puede impedir el correcto funcionamiento de este paquete.
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroInstall>
<IntroUpgrade Type="pre" Title="Upgrade Information" Lang="en"><![CDATA[
<br/>
<strong>WELCOME</strong>
<br/>
<br/>
You are about to upgrade the package CRDahsboardKPIs.<br/>
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroUpgrade>
<IntroUpgrade Type="pre" Title="Upgrade Information" Lang="de"><![CDATA[
<br/>
<strong>WILLKOMMEN</strong>
<br/>
<br/>
Sie sind im Begriff das Paket CRDahsboardKPIs zu aktualisieren.<br/>
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroUpgrade>
<IntroUpgrade Type="pre" Title="Upgrade Information" Lang="es"><![CDATA[
<br/>
<strong>BIENVENIDO</strong>
<br/>
<br/>
Usted está apunto de actualizar el paquete CRDahsboardKPIs.<br/>
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroUpgrade>
<IntroUpgrade Type="post" Title="Upgrade Information" Lang="en"><![CDATA[
<br/>
<strong>NOTICE</strong>
<br/>
<br/>
If this system is using mod_perl, please restart the web server after the installation is complete.
<br/>
<br/>
The use of custom themes could prevent the correct behavior of this package.
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroUpgrade>
<IntroUpgrade Type="post" Title="Installation Information" Lang="de"><![CDATA[
<br/>
<strong>HINWEIS</strong>
<br/>
<br/>
Wenn dieses System mod_perl verwendet, starten Sie den Web-Server neu, nachdem die Installation abgeschlossen ist.
<br/>
<br/>
Die Verwendung eines benutzerdefinierten Oberflächen-Schema kann das richtige Verhalten dieses Pakets verhindern.
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroUpgrade>
<IntroUpgrade Type="post" Title="Upgrade Information" Lang="es"><![CDATA[
<br/>
<strong>AVISO</strong>
<br/>
<br/>
Si este sistema utiliza mod_perl, por favor reinicie el servidor web, cuando la instalación halla concluido.<br/>
<br/>
<br/>
El uso de temas personalizados puede impedir el correcto funcionamiento de este paquete.
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroUpgrade>
<IntroUninstall Type="pre" Title="Uninstallation Information" Lang="en"><![CDATA[
<br/>
<strong>ATTENTION</strong>
<br/>
<br/>
If you uninstall this package, all database tables that were created during installation will be deleted.
All data from these tables will be irrevocably lost!
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroUninstall>
<IntroUninstall Type="pre" Title="Uninstallation Information" Lang="de"><![CDATA[
<br/>
<strong>ACHTUNG</strong>
<br/>
<br/>
Bei der Deinstallation werden die von diesem Paket angelegten Datenbank-Tabellen gelöscht.
Alle darin enthaltenen Daten gehen unwiderruflich verloren!
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroUninstall>
<IntroUninstall Type="pre" Title="Uninstallation Information" Lang="es"><![CDATA[
<br/>
<strong>ATENCIÓN</strong>
<br/>
<br/>
Si usted desinstala este paquete, todas las tablas de la base de datos creadas durante la instalación serán borradas.
¡Todos los datos de esas tablas se perderán irrevocablemente!.
<br/>
<br/>
((enjoy))<br/>
<br/>
]]></IntroUninstall>
</otrs_package>