1
2
3
4
5
6
7
8
9
10
11
12
13
14 from Globals import DTMLFile
15 from Globals import InitializeClass
16 from AccessControl import ClassSecurityInfo, Permissions
17 from Products.ZenModel.ZenossSecurity import *
18
19 from ZenModelRM import ZenModelRM
20 from Products.ZenRelations.RelSchema import *
21 from ZenPackable import ZenPackable
22
23
24 manage_addUserCommand = DTMLFile('dtml/addUserCommand',globals())
25
26
28
29 meta_type = 'UserCommand'
30
31 security = ClassSecurityInfo()
32
33 description = ""
34 command = ''
35
36 _properties = (
37 {'id':'description', 'type':'text', 'mode':'w'},
38 {'id':'command', 'type':'text', 'mode':'w'},
39 )
40
41 _relations = ZenPackable._relations + (
42 ("commandable", ToOne(
43 ToManyCont, 'Products.ZenModel.Commandable', 'userCommands')),
44 )
45
46
47
48 factory_type_information = (
49 {
50 'immediate_view' : 'userCommandDetail',
51 'actions' :
52 (
53 {'id' : 'overview',
54 'name' : 'User Command',
55 'action' : 'userCommandDetail',
56 'permissions' : ( Permissions.view, ),
57 },
58 { 'id' : 'viewHistory',
59 'name' : 'Modifications',
60 'action' : 'viewHistory',
61 'permissions' : (ZEN_VIEW_MODIFICATIONS,),
62 }
63 )
64 },
65 )
66
67 security.declareProtected('View', 'breadCrumbs')
69 """Return the breadcrumb links for this object
70 [('url','id'), ...]
71 """
72 crumbs = super(UserCommand, self).breadCrumbs(terminator)
73 return crumbs
74
75
76 InitializeClass(UserCommand)
77