You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2016/04/29 16:24:34 UTC

[3/5] syncope git commit: [SYNCOPE-745] Audit

http://git-wip-us.apache.org/repos/asf/syncope/blob/052cf6b1/client/console/src/main/resources/org/apache/syncope/client/console/notifications/EventSelectionPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/notifications/EventSelectionPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/notifications/EventSelectionPanel.html
deleted file mode 100644
index 8baffa9..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/notifications/EventSelectionPanel.html
+++ /dev/null
@@ -1,125 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-  <wicket:head>
-    <style>
-      .container {
-        display: block;
-        width: 100%;
-      }
-
-      .eventLabel {
-        font-size: 12px;
-        vertical-align: middle;
-        font-family: Verdana,Tahoma,sans-serif;
-        display: table-cell;
-        width: 300px;
-        height: 20px;
-      }
-
-      .divtableheadereventLabel {
-        font-weight: bold;
-        float: left;
-        margin-left: 5px;
-        display: table-cell;
-        width: 70px;
-      }
-
-      .divtableheadercell {
-        display: inline-table;
-        vertical-align: top;
-        text-align: right;
-        width: 105px;
-        height: 20px;
-      }
-
-      .divtablecheckcolumn {
-        display: table-cell;
-        vertical-align: top;
-        text-align: right;
-        width: 105px;
-      }
-
-      .divtablecheck {
-        width: 105px;
-        height: 20px;
-      }
-
-    </style>
-  </wicket:head>
-  <wicket:panel>
-    <div class="eventSelectionWidzard">
-      <div class="container">
-        <div style="display:inline-table;">
-          <div class="eventLabel">
-            &nbsp;
-          </div>
-          <div style="display: table-cell">
-            <div class="divtableheadercell">
-              <div class="divtableheadereventLabel">
-                <eventLabel wicket:id="successLabel"/>
-              </div>
-              <div style="display: table-cell">
-                <input type="checkbox" wicket:id="successSelector" style="margin-top: 0px;margin-bottom: 0px;"/>
-              </div>
-            </div>
-          </div>
-          <div style="display: table-cell">
-            <div class="divtableheadercell">
-              <div class="divtableheadereventLabel">
-                <eventLabel wicket:id="failureLabel"/>
-              </div>
-              <div style="display: table-cell">
-                <input type="checkbox" wicket:id="failureSelector" style="margin-top: 0px;margin-bottom: 0px;"/>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-
-      <div class="container">
-        <div class="eventLabel">
-          <div id="divtablerow-eventLabel" wicket:id="categoryView">
-            <div class="eventLabel">
-              <span wicket:id="subcategory">[subcategory]</span>
-            </div>
-          </div>
-        </div>
-
-        <div id="divtablerow-success" class="divtablecheckcolumn">
-          <span wicket:id="successGroup">
-            <div wicket:id="successView" class="divtablecheck">
-              <div class="divtableheadereventLabel">&nbsp;</div>
-              <input type="checkbox" wicket:id="successCheck"/>
-            </div>
-          </span>
-        </div>
-
-        <div id="divtablerow-failure" class="divtablecheckcolumn">
-          <span wicket:id="failureGroup">
-            <div wicket:id="failureView" class="divtablecheck">
-              <div class="divtableheadereventLabel">&nbsp;</div>
-              <input type="checkbox" wicket:id="failureCheck"/>
-            </div>
-          </span>
-        </div>
-      </div>
-    </div>
-  </wicket:panel>
-</html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/052cf6b1/client/console/src/main/resources/org/apache/syncope/client/console/notifications/LoggerCategoryPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/notifications/LoggerCategoryPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/notifications/LoggerCategoryPanel.html
deleted file mode 100644
index 03213b7..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/notifications/LoggerCategoryPanel.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-  <wicket:head>
-    <style>
-
-      .events{
-        display: table-row;
-        width: 990px;
-      }
-
-      .selectedEvents{
-        display: inline-block;
-        height: 100px;
-        margin: 10px 10px 0 10px;
-        overflow-y: auto;
-      }
-
-      .eventSelection{
-        display: inline-table;
-        float: right;
-        width: 380px;
-        min-width: 380px;
-      }
-
-      .eventSelection div#eventElement{
-        display: table-row;
-        width:100%;
-      }
-      .eventSelection div#eventElement div#eventLabel{
-        display: table-cell;
-      }
-
-      .eventSelection div#eventElement div#value{
-        display: table-cell;
-        padding: 0 0 0 10px;
-      }
-    </style>
-  </wicket:head>
-  <wicket:panel>
-
-    <div class="events">
-      <div class="selectedEvents">
-        <span wicket:id="selectedEventsPanel">[selected events panel]</span>
-      </div>
-
-      <div class="eventSelection">
-        <div wicket:id="categoryContainer">
-          <div>
-            <span wicket:id="type">[type]</span>
-          </div>
-          <div>
-            <span wicket:id="category">[category]</span>
-          </div>
-          <div>
-            <span wicket:id="subcategory">[sub-category]</span>
-          </div>
-          <div>
-            <div id="eventLabel">
-              <eventLabel wicket:id="customLabel"/>
-            </div>
-            <div id="value">
-              <span wicket:id="custom">[custom]</span>
-              <span wicket:id="customActions">[actions]</span>
-            </div>
-          </div>
-        </div>
-        <div wicket:id="eventsContainer">
-          <span wicket:id="eventsPanel">[events panel]</span>
-        </div>
-      </div>
-    </div>
-
-  </wicket:panel>
-</html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/052cf6b1/client/console/src/main/resources/org/apache/syncope/client/console/notifications/SelectedEventsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/notifications/SelectedEventsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/notifications/SelectedEventsPanel.html
deleted file mode 100644
index 3ef0354..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/notifications/SelectedEventsPanel.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-  <wicket:head>
-    <style>
-      div#selectionContainer select{
-        width: 585px;
-        min-width: 585px;
-      }
-    </style>
-  </wicket:head>
-  <wicket:panel>
-    <div id="selectionContainer" wicket:id="selectionContainer">
-      <select wicket:id="selectedEvents" ></select>
-    </div>
-  </wicket:panel>
-</html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/052cf6b1/client/console/src/main/resources/org/apache/syncope/client/console/pages/Audit.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Audit.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Audit.html
new file mode 100644
index 0000000..b4d51d6
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Audit.html
@@ -0,0 +1,38 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:extend>
+    <section class="content-header">
+      <h1>&nbsp;</h1>
+      <ol class="breadcrumb">
+        <li><a wicket:id="dashboardBr"><i class="fa fa-dashboard"></i> <wicket:message key="dashboard"/></a></li>
+        <li class="active"><wicket:message key="configuration"/></li>
+        <li class="active"><wicket:message key="audit"/></li>
+      </ol>
+    </section>
+
+    <section class="content" wicket:id="content">
+      <div class="box">
+        <form wicket:id="auditForm">
+          <div class="box-body" wicket:id="auditPanel"/>
+        </form>
+      </div>
+    </section>
+  </wicket:extend>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/052cf6b1/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
index 5fee51a..d2eb696 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
@@ -104,14 +104,15 @@ under the License.
             <li wicket:id="configurationLI" class="treeview">
               <a href="#"><i class="fa fa-edit"></i><span><wicket:message key="configuration"/></span> <i class="fa fa-angle-left pull-right"></i></a>
               <ul wicket:id="configurationUL" class="treeview-menu">
-                <li wicket:id="rolesLI"><a href="#" wicket:id="roles"><i class="fa fa-users"></i><wicket:message key="roles"/></a></li>
-                <li wicket:id="policiesLI"><a href="#" wicket:id="policies"><i class="fa fa-list"></i><wicket:message key="policies"/></a></li>
-                <li wicket:id="securityquestionsLI"><a href="#" wicket:id="securityquestions"><i class="fa fa-question"></i><wicket:message key="securityQuestions"/></a></li>
-                <li wicket:id="workflowLI"><a href="#" wicket:id="workflow"><i class="fa fa-share-alt"></i><wicket:message key="workflow"/></a></li>
+                <li wicket:id="auditLI"><a href="#" wicket:id="audit"><i class="fa fa-check-square-o"></i><wicket:message key="audit"/></a></li>
                 <li wicket:id="logsLI"><a href="#" wicket:id="logs"><i class="fa fa-file-text-o"></i><wicket:message key="logs"/></a></li>
-                <li wicket:id="typesLI"><a href="#" wicket:id="types"><i class="fa fa-wrench"></i><wicket:message key="types"/></a></li>
                 <li wicket:id="notificationsLI"><a href="#" wicket:id="notifications"><i class="fa fa-envelope-o"></i><wicket:message key="notifications"/></a></li>
                 <li wicket:id="parametersLI"><a href="#" wicket:id="parameters"><i class="fa fa-cog"></i><wicket:message key="parameters"/></a></li>
+                <li wicket:id="policiesLI"><a href="#" wicket:id="policies"><i class="fa fa-list"></i><wicket:message key="policies"/></a></li>
+                <li wicket:id="rolesLI"><a href="#" wicket:id="roles"><i class="fa fa-users"></i><wicket:message key="roles"/></a></li>
+                <li wicket:id="securityquestionsLI"><a href="#" wicket:id="securityquestions"><i class="fa fa-question"></i><wicket:message key="securityQuestions"/></a></li>
+                <li wicket:id="typesLI"><a href="#" wicket:id="types"><i class="fa fa-wrench"></i><wicket:message key="types"/></a></li>
+                <li wicket:id="workflowLI"><a href="#" wicket:id="workflow"><i class="fa fa-share-alt"></i><wicket:message key="workflow"/></a></li>
               </ul>
             </li>
             <li wicket:id="extensionsLI" class="treeview">

http://git-wip-us.apache.org/repos/asf/syncope/blob/052cf6b1/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html
index f2b070e..d1be46a 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html
@@ -37,7 +37,7 @@ under the License.
           <li><i class="fa fa-minus"></i><a href="#" wicket:id="delete"><wicket:message key="resource.menu.remove"/></a></li>
           <li><i class="fa fa-pencil"></i><a href="#" wicket:id="edit"><wicket:message key="resource.menu.edit"/></a></li>
           <li><i class="fa fa-exchange"></i><a href="#" wicket:id="provision"><wicket:message key="resource.menu.provision"/></a></li>
-          <li><i class="fa fa-search"></i><a href="#" wicket:id="explore"><wicket:message key="resource.menu.explore"/></a></li>
+          <li><i class="fa fa-eye"></i><a href="#" wicket:id="explore"><wicket:message key="resource.menu.explore"/></a></li>
           <li><i class="fa fa-arrow-right"></i><a href="#" wicket:id="propagation"><wicket:message key="task.propagation.list"/></a></li>
           <li><i class="fa fa-chevron-circle-left"></i><a href="#" wicket:id="pull"><wicket:message key="task.pull.list"/></a></li>
           <li><i class="fa fa-chevron-circle-right"></i><a href="#" wicket:id="push"><wicket:message key="task.push.list"/></a></li>

http://git-wip-us.apache.org/repos/asf/syncope/blob/052cf6b1/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java
index 5e89dcf..25eaf9e 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java
@@ -86,7 +86,6 @@ public class AuditLoggerName extends AbstractBaseBean {
                 append(buildEvent(type, category, subcategory, event, result)).toString();
     }
 
-    @SuppressWarnings("unchecked")
     public static AuditLoggerName fromLoggerName(final String loggerName)
             throws ParseException {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/052cf6b1/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/LoggerWrapper.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/LoggerWrapper.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/LoggerWrapper.java
index 9f9dfde..a8c6f04 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/LoggerWrapper.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/LoggerWrapper.java
@@ -32,25 +32,25 @@ public final class LoggerWrapper {
     }
 
     public static List<AuditLoggerName> wrap(final Collection<LoggerTO> logger) {
-        List<AuditLoggerName> respons = new ArrayList<>();
+        List<AuditLoggerName> result = new ArrayList<>();
         for (LoggerTO loggerTO : logger) {
             try {
-                respons.add(AuditLoggerName.fromLoggerName(loggerTO.getKey()));
+                result.add(AuditLoggerName.fromLoggerName(loggerTO.getKey()));
             } catch (Exception ignore) {
                 // ignore
             }
         }
-        return respons;
+        return result;
     }
 
     public static List<LoggerTO> unwrap(final Collection<AuditLoggerName> auditNames) {
-        List<LoggerTO> respons = new ArrayList<>();
+        List<LoggerTO> result = new ArrayList<>();
         for (AuditLoggerName name : auditNames) {
             LoggerTO loggerTO = new LoggerTO();
             loggerTO.setKey(name.toLoggerName());
             loggerTO.setLevel(LoggerLevel.DEBUG);
-            respons.add(loggerTO);
+            result.add(loggerTO);
         }
-        return respons;
+        return result;
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/052cf6b1/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
index 0879b60..fcdab01 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
@@ -20,7 +20,6 @@ package org.apache.syncope.common.rest.api.service;
 
 import java.util.List;
 import javax.validation.constraints.NotNull;
-
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;

http://git-wip-us.apache.org/repos/asf/syncope/blob/052cf6b1/fit/console-reference/src/main/resources/console.properties
----------------------------------------------------------------------
diff --git a/fit/console-reference/src/main/resources/console.properties b/fit/console-reference/src/main/resources/console.properties
index a4e833c..73acb0a 100644
--- a/fit/console-reference/src/main/resources/console.properties
+++ b/fit/console-reference/src/main/resources/console.properties
@@ -37,6 +37,7 @@ page.realms=org.apache.syncope.client.console.pages.Realms
 page.topology=org.apache.syncope.client.console.topology.Topology
 page.reports=org.apache.syncope.client.console.pages.Reports
 page.workflow=org.apache.syncope.client.console.pages.Workflow
+page.audit=org.apache.syncope.client.console.pages.Audit
 page.logs=org.apache.syncope.client.console.pages.Logs
 page.securityquestions=org.apache.syncope.client.console.pages.SecurityQuestions
 page.types=org.apache.syncope.client.console.pages.Types

http://git-wip-us.apache.org/repos/asf/syncope/blob/052cf6b1/fit/core-reference/src/test/resources/console.properties
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/resources/console.properties b/fit/core-reference/src/test/resources/console.properties
index a4e833c..73acb0a 100644
--- a/fit/core-reference/src/test/resources/console.properties
+++ b/fit/core-reference/src/test/resources/console.properties
@@ -37,6 +37,7 @@ page.realms=org.apache.syncope.client.console.pages.Realms
 page.topology=org.apache.syncope.client.console.topology.Topology
 page.reports=org.apache.syncope.client.console.pages.Reports
 page.workflow=org.apache.syncope.client.console.pages.Workflow
+page.audit=org.apache.syncope.client.console.pages.Audit
 page.logs=org.apache.syncope.client.console.pages.Logs
 page.securityquestions=org.apache.syncope.client.console.pages.SecurityQuestions
 page.types=org.apache.syncope.client.console.pages.Types