From 2526a00d0b203eb297002c4a8a5b3bd8bb46781c Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Mon, 16 Sep 2013 09:45:21 +0000 Subject: [PATCH] fix for wsresource by subtype query, integrated Activation Record Widgets git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/resource-management@81528 82a268e6-3cf1-43bd-a215-b396298e98cf --- .settings/org.eclipse.wst.common.component | 3 + pom.xml | 10 +- .../client/ResourceManagementPortlet.java | 89 ++++-------------- .../ResourceManagementPortlet.gwt.xml | 2 +- src/main/webapp/ResourceManagementPortlet.css | 2 +- src/main/webapp/WEB-INF/web.xml | 16 ++-- .../webapp/images/icons/page_white_world.png | Bin 734 -> 0 bytes src/main/webapp/images/icons/ws-resource.png | Bin 0 -> 695 bytes 8 files changed, 37 insertions(+), 85 deletions(-) delete mode 100644 src/main/webapp/images/icons/page_white_world.png create mode 100644 src/main/webapp/images/icons/ws-resource.png diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index a807789..209aaa8 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -7,6 +7,9 @@ uses + + uses + diff --git a/pom.xml b/pom.xml index 8f667e5..2d89d4f 100644 --- a/pom.xml +++ b/pom.xml @@ -149,11 +149,11 @@ - - - - - + + org.gcube.portlets.admin + activation-record-widgets + [1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT) + com.google.inject diff --git a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/ResourceManagementPortlet.java b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/ResourceManagementPortlet.java index 57c6b1c..18da7d0 100644 --- a/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/ResourceManagementPortlet.java +++ b/src/main/java/org/gcube/portlets/admin/resourcemanagement/client/ResourceManagementPortlet.java @@ -17,9 +17,9 @@ package org.gcube.portlets.admin.resourcemanagement.client; -//import org.gcube.portlets.admin.client.forms.ActivationRecordVMForm; -//import org.gcube.portlets.admin.client.forms.GenericResourceCMForm; -//import org.gcube.portlets.admin.client.forms.GenericResourceTreeManagerForm; +import org.gcube.portlets.admin.client.forms.ActivationRecordVMForm; +import org.gcube.portlets.admin.client.forms.GenericResourceCMForm; +import org.gcube.portlets.admin.client.forms.GenericResourceTreeManagerForm; import org.gcube.portlets.admin.ishealthmonitor.client.dialog.ISMonitor; import org.gcube.portlets.admin.resourcemanagement.client.forms.genericresources.DeployVirtualCollection; import org.gcube.portlets.admin.resourcemanagement.client.remote.ProxyRegistry; @@ -499,78 +499,27 @@ public class ResourceManagementPortlet implements EntryPoint { // Create activation record from plugins MenuItem createARTM = new MenuItem("Activation Record for Tree Manager") { protected void onClick(final ComponentEvent be) { -// super.onClick(be); -// if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) { -// GWT.runAsync(GenericResourceTreeManagerForm.class, new RunAsyncCallback() { -// @Override -// public void onSuccess() { -// String currentScope = StatusHandler.getStatus().getCurrentScope(); -// new GenericResourceTreeManagerForm(currentScope).show(); -// } -// -// public void onFailure(Throwable reason) { -// Window.alert("There are networks problem, please check your connection."); -// } -// }); -// } else { -// MessageBox.alert("Activation Record for TM", "You are not allowed to execute this operation", null); -// } + super.onClick(be); + if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) { + GWT.runAsync(GenericResourceTreeManagerForm.class, new RunAsyncCallback() { + @Override + public void onSuccess() { + String currentScope = StatusHandler.getStatus().getCurrentScope(); + new GenericResourceTreeManagerForm(currentScope).show(); + } + + public void onFailure(Throwable reason) { + Window.alert("There are networks problem, please check your connection."); + } + }); + } else { + MessageBox.alert("Activation Record for TM", "You are not allowed to execute this operation", null); + } }; }; createARTM.setIconStyle("pluginTM-icon"); createMnu.add(createARTM); - // Create activation record from plugins - MenuItem createACM = new MenuItem("Activation Record for Content Manager") { - protected void onClick(final ComponentEvent be) { -// super.onClick(be); -// if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) { -// GWT.runAsync(GenericResourceCMForm.class, new RunAsyncCallback() { -// @Override -// public void onSuccess() { -// String currentScope = StatusHandler.getStatus().getCurrentScope(); -// new GenericResourceCMForm(currentScope).show(); -// } -// -// public void onFailure(Throwable reason) { -// Window.alert("There are networks problem, please check your connection."); -// } -// }); -// -// } else { -// MessageBox.alert("Activation Record for CM", "You are not allowed to execute this operation", null); -// } - }; - }; - createACM.setIconStyle("pluginCM-icon"); - createMnu.add(createACM); - - // Create activation record from VM - MenuItem createVM = new MenuItem("Activation Record for View Manager") { - protected void onClick(final ComponentEvent be) { -// super.onClick(be); -// if (SupportedOperations.GENERIC_RESOURCE_CREATE.isAllowed(StatusHandler.getStatus().getCredentials())) { -// //MessageBox.alert("Activation Record for VM", "Operation not implemented yet.", null); -// -// GWT.runAsync(ActivationRecordVMForm.class, new RunAsyncCallback() { -// @Override -// public void onSuccess() { -// String currentScope = StatusHandler.getStatus().getCurrentScope(); -// new ActivationRecordVMForm(currentScope).show(); -// } -// -// public void onFailure(Throwable reason) { -// Window.alert("There are networks problem, please check your connection."); -// } -// }); -// } else { -// MessageBox.alert("Activation Record for VM", "You are not allowed to execute this operation", null); -// } - }; - }; - createVM.setIconStyle("pluginVM-icon"); - createMnu.add(createVM); - // Create Generic Resource MenuItem deployVirtualCollection = new MenuItem("Instantiate Virtual Collections") { protected void onClick(final ComponentEvent be) { diff --git a/src/main/resources/org/gcube/portlets/admin/resourcemanagement/ResourceManagementPortlet.gwt.xml b/src/main/resources/org/gcube/portlets/admin/resourcemanagement/ResourceManagementPortlet.gwt.xml index a3bf36a..c35fc10 100644 --- a/src/main/resources/org/gcube/portlets/admin/resourcemanagement/ResourceManagementPortlet.gwt.xml +++ b/src/main/resources/org/gcube/portlets/admin/resourcemanagement/ResourceManagementPortlet.gwt.xml @@ -12,7 +12,7 @@ - + diff --git a/src/main/webapp/ResourceManagementPortlet.css b/src/main/webapp/ResourceManagementPortlet.css index 274fd36..f5e800b 100644 --- a/src/main/webapp/ResourceManagementPortlet.css +++ b/src/main/webapp/ResourceManagementPortlet.css @@ -228,7 +228,7 @@ } .wsresources-icon { - background-image: url(images/icons/page_white_world.png) !important; + background-image: url(images/icons/ws-resource.png) !important; } .ghn-icon { diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index babdf2a..73a65ac 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -52,15 +52,15 @@ - - - - + + arServlet + org.gcube.portlets.admin.server.ARServiceImpl + - - - - + + arServlet + /resourcemanagementportlet/activeservice + diff --git a/src/main/webapp/images/icons/page_white_world.png b/src/main/webapp/images/icons/page_white_world.png deleted file mode 100644 index 6ed2490ed1432d5d667a76235360824a1088e928..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 734 zcmV<40wMj0P)JT{hN;C#tgf#9krG=I>5!<*aE1_(spcgF}<`n4i zJi-}^6UUeU4jUFwdCiVPDm%`Zx^UBa8J(mnR6wEgz^}o8;)M*Y(@l_!Kfv)}4+NuM zaPXE50z)r)9=D=SR|RIqfQ^j}Hu!fzMeQBo+@PZk1G8hOw|vBTvkx`HM)Xe9q3xao z@`p0`NO!2904FHSLA6E@Y-O6zH$DQzvq@aHsz}}<(!v(Z_+EodX%R&NZW75g+nENo zV0020rxE^;7d!067AN>6*+&YLp$9uH6F-=In`XC{Cn%+o|5)b&boEPr02w@|P*oGm QmjD0&07*qoM6N<$g78X0Q~&?~ diff --git a/src/main/webapp/images/icons/ws-resource.png b/src/main/webapp/images/icons/ws-resource.png new file mode 100644 index 0000000000000000000000000000000000000000..e1ac96fcb45283fbbdfbb9bdd0776bb68cf2e50d GIT binary patch literal 695 zcmV;o0!aOdP)|8JRi+H|V#jxp`JQ7@=)6!Nva*i)0!yEV|UOMzvgA08t2DA7bW1^VlE zdv6px&eN(y?1OAi@G?%`RIYu{Xt{b*sH|5KuLDU@NPIFPd>T@6ij|GkrB=H+w^N;< zRKyjW&D54RSQ{FZS*3{XcpZpeRecka0qz z4SQ!Hefx~4YZQ{#0orzhg7Yyw1}QZKI@1-t;F!8Ht{^eIk%n~#kSqtJ2qG>wBD1le z-v>xLKzIWba)Ucl0j(kbcw9k*7enyQKw20Eq%D8|DG)$-b`7-s9kC{GDi!eI9(H_- zzv2oO{nFf4#zjf?(+g?o2{=B8h;t0&cK{(Lkf?+F_Z))j9-3bXIO7UF%`Lwhcs(<& zEUkuINQWY?7)p}`isEd@(n}zdR={za7@Sf}POS#tA94q(OT)IjC3=32=;JM-uR}y* z*NEQa61_FjXoqRFP}E$;QOFeds)yBvms5|5{GR_x$TxJGoPBkhowbF727x!@2yg)Q z4kS5Ml~7SrVy d49ntQ@dqy86i9NF!nptd002ovPDHLkV1g;~G>`xQ literal 0 HcmV?d00001