Commit 7bd7def5 authored by michael.simon's avatar michael.simon
Browse files

Add some icons, optimize ssh key management page

parent b0614f29
......@@ -42,10 +42,8 @@ public class JpaSshPubKeyDao extends JpaBaseDao<SshPubKeyEntity, Long> implement
@Override
@SuppressWarnings("unchecked")
public List<SshPubKeyEntity> findByUserAndStatusWithRegs(Long userId, SshPubKeyStatus keyStatus) {
return em.createQuery("select e from SshPubKeyEntity e "
return em.createQuery("select distinct e from SshPubKeyEntity e "
+ "left join fetch e.sshPubKeyRegistries "
// + "left join fetch e.sshPubKeyRegistries.registry "
// + "left join fetch e.sshPubKeyRegistries.registry.service "
+ "where e.user.id = :userId and e.keyStatus = :keyStatus")
.setParameter("userId", userId)
.setParameter("keyStatus", keyStatus)
......
......@@ -48,6 +48,13 @@
<i class="fa fa-fw fa-check"></i>
</h:panelGroup>
<p:tooltip id="toolTipActiveKey" for="activeKey" value="#{messages.ssh_pub_key_active}" position="top"/>
</p:column>
<p:column width="5%">
<f:facet name="header"><h:outputText value="#{messages.type}:"/></f:facet>
<h:panelGroup id="interactiveId" rendered="#{regKey.usageType == 'INTERACTIVE'}"><i class="fa fa-fw fa-user"></i></h:panelGroup>
<p:tooltip for="interactiveId" value="#{messages.ssh_pub_key_interactiv}" position="top"/>
<h:panelGroup id="commandId" rendered="#{regKey.usageType == 'COMMAND'}"><i class="fa fa-fw fa-database"></i></h:panelGroup>
<p:tooltip for="commandId" value="#{messages.ssh_pub_key_command}" position="top"/>
</p:column>
<p:column>
<f:facet name="header"><h:outputText value="#{messages.ssh_key_name}:"/></f:facet>
......
......@@ -31,13 +31,10 @@
<p:dataTable var="key" value="#{userSshKeyManagementBean.keyList.toArray()}">
<p:column>
<f:facet name="header"><h:outputText value="#{messages.ssh_key_name}:"/></f:facet>
<h:outputText value="#{key.pubKeyEntity.name}"/>
</p:column>
<p:column>
<f:facet name="header"><h:outputText value="#{messages.ssh_key_type}:"/></f:facet>
<h:outputText value="#{key.pubKeyEntity.keyType}"/>
<b><h:outputText value="#{key.pubKeyEntity.name}"/></b> (<h:outputText value="#{key.pubKeyEntity.keyType}"/>)
</p:column>
<p:column>
<f:facet name="header"><h:outputText value="#{messages.fingerprint}:"/></f:facet>
<h:outputText value="#{key.fingerprint}" rendered="#{not empty key.publicKey}" />
<h:outputText value="#{messages.ssh_key_type_unknown}" rendered="#{empty key.publicKey}" />
</p:column>
......@@ -48,7 +45,13 @@
<p:column>
<f:facet name="header"><h:outputText value="#{messages.services}:"/></f:facet>
<p:repeat var="reg" value="#{key.pubKeyEntity.sshPubKeyRegistries}">
<h:outputText value="#{reg.registry.service.name}"/>
<div>
<h:outputText value="#{reg.registry.service.name}"/>
<h:panelGroup id="interactiveId" rendered="#{reg.usageType == 'INTERACTIVE'}"><i class="fa fa-fw fa-user"></i></h:panelGroup>
<p:tooltip for="interactiveId" value="#{messages.ssh_pub_key_interactiv}" position="top"/>
<h:panelGroup id="commandId" rendered="#{reg.usageType == 'COMMAND'}"><i class="fa fa-fw fa-database"></i></h:panelGroup>
<p:tooltip for="commandId" value="#{messages.ssh_pub_key_command}" position="top"/>
</div>
</p:repeat>
</p:column>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment