edit-service.xhtml 9.19 KB
Newer Older
michael.simon's avatar
michael.simon committed
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:bw="http://www.scc.kit.edu/bwfacelets"
	xmlns:p="http://primefaces.org/ui">
<head>
<title></title>
</head>
<body>
<f:view>
	<f:metadata>
		<f:viewParam name="id" value="#{editServiceBean.id}"/>
		<f:event type="javax.faces.event.PreRenderViewEvent"
            listener="#{editServiceBean.preRenderView}" />
	</f:metadata>

<ui:composition template="/template/default-admin.xhtml">
	<ui:param name="title" value="#{messages.title}"/>

	<ui:define name="content">

	<h:form id="form">
		<h2><h:outputText value="#{messages.service}: #{editServiceBean.entity.name}"/></h2>
	
		<div id="panelInline">
			<p:panel header="#{messages.service}">
				<p:panelGrid id="baseData" columns="2">
		
			        <h:outputText value="#{messages.id}:"/>
			        <h:outputText value="#{editServiceBean.entity.id}"/>
			
			        <bw:inputText id="nameField" label="#{messages.name}" 
			        	value="#{editServiceBean.entity.name}" required="true"/>
				
			        <bw:inputText id="shortNameField" label="#{messages.short_name}" 
			        	value="#{editServiceBean.entity.shortName}" required="true"/>
				
41
42
43
44
45
46
47
48
			        <h:outputText value="#{messages.parent_service}:"/>
			        <h:selectOneMenu value="#{editServiceBean.selectedParentService}"
			        	converter="#{serviceConverter}">
			        	<f:selectItem itemLabel="Kein Parent Service" itemValue="#{null}"/>
		            	<f:selectItems value="#{editServiceBean.parentServiceList}" 
		            		var="service" itemLabel="#{service.name} (id #{service.id})" itemValue="#{service}"/>
		            </h:selectOneMenu>
				
michael.simon's avatar
michael.simon committed
49
50
51
52
53
54
			        <h:outputText value="#{messages.approver_role}:"/>
			        <h:selectOneMenu value="#{editServiceBean.selectedApproverRole}"
			        	converter="#{approverRoleConverter}">
			        	<f:selectItem itemLabel="Kein Approval" itemValue="#{null}"/>
		            	<f:selectItems value="#{editServiceBean.approverRoleList}" 
		            		var="role" itemLabel="#{role.name} (id #{role.id})" itemValue="#{role}"/>
55
56
57
58
59
60
61
62
		            </h:selectOneMenu>
				
			        <h:outputText value="#{messages.sshkey_approver_role}:"/>
			        <h:selectOneMenu value="#{editServiceBean.selectedSshPubKeyApproverRole}"
			        	converter="#{sshPubKeyApproverRoleConverter}">
			        	<f:selectItem itemLabel="Kein Approval" itemValue="#{null}"/>
		            	<f:selectItems value="#{editServiceBean.sshPubKeyApproverRoleList}" 
		            		var="role" itemLabel="#{role.name} (id #{role.id})" itemValue="#{role}"/>
michael.simon's avatar
michael.simon committed
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
		            </h:selectOneMenu>
				
			        <h:outputText value="#{messages.admin_role}:"/>
			        <h:selectOneMenu value="#{editServiceBean.selectedAdminRole}"
			        	converter="#{adminRoleConverter}">
			        	<f:selectItem itemLabel="Keine Adminrolle" itemValue="#{null}"/>
		            	<f:selectItems value="#{editServiceBean.adminRoleList}" 
		            		var="role" itemLabel="#{role.name} (id #{role.id})" itemValue="#{role}"/>
		            </h:selectOneMenu>
		
			        <h:outputText value="#{messages.hotline_role}:"/>
			        <h:selectOneMenu value="#{editServiceBean.selectedHotlineRole}"
			        	converter="#{hotlineRoleConverter}">
			        	<f:selectItem itemLabel="Keine Hotlinerolle" itemValue="#{null}"/>
		            	<f:selectItems value="#{editServiceBean.hotlineRoleList}" 
		            		var="role" itemLabel="#{role.name} (id #{role.id})" itemValue="#{role}"/>
		            </h:selectOneMenu>
		
			        <h:outputText value="#{messages.group_admin_role}:"/>
			        <h:selectOneMenu value="#{editServiceBean.selectedGroupAdminRole}"
			        	converter="#{groupAdminRoleConverter}">
			        	<f:selectItem itemLabel="Keine Gruppenrolle" itemValue="#{null}"/>
		            	<f:selectItems value="#{editServiceBean.groupAdminRoleList}" 
		            		var="role" itemLabel="#{role.name} (id #{role.id})" itemValue="#{role}"/>
		            </h:selectOneMenu>
		
			        <bw:inputText id="registerBeanField" label="#{messages.register_bean}"
			        	value="#{editServiceBean.entity.registerBean}" required="true" >
			        </bw:inputText>

			        <h:outputText value="#{messages.access_rule}:"/>
			        <h:selectOneMenu value="#{editServiceBean.selectedRule}"
			        	converter="#{businessRuleConverter}">
96
			        	<f:selectItem itemLabel="Keine Regel (offener Zugang)" itemValue="#{null}"/>
michael.simon's avatar
michael.simon committed
97
98
99
100
101
102
103
		            	<f:selectItems value="#{editServiceBean.ruleList}" 
		            		var="rule" itemLabel="#{rule.name} (id #{rule.id})" itemValue="#{rule}"/>
		            </h:selectOneMenu>
					
			        <h:outputText value="#{messages.group_filter_rule}:"/>
			        <h:selectOneMenu value="#{editServiceBean.selectedRulePackage}"
			        	converter="#{businessRulePackageConverter}">
104
			        	<f:selectItem itemLabel="Keine Filter (alle Gruppen)" itemValue="#{null}"/>
michael.simon's avatar
michael.simon committed
105
106
107
108
109
110
111
		            	<f:selectItems value="#{editServiceBean.rulePackageList}" 
		            		var="rp" itemLabel="#{rp.knowledgeBaseName} (#{rp.packageName})" itemValue="#{rp}"/>
		            </h:selectOneMenu>
					
			        <h:outputText value="#{messages.mandatory_values_rule}:"/>
			        <h:selectOneMenu value="#{editServiceBean.selectedMandatoryValuesRulePackage}"
			        	converter="#{businessRulePackageConverter}">
112
			        	<f:selectItem itemLabel="Keine Pflichtwerte" itemValue="#{null}"/>
michael.simon's avatar
michael.simon committed
113
114
115
		            	<f:selectItems value="#{editServiceBean.rulePackageList}" 
		            		var="rp" itemLabel="#{rp.knowledgeBaseName} (#{rp.packageName})" itemValue="#{rp}"/>
		            </h:selectOneMenu>
116

michael.simon's avatar
michael.simon committed
117
118
119
120
121
122
123
124
			        <h:outputText value="#{messages.image}:"/>
			        <h:selectOneMenu value="#{editServiceBean.selectedImage}"
			        	converter="#{imageConverter}">
			        	<f:selectItem itemLabel="Kein Bild" itemValue="#{null}"/>
		            	<f:selectItems value="#{editServiceBean.imageList}" 
		            		var="img" itemLabel="#{img.name} (id #{img.id})" itemValue="#{img}"/>
		            </h:selectOneMenu>
					
125
126
127
128
129
					<h:outputText value="#{messages.ssh_pub_key_capable}" />
					<p:selectBooleanButton id="sshPubKeyField" 
							onLabel="#{messages.yes}" offLabel="#{messages.no}" 
							value="#{editServiceBean.entity.sshPubKeyCapable}"/>
			        
michael.simon's avatar
michael.simon committed
130
131
132
133
134
					<h:outputText value="#{messages.published}" />
					<p:selectBooleanButton id="pubField" 
							onLabel="#{messages.yes}" offLabel="#{messages.no}" 
							value="#{editServiceBean.entity.published}"/>
			        
135
136
137
138
139
					<h:outputText value="#{messages.hidden}" />
					<p:selectBooleanButton id="hiddenField" 
							onLabel="#{messages.yes}" offLabel="#{messages.no}" 
							value="#{editServiceBean.entity.hidden}"/>
			        
michael.simon's avatar
michael.simon committed
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
			        <h:outputText value="#{messages.properties}:"/>
					<p:dataTable id="propTable" var="key" style="min-width: 500px;"
						value="#{editServiceBean.propertyMap.keySet().toArray()}">
						<p:column>
							<f:facet name="header"> 
								<h:outputText value="#{messages.key}" />
							</f:facet>
							<h:outputText value="#{key}" />
						</p:column>
						<p:column>
							<f:facet name="header">
								<h:outputText value="#{messages.value}" />
							</f:facet>
							<h:outputText value="#{editServiceBean.propertyMap[key]}" />
						</p:column>
						<p:column>
							<h:commandLink value="#{messages.delete}" action="#{editServiceBean.removeProp(key)}">
								<f:ajax render="@form" />
							</h:commandLink>
						</p:column>
					</p:dataTable>
					
			        <h:outputText value="#{messages.new_property}:"/>
					<h:panelGrid id="newPropTable" columns="3" columnClasses="labelColumn, elementColumn">
				        <h:inputText id="key_input" value="#{editServiceBean.newKey}"/>
		       			<h:inputText id="value_input" value="#{editServiceBean.newValue}"/>
						<h:commandLink value="#{messages.add}" action="#{editServiceBean.addProp()}">
							<f:ajax execute="form" render="form" />
						</h:commandLink>
					</h:panelGrid>
		
			        <h:outputText value="#{messages.service_desc_short}:"/>
					<h:inputTextarea id="short_desc" rows="12" cols="60" maxlength="2048"
		            		value="#{editServiceBean.entity.shortDescription}"/>
					
			        <h:outputText value="#{messages.service_desc}:"/>
					<h:inputTextarea id="desc" rows="12" cols="60" 
		            		value="#{editServiceBean.entity.description}"/>
					
179
180
181
182
			        <h:outputText value="#{messages.deregister_text}:"/>
					<h:inputTextarea id="dereg_text" rows="12" cols="60" 
		            		value="#{editServiceBean.entity.deregisterText}"/>
					
michael.simon's avatar
michael.simon committed
183
184
185
186
187
188
189
190
191
192
193
194
195
				</p:panelGrid>

				<p:commandButton id="cancel" action="#{editServiceBean.cancel}" value="#{messages.cancel}" 
					immediate="true" />
				<p:commandButton id="save" action="#{editServiceBean.save}" value="#{messages.save}" ajax="false"/>
			</p:panel>
		</div>
	</h:form>
	</ui:define>
</ui:composition>
</f:view>		
</body>
</html>