[jboss-svn-commits] JBL Code SVN: r17025 - in labs/jbosslabs/trunk/stats-server/sources/metrics_web: lib and 4 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Dec 4 13:25:42 EST 2007
Author: wrzep
Date: 2007-12-04 13:25:42 -0500 (Tue, 04 Dec 2007)
New Revision: 17025
Added:
labs/jbosslabs/trunk/stats-server/sources/metrics_web/lib/hessian-3.0.13.jar
labs/jbosslabs/trunk/stats-server/sources/metrics_web/lib/kosmos-portlet.jar
labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/Cache.java
labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/JiraMetricsService.java
labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/JiraMetricsServiceBean.java
labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectService.java
labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectServiceBean.java
labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectsServiceBean.java
labs/jbosslabs/trunk/stats-server/sources/metrics_web/view/project.xhtml
Modified:
labs/jbosslabs/trunk/stats-server/sources/metrics_web/build.xml
labs/jbosslabs/trunk/stats-server/sources/metrics_web/resources/WEB-INF/components.xml
labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectsService.java
labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/ws/LabsWebServiceBean.java
labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/ws/LabsWebServiceBeanService.java
labs/jbosslabs/trunk/stats-server/sources/metrics_web/view/home.xhtml
Log:
portlets -> seam
Modified: labs/jbosslabs/trunk/stats-server/sources/metrics_web/build.xml
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/build.xml 2007-12-04 18:24:25 UTC (rev 17024)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/build.xml 2007-12-04 18:25:42 UTC (rev 17025)
@@ -157,6 +157,8 @@
<include name="lib/antlr-*.jar"/>
<include name="lib/mvel*.jar"/>
<include name="lib/richfaces-api*.jar" />
+ <include name="lib/kosmos*.jar" />
+ <include name="lib/hessian*.jar" />
</fileset>
</copy>
<copy todir="${ear.dir}/META-INF">
Added: labs/jbosslabs/trunk/stats-server/sources/metrics_web/lib/hessian-3.0.13.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosslabs/trunk/stats-server/sources/metrics_web/lib/hessian-3.0.13.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosslabs/trunk/stats-server/sources/metrics_web/lib/kosmos-portlet.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosslabs/trunk/stats-server/sources/metrics_web/lib/kosmos-portlet.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: labs/jbosslabs/trunk/stats-server/sources/metrics_web/resources/WEB-INF/components.xml
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/resources/WEB-INF/components.xml 2007-12-04 18:24:25 UTC (rev 17024)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/resources/WEB-INF/components.xml 2007-12-04 18:25:42 UTC (rev 17025)
@@ -25,7 +25,7 @@
<persistence:managed-persistence-context name="entityManager"
auto-create="true"
persistence-unit-jndi-name="java:/metrics_webEntityManagerFactory"/>
-
+
<drools:rule-base name="securityRules">
<drools:rule-files>
<value>/security.drl</value>
Added: labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/Cache.java
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/Cache.java (rev 0)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/Cache.java 2007-12-04 18:25:42 UTC (rev 17025)
@@ -0,0 +1,38 @@
+ /*
+ * JBoss, a division of Red Hat
+ * Copyright 2007, Red Hat Middleware LLC and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.labs.metrics.web.service;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+/**
+ * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
+ */
+
+ at Name("cache")
+ at Scope(ScopeType.APPLICATION)
+public class Cache {
+
+
+}
Added: labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/JiraMetricsService.java
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/JiraMetricsService.java (rev 0)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/JiraMetricsService.java 2007-12-04 18:25:42 UTC (rev 17025)
@@ -0,0 +1,33 @@
+ /*
+ * JBoss, a division of Red Hat
+ * Copyright 2007, Red Hat Middleware LLC and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.labs.metrics.web.service;
+
+import javax.ejb.Local;
+
+import hu.midori.kosmos.model.JiraProject;
+
+ at Local
+public interface JiraMetricsService {
+
+ public abstract JiraProject getJiraProject();
+}
\ No newline at end of file
Added: labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/JiraMetricsServiceBean.java
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/JiraMetricsServiceBean.java (rev 0)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/JiraMetricsServiceBean.java 2007-12-04 18:25:42 UTC (rev 17025)
@@ -0,0 +1,107 @@
+ /*
+ * JBoss, a division of Red Hat
+ * Copyright 2007, Red Hat Middleware LLC and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.labs.metrics.web.service;
+
+import java.net.MalformedURLException;
+import java.util.List;
+
+import hu.midori.kosmos.model.JiraProject;
+import hu.midori.kosmos.protocol.JiraService;
+
+import javax.ejb.Stateless;
+
+import org.jboss.labs.metrics.web.ws.jaxb.Project;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.log.Log;
+
+import com.caucho.hessian.client.HessianProxyFactory;
+
+/**
+ * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
+ * @author <a href="mailto:aron.gombas at midori.hu">Aron Gombas</a>
+ */
+
+ at Name("jiraService")
+ at Stateless
+public class JiraMetricsServiceBean implements JiraMetricsService {
+
+ private static final String JIRA_SERVICE = "kosmos-server/kosmos-services/jira-service";
+
+ @In private Project project;
+ @Logger private Log log;
+
+ @Factory("jira")
+ public JiraProject getJiraProject() {
+
+ String projectId = project.getId();
+
+ String serviceUrl = "http://localhost:8180/";
+ JiraService service = getService(serviceUrl + JIRA_SERVICE);
+
+ List<JiraProject> projects = null;
+
+ String monitoredUrl = project.getJira();
+
+ if ((monitoredUrl == null) || (monitoredUrl.equals(""))) {
+ return null;
+ }
+
+ // get project list if the service was successfully set-up
+ if ((service != null) && (monitoredUrl != null)) {
+
+ try {
+ projects = service.getProjects(monitoredUrl);
+ //timestamp = service.getTimestamp();
+ } catch (Exception e) {
+ log.warn("Unable to get project from service " +
+ "(projectId: " + projectId + ")", e);
+ return null;
+ }
+ }
+
+ if ((projects != null) && (projects.size() > 0)) {
+ return projects.get(0);
+ } else {
+ log.warn("Failed to download JIRA project: " + monitoredUrl +
+ " (projectId:" + projectId + ")");
+ }
+
+ return null;
+ }
+
+ private JiraService getService(String serviceUrl) {
+
+ JiraService service = null;
+ HessianProxyFactory factory = new HessianProxyFactory();
+ try {
+ service = (JiraService)factory.create(JiraService.class, serviceUrl);
+ } catch (MalformedURLException ex) {
+ log.warn("Unable to connect to the service", ex);
+ }
+ return service;
+ }
+
+}
Added: labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectService.java
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectService.java (rev 0)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectService.java 2007-12-04 18:25:42 UTC (rev 17025)
@@ -0,0 +1,33 @@
+ /*
+ * JBoss, a division of Red Hat
+ * Copyright 2007, Red Hat Middleware LLC and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.labs.metrics.web.service;
+
+import javax.ejb.Local;
+
+import org.jboss.labs.metrics.web.ws.jaxb.Project;
+
+ at Local
+public interface ProjectService {
+
+ public abstract Project getProject();
+}
\ No newline at end of file
Added: labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectServiceBean.java
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectServiceBean.java (rev 0)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectServiceBean.java 2007-12-04 18:25:42 UTC (rev 17025)
@@ -0,0 +1,61 @@
+ /*
+ * JBoss, a division of Red Hat
+ * Copyright 2007, Red Hat Middleware LLC and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.labs.metrics.web.service;
+
+import java.util.List;
+
+import javax.ejb.Stateless;
+
+import org.jboss.labs.metrics.web.ws.jaxb.Project;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.web.RequestParameter;
+
+/**
+ * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
+ */
+
+ at Name("projectService")
+ at Stateless
+public class ProjectServiceBean implements ProjectService {
+
+ @RequestParameter private String projectId;
+ @In(create=true) private List<Project> projects;
+
+ @Factory("project")
+ public Project getProject() {
+
+ System.out.println("get");
+
+ for (Project project : projects) {
+ if (projectId.equals(project.getId())) {
+ return project;
+ }
+ }
+
+ System.out.println("null");
+
+ return null;
+ }
+}
Modified: labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectsService.java
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectsService.java 2007-12-04 18:24:25 UTC (rev 17024)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectsService.java 2007-12-04 18:25:42 UTC (rev 17025)
@@ -1,42 +1,35 @@
+ /*
+ * JBoss, a division of Red Hat
+ * Copyright 2007, Red Hat Middleware LLC and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
package org.jboss.labs.metrics.web.service;
-
import java.util.List;
-import org.jboss.labs.metrics.web.ws.LabsWebServiceBean;
-import org.jboss.labs.metrics.web.ws.LabsWebServiceBeanService;
+import javax.ejb.Local;
+
import org.jboss.labs.metrics.web.ws.jaxb.Project;
-import org.jboss.labs.metrics.web.ws.jaxb.ProjectArray;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-/**
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- */
+ at Local
+public interface ProjectsService {
- at Name("projectsService")
- at Scope(ScopeType.APPLICATION)
-public class ProjectsService {
-
- @Factory("projects")
- public List<Project> getProjects() {
-
- List<Project> projects = null;
-
- LabsWebServiceBean service = new LabsWebServiceBeanService().getLabsWebServiceBeanPort();
-
- ProjectArray arr = null;
-
- if (service != null) {
- arr = service.getProjects();
- }
-
- if (arr != null) {
- projects = arr.getItem();
- }
-
- return projects;
- }
-}
+ public abstract List<Project> getProjects();
+}
\ No newline at end of file
Added: labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectsServiceBean.java
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectsServiceBean.java (rev 0)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/service/ProjectsServiceBean.java 2007-12-04 18:25:42 UTC (rev 17025)
@@ -0,0 +1,66 @@
+ /*
+ * JBoss, a division of Red Hat
+ * Copyright 2007, Red Hat Middleware LLC and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.labs.metrics.web.service;
+
+import java.util.List;
+
+import javax.ejb.Stateless;
+
+import org.jboss.labs.metrics.web.ws.LabsWebServiceBean;
+import org.jboss.labs.metrics.web.ws.LabsWebServiceBeanService;
+import org.jboss.labs.metrics.web.ws.jaxb.Project;
+import org.jboss.labs.metrics.web.ws.jaxb.ProjectArray;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+/**
+ * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
+ */
+
+ at Name("projectsService")
+ at Scope(ScopeType.APPLICATION)
+ at Stateless
+public class ProjectsServiceBean implements ProjectsService {
+
+ @Factory("projects")
+ public List<Project> getProjects() {
+
+ List<Project> projects = null;
+
+ LabsWebServiceBean service = new LabsWebServiceBeanService().getLabsWebServiceBeanPort();
+
+ ProjectArray arr = null;
+
+ if (service != null) {
+ arr = service.getProjects();
+ }
+
+ if (arr != null) {
+ projects = arr.getItem();
+ }
+
+ return projects;
+ }
+}
Modified: labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/ws/LabsWebServiceBean.java
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/ws/LabsWebServiceBean.java 2007-12-04 18:24:25 UTC (rev 17024)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/ws/LabsWebServiceBean.java 2007-12-04 18:25:42 UTC (rev 17025)
@@ -1,3 +1,24 @@
+ /*
+ * JBoss, a division of Red Hat
+ * Copyright 2007, Red Hat Middleware LLC and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.labs.metrics.web.ws;
Modified: labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/ws/LabsWebServiceBeanService.java
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/ws/LabsWebServiceBeanService.java 2007-12-04 18:24:25 UTC (rev 17024)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/src/model/org/jboss/labs/metrics/web/ws/LabsWebServiceBeanService.java 2007-12-04 18:25:42 UTC (rev 17025)
@@ -1,3 +1,24 @@
+ /*
+ * JBoss, a division of Red Hat
+ * Copyright 2007, Red Hat Middleware LLC and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.labs.metrics.web.ws;
@@ -7,7 +28,6 @@
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
-import javax.xml.ws.WebServiceFeature;
/**
Modified: labs/jbosslabs/trunk/stats-server/sources/metrics_web/view/home.xhtml
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/view/home.xhtml 2007-12-04 18:24:25 UTC (rev 17024)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/view/home.xhtml 2007-12-04 18:25:42 UTC (rev 17025)
@@ -15,20 +15,22 @@
<rich:panel>
<f:facet name="header">Welcome!</f:facet>
<p>Projects</p>
+ <h:form>
<rich:dataTable value="#{projects}" var="p">
- <rich:column>
- #{p.id}
- </rich:column>
<rich:column>
- #{p.name}
+ <h:outputLink value="project.seam">
+ #{p.name}
+ <f:param name="projectId" value="#{p.id}" />
+ </h:outputLink>
</rich:column>
<rich:column>
- #{p.jira}
+ <h:outputLink value="project.seam">
+ browse
+ <f:param name="projectId" value="#{p.id}" />
+ </h:outputLink>
</rich:column>
- <rich:column>
- #{p.svn}
- </rich:column>
- </rich:dataTable>
+ </rich:dataTable>
+ </h:form>
</rich:panel>
</ui:define>
Added: labs/jbosslabs/trunk/stats-server/sources/metrics_web/view/project.xhtml
===================================================================
--- labs/jbosslabs/trunk/stats-server/sources/metrics_web/view/project.xhtml (rev 0)
+++ labs/jbosslabs/trunk/stats-server/sources/metrics_web/view/project.xhtml 2007-12-04 18:25:42 UTC (rev 17025)
@@ -0,0 +1,64 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <h:messages globalOnly="true" styleClass="message"/>
+
+ <rich:panel>
+ <f:facet name="header">Project Metrics</f:facet>
+
+ <rich:panelMenu style="width:200px" mode="ajax"
+ iconExpandedGroup="disc" iconCollapsedGroup="disc"
+ iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
+ iconCollapsedTopGroup="chevronDown" iconCollapsedTopPosition="right">
+ <rich:panelMenuItem label="Item 1.1">
+ <f:param name="current" value="Item 1.1" />
+ </rich:panelMenuItem>
+ <rich:panelMenuItem label="Item 1.2">
+ <f:param name="current" value="Item 1.2" />
+ </rich:panelMenuItem>
+
+ </rich:panelMenu>
+
+ <p>#{project.name}</p>
+
+ <img src="${jira.issuesPerStatusChartLocator.hiresUrl}" border="0" />
+ <table border="0" cellpadding="4" cellspacing="0"
+ class="basetablestyle">
+ <tr class="header">
+ <th class="tableheaderfirst">Status</th>
+ <th class="tableheader">#</th>
+ </tr>
+ <tr class="oddRow portlet-section-body">
+ <td class="rowlinefirst"><strong>Open</strong></td>
+ <td class="rowline">${jira.openIssues}</td>
+ </tr>
+ <tr class="evenRow portlet-section-alternate">
+ <td class="rowlinefirst"><strong>Coding In Progress</strong></td>
+ <td class="rowline">${jira.codingInProgressIssues}</td>
+ </tr>
+ <tr class="oddRow portlet-section-body">
+ <td class="rowlinefirst"><strong>Reopened</strong></td>
+ <td class="rowline">${jira.reopenedIssues}</td>
+ </tr>
+ <tr class="evenRow portlet-section-alternate">
+ <td class="rowlinefirst"><strong>Resolved</strong></td>
+ <td class="rowline">${jira.resolvedIssues}</td>
+ </tr>
+ <tr class="oddRow portlet-section-body">
+ <td class="bottomline rowlinefirst"><strong>Closed</strong></td>
+ <td class="bottomline rowline">${jira.closedIssues}</td>
+ </tr>
+ </table>
+ </rich:panel>
+
+</ui:define>
+</ui:composition>
More information about the jboss-svn-commits
mailing list