Permalink
Browse files

some changes to css

  • Loading branch information...
1 parent 37c7488 commit f296ad71dfcee974458bf090486f05a492ff1060 @nullin committed Feb 7, 2011
View
@@ -1,5 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="src" path="google-chart-0.5.2-grails-app-i18n">
+ <attributes>
+ <attribute name="com.springsource.sts.grails.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="google-chart-0.5.2-grails-app-taglib">
+ <attributes>
+ <attribute name="com.springsource.sts.grails.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="google-chart-0.5.2-src-groovy">
+ <attributes>
+ <attribute name="com.springsource.sts.grails.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="src" path="src/groovy"/>
<classpathentry kind="src" path="grails-app/conf"/>
@@ -11,6 +26,36 @@
<classpathentry kind="src" path="test/unit"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="com.springsource.sts.grails.core.CLASSPATH_CONTAINER"/>
+ <classpathentry excluding="BuildConfig.groovy|*DataSource.groovy|UrlMappings.groovy|Config.groovy|BootStrap.groovy|spring/resources.groovy" kind="src" path="searchable-0.5.5.1-grails-app-conf">
+ <attributes>
+ <attribute name="com.springsource.sts.grails.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="searchable-0.5.5.1-grails-app-controllers">
+ <attributes>
+ <attribute name="com.springsource.sts.grails.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="searchable-0.5.5.1-grails-app-services">
+ <attributes>
+ <attribute name="com.springsource.sts.grails.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="searchable-0.5.5.1-grails-app-views">
+ <attributes>
+ <attribute name="com.springsource.sts.grails.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="searchable-0.5.5.1-src-java">
+ <attributes>
+ <attribute name="com.springsource.sts.grails.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="searchable-0.5.5.1-src-groovy">
+ <attributes>
+ <attribute name="com.springsource.sts.grails.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="src" path="tomcat-1.3.6-src-groovy">
<attributes>
<attribute name="com.springsource.sts.grails.core.SOURCE_FOLDER" value="true"/>
View
@@ -24,6 +24,51 @@
</natures>
<linkedResources>
<link>
+ <name>google-chart-0.5.2-grails-app-i18n</name>
+ <type>2</type>
+ <locationURI>GRAILS_ROOT/1.3.6/projects/libra/plugins/google-chart-0.5.2/grails-app/i18n</locationURI>
+ </link>
+ <link>
+ <name>google-chart-0.5.2-grails-app-taglib</name>
+ <type>2</type>
+ <locationURI>GRAILS_ROOT/1.3.6/projects/libra/plugins/google-chart-0.5.2/grails-app/taglib</locationURI>
+ </link>
+ <link>
+ <name>google-chart-0.5.2-src-groovy</name>
+ <type>2</type>
+ <locationURI>GRAILS_ROOT/1.3.6/projects/libra/plugins/google-chart-0.5.2/src/groovy</locationURI>
+ </link>
+ <link>
+ <name>searchable-0.5.5.1-grails-app-conf</name>
+ <type>2</type>
+ <locationURI>GRAILS_ROOT/1.3.6/projects/libra/plugins/searchable-0.5.5.1/grails-app/conf</locationURI>
+ </link>
+ <link>
+ <name>searchable-0.5.5.1-grails-app-controllers</name>
+ <type>2</type>
+ <locationURI>GRAILS_ROOT/1.3.6/projects/libra/plugins/searchable-0.5.5.1/grails-app/controllers</locationURI>
+ </link>
+ <link>
+ <name>searchable-0.5.5.1-grails-app-services</name>
+ <type>2</type>
+ <locationURI>GRAILS_ROOT/1.3.6/projects/libra/plugins/searchable-0.5.5.1/grails-app/services</locationURI>
+ </link>
+ <link>
+ <name>searchable-0.5.5.1-grails-app-views</name>
+ <type>2</type>
+ <locationURI>GRAILS_ROOT/1.3.6/projects/libra/plugins/searchable-0.5.5.1/grails-app/views</locationURI>
+ </link>
+ <link>
+ <name>searchable-0.5.5.1-src-groovy</name>
+ <type>2</type>
+ <locationURI>GRAILS_ROOT/1.3.6/projects/libra/plugins/searchable-0.5.5.1/src/groovy</locationURI>
+ </link>
+ <link>
+ <name>searchable-0.5.5.1-src-java</name>
+ <type>2</type>
+ <locationURI>GRAILS_ROOT/1.3.6/projects/libra/plugins/searchable-0.5.5.1/src/java</locationURI>
+ </link>
+ <link>
<name>tomcat-1.3.6-src-groovy</name>
<type>2</type>
<locationURI>GRAILS_ROOT/1.3.6/projects/libra/plugins/tomcat-1.3.6/src/groovy</locationURI>
View
@@ -1,8 +1,9 @@
#Grails Metadata file
-#Wed Jan 19 16:53:39 PST 2011
+#Sun Feb 06 23:54:10 PST 2011
app.grails.version=1.3.6
app.name=libra
app.servlet.version=2.4
app.version=0.1
plugins.hibernate=1.3.6
+plugins.searchable=0.5.5.1
plugins.tomcat=1.3.6
@@ -26,7 +26,7 @@ class StoreController {
return []
}
def fileInputStream = request.getFile("file").inputStream
- def runName = params.runName?:TestRun.getLatestRunName()
+ def runName = params.runName?:TestRun.getLatestRun().name
def result = parseService.parseInputStream(fileInputStream, params.runName)
flash.message = result.error ? result.error : "Uploaded file successfully. Added ${result.added} & updated ${result.updated} results."
log.info "Uploaded file and added test results to run '${runName}'"
@@ -23,11 +23,25 @@ class TestMethodController {
def asyncSearch = {
def testMethodInstances = testMethodService.search(params)
- def outStr = ""
- for (testMethodInstance in testMethodInstances) {
- outStr += "<tr><td><a href=\"" + createLink(action: "show", id:testMethodInstance.id) +
- "\">" + testMethodInstance.name + "</a></td></tr>"
+
+ if (!testMethodInstances) {
+ render "<p>No matches found</p>"
+ } else {
+ def outStr = """
+ <table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ </tr>
+ </thead>
+ <tbody>
+ """
+ for (testMethodInstance in testMethodInstances) {
+ outStr += "<tr><td><a href=\"" + createLink(action: "show", id:testMethodInstance.id) +
+ "\">" + testMethodInstance.name + "</a></td></tr>"
+ }
+ outStr += "</tbody></table>"
+ render outStr
}
- render outStr
}
}
@@ -2,6 +2,7 @@ package com.nm.libra.test
import com.nm.libra.test.TestResult;
import com.nm.libra.test.TestRun;
+import com.nm.libra.utils.GoogleChartBuilderNew;
class TestRunController {
@@ -11,6 +12,11 @@ class TestRunController {
redirect(action: "list", params: params)
}
+ def current = {
+ //TODO: handle no test run in system
+ redirect(action: "show", params: [id: TestRun.getLatestRun().id])
+ }
+
def list = {
//sets max to 100, regardless of user input
params.max = Math.min(params.max ? params.int('max') : 10, 100)
@@ -67,9 +73,37 @@ class TestRunController {
}
}
}
+
+ def resultsMap = ['Pass': allTestsList.size() - failedTestsList.size() - skippedTestsList.size(),
+ 'Fail': failedTestsList.size(), 'Skip': skippedTestsList.size() ]
+
+ def chart = new GoogleChartBuilderNew()
+ def result = chart.pie3DChart{
+ size(w:400, h:200)
+ data(encoding:'simple'){
+ dataSet([1,2,3])
+ }
+ labels{
+ label('1L')
+ label('2L')
+ //label('3L')
+ }
+ legend{
+ label('Pass')
+ label('Fail')
+ //label('Skip')
+ }
+// colors{
+// color('5CE65C')
+// color('FF3300')
+// //color('FFCC00')
+// }
+ }
+
[testRunInstance: testRunInstance, failedTestsList: failedTestsList,
skippedTestsList: skippedTestsList, failedConfigsList: failedConfigsList,
- skippedConfigsList: skippedConfigsList, allTestsList: allTestsList]
+ skippedConfigsList: skippedConfigsList, allTestsList: allTestsList,
+ resultsMap: resultsMap, result:result]
}
}
@@ -6,10 +6,12 @@ class TestRun {
static constraints = {
name(unique:true)
}
+
static mapping = {
sort "name"
}
- def static getLatestRunName() {
+
+ def static getLatestRun() {
def testRunList = list(sort:'dateCreated', order:'desc')
return testRunList.size() == 0 ? null : testRunList[0]
}
@@ -124,7 +124,7 @@ class ParseService {
if (parameters.runid) {
testRun = TestRun.findByName(parameters.runid)
} else {
- testRun = TestRun.findByName(TestRun.getLatestRunName())
+ testRun = TestRun.findByName(TestRun.getLatestRun().name)
}
if (!testRun) {
@@ -1,7 +1,7 @@
<html>
<head>
<title>Welcome to Grails</title>
-<%-- <meta name="layout" content="main" />--%>
+ <meta name="layout" content="main" />
</head>
<body>
<div id="pageBody">
@@ -1,17 +1,49 @@
-<!DOCTYPE html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title><g:layoutTitle default="Grails" /></title>
+ <link rel="stylesheet" href="http://yui.yahooapis.com/2.8.0r4/build/reset-fonts-grids/reset-fonts-grids.css" type="text/css">
<link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" />
<link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
<g:layoutHead />
<g:javascript library="application" />
</head>
<body>
- <div id="spinner" class="spinner" style="display:none;">
- <img src="${resource(dir:'images',file:'spinner.gif')}" alt="${message(code:'spinner.alt',default:'Loading...')}" />
+ <div id="doc3" class="yui-t7">
+ <div id="hd" role="banner">
+ <div id="spinner" class="spinner" style="display:none;">
+ <img src="${resource(dir:'images',file:'spinner.gif')}" alt="${message(code:'spinner.alt',default:'Loading...')}" />
+ </div>
+ <div id="logo">
+ <p>LIBRA</p>
+ </div>
+ </div>
+ <div id="bd" role="application">
+ <div id="menu" class="yui-ge">
+ <div id="navigation" role="navigation" class="yui-u first">
+ <!-- Maybe move this code out someplace else -->
+ <ul>
+ <li><a href="${createLink(action:'current', controller:'testRun')}">Current Run</a></li>
+ <li><a href="${createLink(action:'list', controller:'testRun')}">Test Runs</a></li>
+ <li><a href="${createLink(action:'upload', controller:'store')}">Upload</a></li>
+ <li><a href="${createLink(action:'search', controller:'testMethod')}">Search Tests</a></li>
+ <li><a href="${createLink(action:'search', controller:'testResult')}">Search Results</a></li>
+ </ul>
+ <!-- Maybe move this code out someplace else -->
+ </div>
+ <div id="search" role="search" class="yui-u">
+ <!-- Maybe move this code out someplace else -->
+ <g:form action="search" controller="search">
+ <g:textField name="query"/> <g:submitButton name="search" value="Search"/>
+ </g:form>
+ <!-- Maybe move this code out someplace else -->
+ </div>
+ </div>
+ <div id="main" role="main" class="yui-g">
+ <g:layoutBody />
+ </div>
+ </div>
+ <div id="ft" role="contentinfo"><p>Copyright etc.etc. 2010-*</p></div>
</div>
- <div id="grailsLogo"><a href="http://grails.org"><img src="${resource(dir:'images',file:'grails_logo.png')}" alt="Grails" border="0" /></a></div>
- <g:layoutBody />
</body>
-</html>
+</html>
@@ -3,6 +3,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta name="layout" content="main" />
<title>Upload Test Results</title>
</head>
<body>
@@ -5,32 +5,26 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Search TestMethods</title>
+ <meta name="layout" content="main" />
<g:javascript library="prototype" />
</head>
<body>
<h1>Search for test methods</h1>
<trl:flashMessage message="${flash.message}" />
<g:form>
<table>
- <tr><td>Name contains:</td>
+ <tr><td>Package/Class/Method Name contains:</td>
<td><g:textField name="testname"/></td></tr>
<tr><td>Test/Config?:</td>
- <td><g:select name="testConfig" from="${TestMethodService.testConfig}" noSelection="${['null':'']}"/></td></tr>
- <tr><td><g:submitToRemote action="asyncSearch" value="Search" update="[success:'testdata',failure:'error']"/></td></tr>
+ <td><g:select name="testConfig" from="${TestMethodService.testConfig}" noSelection="${['null':'Test or Config']}"/></td></tr>
+ <tr><td><g:submitToRemote action="asyncSearch" value="Search" update="[success:'searchResults',failure:'error']"/></td></tr>
</table>
</g:form>
<h2>Results</h2>
<div id="error"></div>
- <table>
- <thead>
- <tr>
- <td>Name</td>
- </tr>
- </thead>
- <tbody id="testdata">
- <tr><td>Not Searched Yet!</td></tr>
- </tbody>
- </table>
+ <div id="searchResults">
+ <p>Not searched yet!</p>
+ </div>
</body>
</html>
@@ -3,6 +3,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta name="layout" content="main" />
<title>TestMethod ${testMethodInstance.name}</title>
</head>
<body>
@@ -5,6 +5,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta name="layout" content="main" />
<title>Search TestMethods</title>
<g:javascript library="prototype" />
</head>
Oops, something went wrong.

0 comments on commit f296ad7

Please sign in to comment.