Skip to content

Commit

Permalink
POC-5
Browse files Browse the repository at this point in the history
  • Loading branch information
mohigup committed Mar 12, 2016
1 parent c8bfe94 commit 66c7a89
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 20 deletions.
7 changes: 5 additions & 2 deletions public/project/services/git.service.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
findRepoStatistics:findRepoStatistics,
findCommitsBySHA:findCommitsBySHA
};
var url = "";

return api;

Expand All @@ -25,9 +26,11 @@
.success(callback);
}



function findRepoStatistics(reponame,callback){
var url = DETAILS_URL
.replace("REPONAME", reponame)
url = DETAILS_URL
.replace("REPONAME", reponame);
console.log("finding stats by uRL "+ url)
$http.get(url)
.success(callback);
Expand Down
12 changes: 8 additions & 4 deletions public/project/views/details/details.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
var repo_name = $routeParams.user_name+"/"+$routeParams.repo_name;
console.log(repo_name);

function init() {
fetchRepStats(repo_name);
}
init();
fetchRepStats(repo_name);



//init();

function fetchRepStats(repo_name) {
GitIntService.findRepoStatistics(repo_name, renderDetails);
Expand All @@ -27,5 +28,8 @@
console.log(response);
vm.details = response;
}



}
})();
6 changes: 2 additions & 4 deletions public/project/views/details/details.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ <h3>Actors</h3>
-->



<h1> Last year of commit activity grouped by Week.</h1>
Refresh the page if no data is seen
<table class="table table-striped">
<table class="table table-striped" >
<thead>
<tr>
<th> Week</th>
Expand Down Expand Up @@ -74,4 +72,4 @@ <h1> Last year of commit activity grouped by Week.</h1>
</td>
</tr>
</tbody>
</table>
</table>
9 changes: 8 additions & 1 deletion public/project/views/forms/forms.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
FormService.findAllFormsForUser($rootScope.user._id,renderUserForms);
}


$scope.selectedIssue= null;
$scope.addForm = addForm;
$scope.selectForm = selectForm;
$scope.unselectIssue = unselectIssue;
$scope.deleteForm = deleteForm;
$scope.updateForm = updateForm;

Expand Down Expand Up @@ -59,6 +60,12 @@
$scope.index = index;
var selectedForm = $scope.issues[index];
$scope.issue = selectedForm;
$scope.selectedIssue = true;
}

function unselectIssue(issue){
$scope.issue = null;
$scope.selectedIssue = null;
}

function deleteForm(index){
Expand Down
18 changes: 12 additions & 6 deletions public/project/views/forms/forms.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@ <h1>Issues Tracker</h1>
<td><input type="text" class="form-control" ng-model="issue.status" id="status" placeholder="Status"></td>
<td><input type="text" class="form-control" ng-model="issue.title" id="title" placeholder="Title"></td>
<td><input type="text" class="form-control" ng-model="issue.desc" id="desc" placeholder="Desc"></td>
<td><input type="date" class="form-control" ng-model="issue.Reported_On" ></td>
<td><input type="text" class="form-control" ng-model="issue.Reported_On" ></td>
<td><input type="text" class="form-control" ng-model="issue.email_id" id="email_id" placeholder="Email"></td>
<td class="form-icons">
<div class="g-icons">
<td class="form-icons" nowrap="true">
<!--<div class="g-icons">
<a ng-click="addForm(issue)" class="btn btn-primary">
Add</a>
<a ng-click="updateForm(issue)" class="btn btn-primary btn-success">Update</a>
</div>
</div>-->

<a ng-show="selectedIssue" ng-click="unselectIssue()" class="glyphicon glyphicon-remove btn btn-danger"></a>
<a ng-hide="selectedIssue" ng-click="addForm(issue)" class="glyphicon glyphicon-plus btn btn-primary"></a>
<a ng-show="selectedIssue" ng-click="updateForm(issue)" class="glyphicon glyphicon-ok btn btn-success"></a>
</td>
</td>

</tr>
Expand All @@ -42,12 +47,13 @@ <h1>Issues Tracker</h1>
<td>{{issue.email_id}}</a></td>
<td class="form-icons">
<div class="g-icons">
<button ng-click="deleteForm($index)" class="btn btn-danger">Remove</button>
<button ng-click="selectForm($index)" ng-model="index" class="btn btn-info">Select</button>
<button ng-click="deleteForm($index)" class="glyphicon glyphicon-remove btn btn-danger"></button>
<button ng-click="selectForm($index)" ng-model="index" class="glyphicon glyphicon-pencil btn btn-info"></button>
</div>
</td>

</tr>
</tr>


</tbody>
Expand Down
6 changes: 3 additions & 3 deletions public/project/views/search/search.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
// $scope.movieTitle = "Star Wars";
console.log("Inside SearchController");

init();
// init();

function init() {
// function init() {
var uname = $routeParams.title;
console.log("movieTitle"+uname);
if(uname) {
console.log("Inside SearchController INIT");
fetchRepo(uname);
}
}
//}


function fetchRepo(uname) {
Expand Down

0 comments on commit 66c7a89

Please sign in to comment.