Skip to content

Commit

Permalink
Fit to smaller screen + reduced column size for certain fields
Browse files Browse the repository at this point in the history
  • Loading branch information
asurendra authored and asurendra committed Feb 19, 2016
1 parent 04a6a12 commit 50024a5
Show file tree
Hide file tree
Showing 24 changed files with 167 additions and 130 deletions.
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,20 @@
<version>3.9</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public String requirementUpload(Model model, HttpServletRequest request, HttpSes
childReq.setSlug(BizUtil.INSTANCE.getSlug());
}

String rName = BizUtil.INSTANCE.validateInput(df.formatCellValue(row.getCell(1)), 90);
String rName = BizUtil.INSTANCE.validateInput(df.formatCellValue(row.getCell(1)), 45);
String rPriority = BizUtil.INSTANCE.validateInput(df.formatCellValue(row.getCell(2)), 45);
if (!BizUtil.INSTANCE.checkReqPriority(rPriority)) {
priorityError = true;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/deem/excord/domain/EcHistory.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class EcHistory implements Serializable {
private Date changeDate;
@Column(name = "change_summary")
private String changeSummary;
@Size(max = 90)
@Size(max = 45)
@Column(name = "change_ip")
private String changeIp;
@Size(max = 45)
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/deem/excord/domain/EcRequirement.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class EcRequirement implements Serializable {
@Basic(optional = false)
@Column(name = "id")
private Long id;
@Size(max = 90)
@Size(max = 45)
@Column(name = "name")
private String name;
@Column(name = "story_point")
Expand All @@ -42,10 +42,10 @@ public class EcRequirement implements Serializable {
private String status;
@Column(name = "coverage")
private Boolean coverage;
@Size(max = 90)
@Size(max = 45)
@Column(name = "release_name")
private String releaseName;
@Size(max = 90)
@Size(max = 45)
@Column(name = "product")
private String product;
@Size(max = 45)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/deem/excord/domain/EcTestfolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class EcTestfolder implements Serializable {
private Long id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 90)
@Size(min = 1, max = 45)
@Column(name = "name")
private String name;
@Size(max = 45)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/deem/excord/domain/EcTestplan.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class EcTestplan implements Serializable {
private Long id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 90)
@Size(min = 1, max = 45)
@Column(name = "name")
private String name;
@Basic(optional = false)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/deem/excord/domain/EcTestresult.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class EcTestresult implements Serializable {
@Size(min = 1, max = 20)
@Column(name = "status")
private String status;
@Size(max = 90)
@Size(max = 45)
@Column(name = "environment")
private String environment;
@Basic(optional = false)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/deem/excord/domain/EcTestupload.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class EcTestupload implements Serializable {
@Basic(optional = false)
@Column(name = "id")
private Long id;
@Size(max = 90)
@Size(max = 45)
@Column(name = "caption")
private String caption;
@Basic(optional = false)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/deem/excord/domain/EcUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ public class EcUser implements Serializable {
@Size(min = 1, max = 45)
@Column(name = "username")
private String username;
@Size(max = 90)
@Size(max = 45)
@Column(name = "name")
private String name;
@Size(max = 45)
@Column(name = "password")
private String password;
@Pattern(regexp = "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message = "Invalid email")//if the field contains email address consider using this annotation to enforce field validation
@Size(max = 90)
@Size(max = 45)
@Column(name = "email")
private String email;
@Size(max = 10)
Expand Down
21 changes: 21 additions & 0 deletions src/main/resources/db/migration/V6__ChangeSet4.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';

ALTER TABLE `excord`.`ec_history` CHANGE COLUMN `change_ip` `change_ip` VARCHAR(45) NULL DEFAULT NULL ;

ALTER TABLE `excord`.`ec_requirement` CHANGE COLUMN `name` `name` VARCHAR(45) NULL DEFAULT NULL , CHANGE COLUMN `release_name` `release_name` VARCHAR(45) NULL DEFAULT NULL , CHANGE COLUMN `product` `product` VARCHAR(45) NULL DEFAULT NULL ;

ALTER TABLE `excord`.`ec_testfolder` CHANGE COLUMN `name` `name` VARCHAR(45) NOT NULL ;

ALTER TABLE `excord`.`ec_testplan` CHANGE COLUMN `name` `name` VARCHAR(45) NOT NULL ;

ALTER TABLE `excord`.`ec_testresult` CHANGE COLUMN `environment` `environment` VARCHAR(45) NULL DEFAULT NULL ;

ALTER TABLE `excord`.`ec_testupload` CHANGE COLUMN `caption` `caption` VARCHAR(45) NULL DEFAULT NULL ;

ALTER TABLE `excord`.`ec_user` CHANGE COLUMN `name` `name` VARCHAR(45) NULL DEFAULT NULL , CHANGE COLUMN `email` `email` VARCHAR(45) NULL DEFAULT NULL ;

SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
5 changes: 0 additions & 5 deletions src/main/resources/public/css/extensioncord.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ body {
max-height: 620px;
}

.wrap-table{
table-layout: fixed;
word-wrap: break-word;
}

/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/public/js/custom/testcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ $(document).ready(function () {
var folderPath = $("#breadCrumbPath").val();
bootbox.prompt("Parent folder path: " + folderPath + ",<br/> Please enter folder name:", function (result) {
if (result !== null) {
if (result.length > 45) {
result = result.substr(0, 45);
}
$("#folderName").val(result);
$("#testcaseForm").attr("action", "/testcase_addfolder");
$("#testcaseForm").submit();
Expand Down Expand Up @@ -125,6 +128,9 @@ $(document).ready(function () {
title: "Enter folder name",
callback: function (result) {
if (result !== null) {
if (result.length > 45) {
result = result.substr(0, 45);
}
$("#newNodeName").val(result);
$("#testcaseForm").attr("action", "/testcase_renamefolder");
$("#testcaseForm").submit();
Expand Down
13 changes: 8 additions & 5 deletions src/main/resources/templates/history.ftl.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h3>Top Changes</h3>

<div class="form-group">
<div class="col-md-10">
<input type="text" name="searchKey" value="<#if searchKey??>${searchKey}</#if>" class="form-control" required>
<input type="text" name="searchKey" value="<#if searchKey??>${searchKey}</#if>" class="form-control" placeholder="Search Summary Or Slug" required>
</div>
<div class="col-md-2">
<button type="submit" name="action" value="searchhistory" class="btn btn-primary btn-block">Search History</button>
Expand All @@ -28,8 +28,7 @@ <h3>Top Changes</h3>
<tr>
<th>ID</th>
<th>Date</th>
<th>User</th>
<th>From</th>
<th>Details</th>
<th>Slug</th>
<th>Summary</th>
</tr>
Expand All @@ -39,8 +38,12 @@ <h3>Top Changes</h3>
<tr>
<td>${history.id}</td>
<td>${history.changeDate}</td>
<td>${history.changeUser}</td>
<td>${history.changeIp}</td>
<td>
<b>By:</b>${history.changeUser}
<br/>
<b>From:</b>${history.changeIp}
<br/>
</td>
<td>${history.slug}</td>
<td>${history.changeSummary}</td>
</tr>
Expand Down
10 changes: 7 additions & 3 deletions src/main/resources/templates/requirement.ftl.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,17 @@
<th>Coverage Percentage</th>
<td>${coveragePercentage}%</td>
</tr>
<tr>
<th>Slug</th>
<td>${currReq.slug}</td>
<th>&nbsp;</th>
<td>&nbsp;</td>
</tr>
<tr>
<th>
Associated Testcases
</th>
<td>
<td colspan="3">
<#assign inc = 0/>
<#list tcrLst as tcr>
<#assign inc = inc + 1/>
Expand All @@ -125,8 +131,6 @@
<br/><br/>
</#list>
</td>
<th>Slug</th>
<td>${currReq.slug}</td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/requirement_form.ftl.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h3>Requirement</h3>
Requirement Name<font color="red">*</font>
</label>
<div class="col-md-4">
<input class="form-control" name="rname" value="<#if req??>${req.name}</#if>" maxlength="90" required/>
<input class="form-control" name="rname" value="<#if req??>${req.name}</#if>" maxlength="45" required/>
<input type="hidden" name="reqId" value="<#if req??>${req.id}</#if>"/>
</div>
<label for="rpriority" class="col-md-1 control-label">
Expand Down
27 changes: 14 additions & 13 deletions src/main/resources/templates/search.ftl.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ <h3>Search Testcase</h3>
</div>
</div>
<div class="form-group">
<div class="col-md-8">
<div class="col-md-10">
<input type="text" name="searchKey" value="<#if searchKey??>${searchKey}</#if>" class="form-control" placeholder="Search Testcase Name Or Description" required>
</div>
<div class="col-md-4">
<div class="col-md-2">
<button type="submit" name="action" value="searchtestcase" class="btn btn-primary btn-block">Search Testcase</button>
</div>
<br/>
Expand All @@ -23,14 +23,11 @@ <h3>Search Testcase</h3>
<#if testCaseLst??>
<div class="row">
<div class="col-md-12">
<table id="testcase-ele" class="table table-striped table-bordered wrap-table" width="100%" cellspacing="0">
<table id="testcase-ele" class="table table-striped table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th width="5%">Testcase ID</th>
<th width="15%">Product</th>
<th width="15%">Test Folder</th>
<th>Test Name</th>
<th>Description</th>
<th>Id</th>
<th>Details</th>
</tr>
</thead>
<tbody>
Expand All @@ -40,15 +37,19 @@ <h3>Search Testcase</h3>
${tc.id?c}
</td>
<td>
${tc.product}
</td>
<td>
<b>Product:</b>${tc.product}
<br/>
<b>Folder:</b>
<a href="/testcase?nodeId=${tc.folderId.id?c}">
${tc.folderId.name}
</a>
<br/><br/>
<b>Name:</b>
<a href="/testcase_edit?testcaseId=${tc.id?c}">${tc.name}</a>
<br/>
<b>Description:</b>
${tc.description?html}
</td>
<td><a href="/testcase_edit?testcaseId=${tc.id?c}">${tc.name}</a></td>
<td>${tc.description?html}</td>
</tr>
</#list>

Expand Down
33 changes: 17 additions & 16 deletions src/main/resources/templates/testcase.ftl.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@
<#list nodeLst as node>
&nbsp;
<#if childNodeLst?seq_contains(node.id)>
<span class="fa fa-folder"></span>
<span class="fa fa-folder">&nbsp;<a href="/testcase?nodeId=${node.id?c}">${node.name}</a></span>
<#else>
<span class="fa fa-folder-o"></span>
<span class="fa fa-folder-o">&nbsp;<a href="/testcase?nodeId=${node.id?c}">${node.name}</a></span>
</#if>
<a href="/testcase?nodeId=${node.id?c}">${node.name}</a>
<br/>
</#list>
</div>
Expand All @@ -84,11 +83,9 @@
<thead>
<tr>
<th><input type="checkbox" id="checkAll"/></th>
<th>Testcase ID</th>
<th>Test Plans</th>
<th>Requirement</th>
<th>Test Name</th>
<th>Fields</th>
<th>Id</th>
<th>Links</th>
<th>Details</th>
</tr>
</thead>
<tbody>
Expand All @@ -101,16 +98,19 @@
<a href="#" class="teststepShow" id="${tc.id?c}">${tc.id?c} &nbsp;<i class="fa fa-sort-desc"></i></a>
</td>
<td>
Test Plans:
<br/>
<#assign inc = 0/>
<#list tptcmapLst as tptc>
<#if tptc.testcaseId.id == tc.id>
<#assign inc = inc + 1/>
${inc}. <a href="/testplan_view?testplanId=${tptc.testplanId.id}">${tptc.testplanId.name}</a>
${inc}.<a href="/testplan_view?testplanId=${tptc.testplanId.id}">${tptc.testplanId.name}</a>
<br/>
</#if>
</#list>
</td>
<td>
<br/><br/>
Requirements:
<br/>
<#assign inc = 0/>
<#assign review = 'false'/>
<#list tcreqmapLst as tcr>
Expand All @@ -119,13 +119,15 @@
<#if tcr.review?c == 'true'>
<#assign review = 'true'/>
</#if>
${inc}. <a href="/requirement?reqId=${tcr.requirementId.id}">${tcr.requirementId.name}</a>
${inc}.<a href="/requirement?reqId=${tcr.requirementId.id}">${tcr.requirementId.name}</a>
<br/>
</#if>
</#list>
</td>
<td style="word-break:break-all;"><a href="/testcase_edit?testcaseId=${tc.id?c}">${tc.name}</a></td>
<td>
<td style="word-break:break-all;">
<b>Name:</b>
<a href="/testcase_edit?testcaseId=${tc.id?c}">${tc.name}</a>
<br><br>
<#if review == 'true'>
<span class="label label-danger">Requirement Updated!</span>
<br/><br/>
Expand All @@ -135,11 +137,10 @@
<b>Priority:</b> ${tc.priority}
<br/>
<b>Automated:</b> ${tc.automated?c}

</td>
</tr>
<tr>
<td colspan="6">
<td colspan="4">
<div id="tcstep_${tc.id?c}"></div>
</td>
</tr>
Expand Down
Loading

0 comments on commit 50024a5

Please sign in to comment.