-
Notifications
You must be signed in to change notification settings - Fork 1
/
module.action-create-object.php
76 lines (67 loc) · 1.59 KB
/
module.action-create-object.php
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
<?php
// Git commit info
if (file_exists(dirname(__FILE__).'/.git/HEAD'))
{
$sDate = date("d.m.y G:i", filemtime(dirname(__FILE__).'/.git/index'));
$sHead = trim(preg_replace('/ref:/', '', file_get_contents(dirname(__FILE__).'/.git/HEAD'), -1, $iCount));
if ($iCount === 1)
{
$sCommit = '(commit '.file_get_contents(dirname(__FILE__).'/.git/'.$sHead, false, null, 0, 7).' from '.$sDate.')';
}
elseif ($iCount === 0)
{
$sCommit = '(commit '.substr($sHead, 0, 7).' from '.$sDate.')';
}
else
{
$sCommit = '(commit info not found)';
}
}
else
{
$sCommit = '';
}
//
// iTop module definition file
//
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'action-create-object/0.1.0',
array(
// Identification
//
'label' => "Create Object Action $sCommit",
'category' => 'business',
// Setup
//
'dependencies' => array(
'itop-config-mgmt/2.2.0'
),
'mandatory' => false,
'visible' => true,
// Components
//
'datamodel' => array(
'model.action-create-object.php',
'main.action-create-object.php',
),
'webservice' => array(
),
'data.struct' => array(
// add your 'structure' definition XML files here,
),
'data.sample' => array(
// add your sample data XML files here,
),
// Documentation
//
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
'doc.more_information' => '', // hyperlink to more information, if any
// Default settings
//
'settings' => array(
// Module specific settings go here, if any
),
)
);
?>