Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ksamykandil committed Sep 3, 2014
2 parents 1578e52 + 6434c82 commit 79e0336
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 19 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@ Why RESTFiddle?

We all usually work as a team- be it software development or testing. What consumes most of your time while working in a group? Collaboration. You need to share stuff with your colleague. It is a painful exercise with a lot of limitations and doesn't work seamlessly.

How does RESTFiddle help you?
##### How does RESTFiddle help you?

We are in the process of implementing access-control module which will give you the option to share workspace/project with others in which the whole team can work on a shared workspace.
If you are developing or testing REST APIs, it will help you do that with ease. It will let a team or multiple teams work together effortlessly. You just have to focus on your APIs. Rest all is taken care by the tool.

Suppose if you are developing or testing REST APIs, it will help you do that with ease. It will let a team or multiple teams work together effortlessly. You just have to focus on your APIs. Rest all is taken care by the tool.
Time is valuable, so productivity is important. We have crafted RESTFiddle to avoid you fiddling with sharing or collaboration work and increase your productivity!

As the output of the build is a war file so it can also be deployed over any server and can be used as a cloud based hosted web application.
##### How to Collaborate?

We are in the process of implementing access-control module which will give you the option to share workspace/project with others in which the whole team can work on a shared workspace.

Time is valuable, so productivity is important. We have crafted RESTFiddle to avoid you fiddling with sharing or collaboration work and increase your productivity!
##### Cloud support?

As the output of the build is a war file so it can be deployed over any server and can also be used as a cloud based hosted web application.

Initial Design
==========
Expand Down Expand Up @@ -61,7 +64,7 @@ Default username/password : rf/rf
##### Debug

```
mvnDebug spring-boot:run
mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
```

Note : To avoid java.lang.OutOfMemoryError: PermGen space, use the following command:
Expand Down Expand Up @@ -147,6 +150,10 @@ You're interested in contributing to RESTFiddle? AWESOME. Here are the basic ste
- Forking a repo - https://help.github.com/articles/fork-a-repo
- Creating a pull request - https://help.github.com/articles/creating-a-pull-request
- Syncing a fork - https://help.github.com/articles/syncing-a-fork

##### Google Group :

https://groups.google.com/forum/#!forum/restfiddle

Release Date
==========
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package com.restfiddle.controller.rest;

import java.util.Iterator;
import java.util.List;

import javax.annotation.Resource;
Expand Down Expand Up @@ -91,14 +92,19 @@ Project create(@PathVariable("workspaceId") Long workspaceId, @RequestBody Proje

@RequestMapping(value = "/api/workspaces/{workspaceId}/projects/{id}", method = RequestMethod.DELETE, headers = "Accept=application/json")
public @ResponseBody
Project delete(@PathVariable("workspaceId") Long workspaceId, @PathVariable("id") Long id) {
void delete(@PathVariable("workspaceId") Long workspaceId, @PathVariable("id") Long id) {
logger.debug("Deleting project with id: " + id);

Project deleted = projectRepository.findOne(id);

List<BaseNode> listOfNodes = nodeRepository.findNodesFromAProject(id);

for (BaseNode baseNode : listOfNodes) {
baseNode.setProject(null);
}
nodeRepository.delete(listOfNodes);

projectRepository.delete(deleted);

return deleted;
}

@RequestMapping(value = "/api/workspaces/{workspaceId}/projects", method = RequestMethod.GET)
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ ul.fancytree-container {
color: gray;
}

#tree{
height:100%;
}

.apiRequestType {

}
Expand Down
29 changes: 26 additions & 3 deletions src/main/resources/static/js/views/tree-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define(function(require) {
var ConversationEvents = require('events/conversation-event');
var ConversationModel = require('models/conversation');
var NodeModel = require('models/node');
var tree = {}
var tree = {};

$("#requestBtn").bind("click", function() {
$("#requestModal").find("#source").val("request");
Expand All @@ -18,10 +18,22 @@ define(function(require) {
$("#saveAsConversationBtn").bind("click", function() {
$("#requestModal").find("#source").val("conversation");
$("#requestModal").modal("show");
})
});

$("#expandAllNodes").bind("click", function() {
$("#tree").fancytree("getRootNode").visit(function(node){
node.setExpanded(true);
});
});

$("#collapseAllNodes").bind("click", function() {
$("#tree").fancytree("getRootNode").visit(function(node){
node.setExpanded(false);
});
});

$("#createNewRequestBtn").bind("click", function() {
var conversation = null
var conversation = null;
if ($("#requestModal").find("#source").val() == 'request') {
conversation = new ConversationModel({});

Expand Down Expand Up @@ -112,14 +124,25 @@ define(function(require) {
$('.rf-col-2').css('left', '0%');
$('.rf-col-3').css('left', '33%');
$('.rf-col-3').removeClass('col-xs-6').addClass("col-xs-8");
$('#col1-toggle-icon').removeClass('fa-angle-double-left').addClass("fa-angle-double-right");

}, function() {
$('.rf-col-1').show();
$('.rf-col-2').css('left', '17%');
$('.rf-col-3').css('left', '50%');
$('.rf-col-3').removeClass('col-xs-8').addClass("col-xs-6");
$('#col1-toggle-icon').removeClass('fa-angle-double-right').addClass("fa-angle-double-left");
});
$('.header-toggle-btn').toggle(function() {
$('.navbar-fixed-top').hide();
$('body').css('padding-top', '0px');
$('#header-toggle-icon').removeClass('fa-angle-double-up').addClass("fa-angle-double-down");

}, function() {
$('.navbar-fixed-top').show();
$('body').css('padding-top', '50px');
$('#header-toggle-icon').removeClass('fa-angle-double-down').addClass("fa-angle-double-up");
});
$("#tree").fancytree(
{
extensions : [ "glyph" ],
Expand Down
77 changes: 70 additions & 7 deletions src/main/webapp/WEB-INF/jsp/home.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<button class="btn btn-default" type="button" data-toggle="dropdown">
<span class='glyphicon glyphicon-align-justify'></span>
</button>
<ul class="dropdown-menu">
<ul class="dropdown-menu" style="width:250px;">
<li><a href="#" data-toggle="modal" data-target="#workspaceModal">New Workspace</a></li>
<li><a href="#" id="switchWorkSpace" class="dummySwitchWorkspace">Switch Workspace</a></li>
<li class="divider"></li>
Expand All @@ -44,7 +44,10 @@
<li class="divider"></li>
<li><a href="#" data-toggle="modal" data-target="#comingSoon">Global Settings</a></li>
<li class="divider"></li>
<li><a href="#" class="col-1-toggle-btn">Toggle Left Panel</a></li>
<li><a href="#" data-toggle="modal" data-target="#updateProfileModal">Update Profile</a></li>
<li><a href="#" data-toggle="modal" data-target="#changePasswordModal">Change Password</a></li>
<li class="divider"></li>
<li><a href="#" data-toggle="modal" data-target="#collaboratorModal">New Collaborator</a></li>
</ul>
</div>
<a class="navbar-brand" href="#">RESTFiddle</a>
Expand Down Expand Up @@ -134,7 +137,7 @@
<div class="col-xs-4 rf-col-2" style="left: 17%; height: 100%; position: fixed; overflow-y: scroll;">
<br>
<button class="btn btn-default btn-sm col-1-toggle-btn">
<i class="fa fa-angle-double-left"></i>
<i id="col1-toggle-icon" class="fa fa-angle-double-left"></i>
</button>
&nbsp;&nbsp;
<div class="btn-group">
Expand All @@ -147,8 +150,8 @@
More&nbsp;&nbsp;<span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right">
<li><a style="font-size: 12px;" data-toggle="modal" data-target="#comingSoon">Expand All</a></li>
<li><a style="font-size: 12px;" data-toggle="modal" data-target="#comingSoon">Collapse All</a></li>
<li><a style="font-size: 12px;" data-toggle="modal" id="expandAllNodes">Expand All</a></li>
<li><a style="font-size: 12px;" data-toggle="modal" id="collapseAllNodes">Collapse All</a></li>
<li class="divider"></li>
<li><a style="font-size: 12px;" data-toggle="modal" data-target="#comingSoon">Sort</a></li>
<li><a style="font-size: 12px;" data-toggle="modal" data-target="#comingSoon">Filter</a></li>
Expand Down Expand Up @@ -210,8 +213,8 @@
<button class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-star"></span>&nbsp;Star
</button>
<button class="btn btn-default btn-sm pull-right" data-toggle="tooltip" data-placement="left" title="Hide the header">
<i class="fa fa-angle-double-up"></i>
<button class="btn btn-default btn-sm pull-right header-toggle-btn" data-toggle="tooltip" data-placement="left">
<i id="header-toggle-icon" class="fa fa-angle-double-up"></i>
</button>
<br> <br>
<div>
Expand Down Expand Up @@ -320,6 +323,62 @@
</div>
</div>
</div>
<div class="modal fade" id="updateProfileModal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title" id="myModalLabel">Update Profile</h4>
</div>
<div class="modal-body">
<input type="text" id="profileName" class="form-control" placeholder="Enter Name"> <br>
<input type="text" id="profileEmail" class="form-control" placeholder="Enter Email"> <br>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="createNewFolderBtn">Save changes</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="changePasswordModal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title" id="myModalLabel">Change Password</h4>
</div>
<div class="modal-body">
<input type="text" id="profileName" class="form-control" placeholder="Enter Old Password"> <br>
<input type="text" id="profileEmail" class="form-control" placeholder="Enter New Password"> <br>
<input type="text" id="profileEmail" class="form-control" placeholder="Retype New Password"> <br>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="createNewFolderBtn">Save changes</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="collaboratorModal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title" id="myModalLabel">New Collaborator</h4>
</div>
<div class="modal-body">
<input type="text" id="profileName" class="form-control" placeholder="Enter Name"> <br>
<input type="text" id="profileEmail" class="form-control" placeholder="Enter Email"> <br>
<input type="text" id="profileEmail" class="form-control" placeholder="Enter Password"> <br>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="createNewFolderBtn">Save changes</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="workspaceModal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
Expand All @@ -331,6 +390,7 @@
<input type="text" id="workspaceTextField" class="form-control" placeholder="Enter Workspace Name"> <br>
<textarea id="workspaceTextArea" class="form-control" rows="3" placeholder="Enter Description"></textarea>
<br>
<!--
<div>
<label class="radio-inline"> <input type="radio" name="workspaceRadioOptions" id="privateWorkspace" value="private"><span>&nbsp;Private</span>
</label> <label class="radio-inline"> <input type="radio" name="workspaceRadioOptions" id="restrictedWorkspace" value="restricted"
Expand All @@ -339,6 +399,7 @@
</label>
</div>
<br> <input type="text" id="workspace-share-tags" class="demo-default" value="Core Engg Team, QA Team, Ranjan">
-->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
Expand All @@ -358,13 +419,15 @@
<input type="text" id="projectTextField" class="form-control" placeholder="Enter Project Name"> <br>
<textarea id="projectTextArea" class="form-control" rows="3" placeholder="Enter Description"></textarea>
<br>
<!--
<div>
<label class="radio-inline"> <input type="radio" name="projectRadioOptions" id="privateProject" value="private"><span>&nbsp;Private</span>
</label> <label class="radio-inline"> <input type="radio" name="projectRadioOptions" id="restrictedProject" value="restricted" checked="checked">&nbsp;Restricted
</label><label class="radio-inline"> <input type="radio" name="projectRadioOptions" id="publicProject" value="public">&nbsp;Public
</label>
</div>
<br> <input type="text" id="project-share-tags" class="demo-default" value="Core Engg Team, QA Team, Ranjan">
-->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
Expand Down

0 comments on commit 79e0336

Please sign in to comment.