syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [2/2] syncope git commit: [SYNCOPE-990] Hide left column when coming from 'Explore resource'
Date Tue, 10 Jan 2017 10:50:41 GMT
[SYNCOPE-990] Hide left column when coming from 'Explore resource'


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e44e5534
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e44e5534
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e44e5534

Branch: refs/heads/master
Commit: e44e5534009b8da9f7bda899b16a11340cff8293
Parents: c622009
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Tue Jan 10 11:50:01 2017 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Tue Jan 10 11:50:21 2017 +0100

----------------------------------------------------------------------
 .../client/console/panels/ConnObjectDetails.java  |  2 +-
 .../syncope/client/console/panels/Realm.java      |  2 +-
 .../console/topology/TopologyTogglePanel.java     | 18 +++++++++---------
 .../console/wizards/any/ConnObjectPanel.java      |  9 +++++++--
 .../client/console/wizards/any/StatusPanel.java   |  6 +++---
 5 files changed, 21 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/e44e5534/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnObjectDetails.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnObjectDetails.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnObjectDetails.java
index 51b91a9..98a289e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnObjectDetails.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnObjectDetails.java
@@ -31,7 +31,7 @@ public class ConnObjectDetails extends MultilevelPanel.SecondLevel {
 
         MultilevelPanel mlp = new MultilevelPanel("details");
         mlp.setFirstLevel(
-                new ConnObjectPanel(MultilevelPanel.FIRST_LEVEL_ID, Pair.of((ConnObjectTO)
null, connObjectTO)));
+                new ConnObjectPanel(MultilevelPanel.FIRST_LEVEL_ID, Pair.of((ConnObjectTO)
null, connObjectTO), true));
         add(mlp);
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/e44e5534/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
index 857bff0..d210aa7 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
@@ -274,7 +274,7 @@ public abstract class Realm extends WizardMgtPanel<RealmTO> {
 
         public RemoteRealmPanel(final PropagationStatus bean) {
             this.bean = bean;
-            add(new ConnObjectPanel(REMOTE_OBJECT_PANEL_ID, getConnObjectTO()));
+            add(new ConnObjectPanel(REMOTE_OBJECT_PANEL_ID, getConnObjectTO(), false));
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/e44e5534/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
index 6e6ca07..74b570b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
@@ -203,7 +203,7 @@ public class TopologyTogglePanel extends TogglePanel<Serializable>
{
             @Override
             public void onClick(final AjaxRequestTarget target) {
                 final ConnInstanceTO modelObject = new ConnInstanceTO();
-                modelObject.setLocation(node.getKey().toString());
+                modelObject.setLocation(node.getKey());
 
                 final IModel<ConnInstanceTO> model = new CompoundPropertyModel<>(modelObject);
                 modal.setFormModel(model);
@@ -315,7 +315,7 @@ public class TopologyTogglePanel extends TogglePanel<Serializable>
{
             @Override
             public void onClick(final AjaxRequestTarget target) {
                 try {
-                    resourceRestClient.delete(node.getKey().toString());
+                    resourceRestClient.delete(node.getKey());
                     target.appendJavaScript(String.format("jsPlumb.remove('%s');", node.getKey()));
                     SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
                     toggle(target, false);
@@ -336,7 +336,7 @@ public class TopologyTogglePanel extends TogglePanel<Serializable>
{
 
             @Override
             public void onClick(final AjaxRequestTarget target) {
-                ResourceTO modelObject = resourceRestClient.read(node.getKey().toString());
+                ResourceTO modelObject = resourceRestClient.read(node.getKey());
 
                 IModel<ResourceTO> model = new CompoundPropertyModel<>(modelObject);
                 modal.setFormModel(model);
@@ -361,7 +361,7 @@ public class TopologyTogglePanel extends TogglePanel<Serializable>
{
 
             @Override
             public void onClick(final AjaxRequestTarget target) {
-                ResourceTO modelObject = resourceRestClient.read(node.getKey().toString());
+                ResourceTO modelObject = resourceRestClient.read(node.getKey());
                 target.add(propTaskModal.setContent(
                         new ResourceStatusModal(propTaskModal, pageRef, modelObject)));
                 propTaskModal.header(new ResourceModel("resource.provisioning.status", "Provisioning
Status"));
@@ -377,7 +377,7 @@ public class TopologyTogglePanel extends TogglePanel<Serializable>
{
 
             @Override
             public void onClick(final AjaxRequestTarget target) {
-                ResourceTO modelObject = resourceRestClient.read(node.getKey().toString());
+                ResourceTO modelObject = resourceRestClient.read(node.getKey());
 
                 IModel<ResourceTO> model = new CompoundPropertyModel<>(modelObject);
                 provisionModal.setFormModel(model);
@@ -401,7 +401,7 @@ public class TopologyTogglePanel extends TogglePanel<Serializable>
{
 
             @Override
             public void onClick(final AjaxRequestTarget target) {
-                target.add(propTaskModal.setContent(new ConnObjects(propTaskModal, node.getKey().toString(),
pageRef)));
+                target.add(propTaskModal.setContent(new ConnObjects(propTaskModal, node.getKey(),
pageRef)));
                 propTaskModal.header(new StringResourceModel("resource.explore.list", Model.of(node)));
                 propTaskModal.show(true);
             }
@@ -417,7 +417,7 @@ public class TopologyTogglePanel extends TogglePanel<Serializable>
{
             @SuppressWarnings("unchecked")
             public void onClick(final AjaxRequestTarget target) {
                 target.add(propTaskModal.setContent(
-                        new PropagationTasks(propTaskModal, node.getKey().toString(), pageRef)));
+                        new PropagationTasks(propTaskModal, node.getKey(), pageRef)));
                 propTaskModal.header(new ResourceModel("task.propagation.list"));
                 propTaskModal.show(true);
             }
@@ -431,7 +431,7 @@ public class TopologyTogglePanel extends TogglePanel<Serializable>
{
 
             @Override
             public void onClick(final AjaxRequestTarget target) {
-                target.add(schedTaskModal.setContent(new PullTasks(schedTaskModal, pageRef,
node.getKey().toString())));
+                target.add(schedTaskModal.setContent(new PullTasks(schedTaskModal, pageRef,
node.getKey())));
                 schedTaskModal.header(new ResourceModel("task.pull.list"));
                 schedTaskModal.show(true);
             }
@@ -445,7 +445,7 @@ public class TopologyTogglePanel extends TogglePanel<Serializable>
{
 
             @Override
             public void onClick(final AjaxRequestTarget target) {
-                target.add(schedTaskModal.setContent(new PushTasks(schedTaskModal, pageRef,
node.getKey().toString())));
+                target.add(schedTaskModal.setContent(new PushTasks(schedTaskModal, pageRef,
node.getKey())));
                 schedTaskModal.header(new ResourceModel("task.push.list"));
                 schedTaskModal.show(true);
             }

http://git-wip-us.apache.org/repos/asf/syncope/blob/e44e5534/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/ConnObjectPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/ConnObjectPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/ConnObjectPanel.java
index 09e6351..4c234a4 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/ConnObjectPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/ConnObjectPanel.java
@@ -47,7 +47,7 @@ public class ConnObjectPanel extends Panel {
 
     private static final long serialVersionUID = -6469290753080058487L;
 
-    public ConnObjectPanel(final String id, final Pair<ConnObjectTO, ConnObjectTO>
connObjectTOs) {
+    public ConnObjectPanel(final String id, final Pair<ConnObjectTO, ConnObjectTO>
connObjectTOs, final boolean view) {
         super(id);
 
         final IModel<List<String>> formProps = new LoadableDetachableModel<List<String>>()
{
@@ -107,7 +107,12 @@ public class ConnObjectPanel extends Panel {
                 final AttrTO after = afterProfile == null ? null : afterProfile.get(prop);
 
                 valueFragment = new Fragment("value", "doubleValue", ConnObjectPanel.this);
-                valueFragment.add(getValuePanel("oldAttribute", prop, before));
+
+                Panel oldAttribute = getValuePanel("oldAttribute", prop, before);
+                oldAttribute.setOutputMarkupPlaceholderTag(true);
+                oldAttribute.setVisible(!view);
+                valueFragment.add(oldAttribute);
+
                 valueFragment.add(getValuePanel("newAttribute", prop, after));
 
                 if (before == null || after == null

http://git-wip-us.apache.org/repos/asf/syncope/blob/e44e5534/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/StatusPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/StatusPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/StatusPanel.java
index 79ec175..c73ff4d 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/StatusPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/StatusPanel.java
@@ -162,8 +162,8 @@ public class StatusPanel extends Panel {
 
             @Override
             protected boolean statusCondition(final StatusBean bean) {
-                final Pair<ConnObjectTO, ConnObjectTO> pair
-                        = getConnObjectTO(bean.getAnyKey(), bean.getResourceName(), connObjects);
+                final Pair<ConnObjectTO, ConnObjectTO> pair =
+                        getConnObjectTO(bean.getAnyKey(), bean.getResourceName(), connObjects);
 
                 return pair != null && pair.getRight() != null;
             }
@@ -213,7 +213,7 @@ public class StatusPanel extends Panel {
             this.bean = bean;
             this.connObjects = connObjects;
 
-            add(new ConnObjectPanel(REMOTE_OBJECT_PANEL_ID, getConnObjectTO()));
+            add(new ConnObjectPanel(REMOTE_OBJECT_PANEL_ID, getConnObjectTO(), false));
         }
 
         @Override


Mime
View raw message