mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 14:47:38 +01:00
continuous updates for UI
This commit is contained in:
parent
44a8e5d578
commit
8d07275040
@ -86,3 +86,13 @@
|
||||
.each-tab-pane {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.inline-block {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.datetime-picker-title {
|
||||
float: left;
|
||||
line-height: 2.5em;
|
||||
margin: 0 0.5em 0 0;
|
||||
}
|
||||
|
@ -5,7 +5,8 @@
|
||||
angular
|
||||
.module('harbor.details')
|
||||
.config(routeConfig)
|
||||
.filter('name', nameFilter);
|
||||
.filter('name', nameFilter)
|
||||
.filter('dateL', localizeDate);
|
||||
|
||||
function routeConfig($routeProvider) {
|
||||
$routeProvider
|
||||
@ -51,4 +52,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
function localizeDate() {
|
||||
return filter;
|
||||
|
||||
function filter(input, pattern) {
|
||||
return moment(new Date(input || '')).format(pattern);
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
@ -14,7 +14,7 @@
|
||||
vm.closeRetrievePane = closeRetrievePane;
|
||||
|
||||
$scope.$on('selectedProjectId', function(e, val) {
|
||||
$scope.$broadcast('currentProjectId',val);
|
||||
$scope.$broadcast('currentProjectId', val);
|
||||
});
|
||||
|
||||
ListProjectService({'isPublic' : 0, 'projectName' : ''})
|
||||
|
@ -11,7 +11,7 @@
|
||||
<div class="project-list pane-container">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item" ng-repeat="item in vm.projects | name: vm.filterInput: 'Name'" ng-click="vm.selectItem(item)">
|
||||
<span ng-show="item.ProjectId == vm.selectedId" class="glyphicon glyphicon-ok project-selected"></span> <a href="/ng/repository#/repositories?project_id=//item.ProjectId//">//item.Name//</a>
|
||||
<span ng-show="item.ProjectId == vm.selectedId" class="glyphicon glyphicon-ok project-selected"></span> <a href="/ng/repository#/repositories">//item.Name//</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -11,21 +11,19 @@
|
||||
function RetrieveProjectsController($scope, nameFilter) {
|
||||
var vm = this;
|
||||
|
||||
vm.selectItem = selectItem;
|
||||
vm.filterInput = "";
|
||||
|
||||
$scope.$watch('vm.selectedProject', function(current, origin) {
|
||||
if(current) {
|
||||
var projectId = current.ProjectId;
|
||||
vm.selectedId = projectId;
|
||||
vm.selectedId = current.ProjectId;
|
||||
}
|
||||
});
|
||||
|
||||
vm.filterInput = "";
|
||||
vm.selectItem = selectItem;
|
||||
|
||||
function selectItem(item) {
|
||||
vm.selectedId = item.ProjectId;
|
||||
vm.selectedProject = item;
|
||||
vm.isOpen = false;
|
||||
$scope.$emit('selectedProjectId', vm.selectedId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -39,6 +37,7 @@
|
||||
'isOpen': '=',
|
||||
'selectedProject': '='
|
||||
},
|
||||
link: link,
|
||||
replace: true,
|
||||
controller: RetrieveProjectsController,
|
||||
bindToController: true,
|
||||
@ -46,6 +45,10 @@
|
||||
}
|
||||
|
||||
return directive;
|
||||
|
||||
function link(scope, element, attrs, ctrl) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
@ -15,11 +15,11 @@
|
||||
vm.isOpen = val;
|
||||
});
|
||||
|
||||
$scope.$watch('vm.selectedProject', function(current, origin) {
|
||||
if(current){
|
||||
vm.projectName = current.Name;
|
||||
}
|
||||
});
|
||||
// $scope.$watch('vm.selectedProject', function(current, origin) {
|
||||
// if(current){
|
||||
// vm.projectName = current.Name;
|
||||
// }
|
||||
// });
|
||||
|
||||
vm.switchPane = switchPane;
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
vm.isOpen = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function switchPaneProjects() {
|
||||
@ -41,6 +42,7 @@
|
||||
'selectedProject': '=',
|
||||
'isOpen': '='
|
||||
},
|
||||
link: link,
|
||||
controller: SwitchPaneProjectsController,
|
||||
controllerAs: 'vm',
|
||||
bindToController: true
|
||||
@ -48,6 +50,15 @@
|
||||
|
||||
return directive;
|
||||
|
||||
function link(scope, element, attrs, ctrl) {
|
||||
scope.$watch('vm.selectedProject', function(current, origin) {
|
||||
if(current){
|
||||
scope.$emit('selectedProjectId', current.ProjectId);
|
||||
ctrl.projectName = current.Name;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})();
|
@ -18,15 +18,28 @@
|
||||
<div class="form-group">
|
||||
<label for="">Duration:</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
From:
|
||||
<input type="text" id="fromdatepicker" readonly="readonly">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
|
||||
To:
|
||||
<input type="text" id="todatepicker" readonly="readonly">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
|
||||
<div class="form-group inline-block col-md-5">
|
||||
<span class="datetime-picker-title">From:</span>
|
||||
<!--date-picker picked-date="vm.fromDate"></date-picker-->
|
||||
<div class="input-group datetimepicker">
|
||||
<input id="fromDatePicker" class="form-control" type="text" readonly="readonly" ng-model="vm.fromDate" ng-change="vm.pickUp({key:'fromDate', value: vm.fromDate})">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group inline-block col-md-5">
|
||||
<span class="datetime-picker-title">To:</span>
|
||||
<div class="input-group datetimepicker">
|
||||
<input id="toDatePicker" class="form-control" type="text" readonly="readonly" ng-model="vm.toDate" ng-change="vm.pickUp({key:'toDate', value: vm.toDate})">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-xs-2 col-md-2">
|
||||
|
@ -19,6 +19,7 @@
|
||||
vm.opPush = true;
|
||||
vm.opDelete = true;
|
||||
vm.opOthers = true;
|
||||
vm.others = "";
|
||||
|
||||
vm.op = [];
|
||||
vm.op.push('all');
|
||||
@ -47,10 +48,25 @@
|
||||
if(vm.opDelete) {
|
||||
vm.op.push('delete');
|
||||
}
|
||||
if(vm.opOthers) {
|
||||
if(vm.opOthers && vm.others != "") {
|
||||
vm.op.push(vm.others);
|
||||
}
|
||||
}
|
||||
|
||||
vm.pickUp = pickUp;
|
||||
|
||||
function pickUp(e) {
|
||||
switch(e.key){
|
||||
case 'fromDate':
|
||||
vm.fromDate = e.value;
|
||||
break;
|
||||
case 'toDate':
|
||||
vm.toDate = e.value;
|
||||
break;
|
||||
}
|
||||
$scope.$apply();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function advancedSearch() {
|
||||
@ -61,13 +77,31 @@
|
||||
'isOpen': '=',
|
||||
'op': '=',
|
||||
'others': '=',
|
||||
'fromDate': '=',
|
||||
'toDate': '=',
|
||||
'search': '&'
|
||||
},
|
||||
'link': link,
|
||||
'controller': AdvancedSearchController,
|
||||
'controllerAs': 'vm',
|
||||
'bindToController': true
|
||||
};
|
||||
return directive;
|
||||
|
||||
function link(scope, element, attrs, ctrl) {
|
||||
element.find('.datetimepicker').datetimepicker({
|
||||
locale: 'en-US',
|
||||
ignoreReadonly: true,
|
||||
format: 'L',
|
||||
showClear: true
|
||||
});
|
||||
element.find('#fromDatePicker').on('blur', function(){
|
||||
ctrl.pickUp({'key': 'fromDate', 'value': $(this).val()});
|
||||
});
|
||||
element.find('#toDatePicker').on('blur', function(){
|
||||
ctrl.pickUp({'key': 'toDate', 'value': $(this).val()});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
@ -4,15 +4,15 @@
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="" ng-model="vm.username" size="30">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" ng-click="vm.search({username: vm.username})"><span class="glyphicon glyphicon-search"></span></button>
|
||||
<button class="btn btn-primary" type="button" ng-click="vm.search({op: vm.op, username: vm.username})"><span class="glyphicon glyphicon-search"></span></button>
|
||||
</span>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-link" type="button" ng-click="vm.advancedSearch()">Advanced Search</button>
|
||||
<button class="btn btn-link" type="button" ng-click="vm.showAdvancedSearch()">Advanced Search</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pane">
|
||||
<advanced-search ng-show="vm.isOpen" is-open="vm.isOpen" op="vm.op" others="vm.others" search='vm.aSearch({op: vm.op, others: vm.others})'></advanced-search>
|
||||
<advanced-search ng-show="vm.isOpen" is-open="vm.isOpen" op="vm.op" others="vm.others" search='vm.search({op: vm.op, username: vm.username})' from-date="vm.fromDate" to-date="vm.toDate"></advanced-search>
|
||||
<div class="sub-pane">
|
||||
<table class="table table-pane">
|
||||
<thead>
|
||||
@ -20,7 +20,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="log in vm.logs">
|
||||
<td>//log.Username//</td><td>//log.RepoName//</td><td>//log.Operation//</td><td>//log.OpTime//</td>
|
||||
<td>//log.Username//</td><td>//log.RepoName//</td><td>//log.Operation//</td><td>//log.OpTime | dateL : 'YYYY-MM-DD HH:mm:ss'//</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -6,12 +6,11 @@
|
||||
.module('harbor.log')
|
||||
.directive('listLog', listLog);
|
||||
|
||||
ListLogController.$inject = ['ListLogService', '$routeParams'];
|
||||
ListLogController.$inject = ['$scope','ListLogService'];
|
||||
|
||||
function ListLogController(ListLogService, $routeParams) {
|
||||
function ListLogController($scope, ListLogService) {
|
||||
var vm = this;
|
||||
vm.isOpen = false;
|
||||
vm.projectId = $routeParams.project_id;
|
||||
|
||||
vm.beginTimestamp = 0;
|
||||
vm.endTimestamp = 0;
|
||||
@ -19,45 +18,37 @@
|
||||
vm.username = "";
|
||||
|
||||
vm.op = [];
|
||||
vm.others = "";
|
||||
|
||||
|
||||
vm.search = search;
|
||||
vm.aSearch= aSearch;
|
||||
|
||||
vm.advancedSearch = advancedSearch;
|
||||
|
||||
|
||||
var queryParams = {
|
||||
'beginTimestamp' : vm.beginTimestamp,
|
||||
'endTimestamp' : vm.endTimestamp,
|
||||
'keywords' : vm.keywords,
|
||||
'projectId': vm.projectId,
|
||||
'username' : vm.username
|
||||
};
|
||||
|
||||
retrieve(queryParams);
|
||||
vm.showAdvancedSearch = showAdvancedSearch;
|
||||
|
||||
$scope.$watch('vm.projectId', function(current, origin) {
|
||||
if(current) {
|
||||
vm.queryParams = {
|
||||
'beginTimestamp' : vm.beginTimestamp,
|
||||
'endTimestamp' : vm.endTimestamp,
|
||||
'keywords' : vm.keywords,
|
||||
'projectId': current,
|
||||
'username' : vm.username
|
||||
};
|
||||
retrieve(vm.queryParams);
|
||||
}
|
||||
});
|
||||
function search(e) {
|
||||
queryParams.username = e.username;
|
||||
retrieve(queryParams);
|
||||
}
|
||||
|
||||
function aSearch(e) {
|
||||
if(e.op == 'all') {
|
||||
queryParams.keywords = '';
|
||||
if(e.op[0] == 'all') {
|
||||
vm.queryParams.keywords = '';
|
||||
}else {
|
||||
queryParams.keywords = e.op.join('/') ;
|
||||
vm.queryParams.keywords = e.op.join('/') ;
|
||||
}
|
||||
if(e.others != "") {
|
||||
queryParams.keywords += '/' + e.others;
|
||||
}
|
||||
queryParams.username = vm.username;
|
||||
vm.queryParams.username = e.username;
|
||||
|
||||
retrieve(queryParams);
|
||||
vm.queryParams.beginTimestamp = toUTCSeconds(vm.fromDate, 0, 0, 0);
|
||||
vm.queryParams.endTimestamp = toUTCSeconds(vm.toDate, 23, 59, 59);
|
||||
|
||||
retrieve(vm.queryParams);
|
||||
}
|
||||
|
||||
function advancedSearch() {
|
||||
function showAdvancedSearch() {
|
||||
if(vm.isOpen){
|
||||
vm.isOpen = false;
|
||||
}else{
|
||||
@ -71,13 +62,31 @@
|
||||
.catch(listLogFailed);
|
||||
}
|
||||
|
||||
|
||||
function listLogComplete(response) {
|
||||
vm.logs = response.data;
|
||||
}
|
||||
function listLogFailed(e){
|
||||
console.log('listLogFailed:' + e);
|
||||
}
|
||||
|
||||
function toUTCSeconds(date, hour, min, sec) {
|
||||
if(date == "") {
|
||||
return 0;
|
||||
}
|
||||
|
||||
var t = new Date(date);
|
||||
t.setHours(hour);
|
||||
t.setMinutes(min);
|
||||
t.setSeconds(sec);
|
||||
var utcTime = new Date(t.getUTCFullYear(),
|
||||
t.getUTCMonth(),
|
||||
t.getUTCDate(),
|
||||
t.getUTCHours(),
|
||||
t.getUTCMinutes(),
|
||||
t.getUTCSeconds());
|
||||
return utcTime.getTime() / 1000;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function listLog() {
|
||||
@ -85,6 +94,9 @@
|
||||
restrict: 'E',
|
||||
templateUrl: '/static/ng/resources/js/components/log/list-log.directive.html',
|
||||
replace: true,
|
||||
scope: {
|
||||
'projectId': '='
|
||||
},
|
||||
controller: ListLogController,
|
||||
controllerAs: 'vm',
|
||||
bindToController: true
|
||||
|
@ -22,6 +22,9 @@
|
||||
.success(addProjectMemberComplete)
|
||||
.error(addProjectMemberFailed);
|
||||
vm.isOpen = false;
|
||||
vm.username = "";
|
||||
vm.optRole = 1;
|
||||
vm.reload();
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
@ -43,7 +46,8 @@
|
||||
'restrict': 'E',
|
||||
'templateUrl': '/static/ng/resources/js/components/project-member/add-project-member.directive.html',
|
||||
'scope': {
|
||||
'isOpen': '='
|
||||
'isOpen': '=',
|
||||
'reload': '&'
|
||||
},
|
||||
'controller': AddProjectMemberController,
|
||||
'controllerAs': 'vm',
|
||||
|
@ -39,7 +39,7 @@
|
||||
DeleteProjectMemberService(e.projectId, e.userId)
|
||||
.success(editProjectMemberComplete)
|
||||
.error(editProjectMemberFailed);
|
||||
|
||||
vm.reload();
|
||||
}
|
||||
|
||||
function editProjectMemberComplete(data, status, headers) {
|
||||
@ -60,7 +60,8 @@
|
||||
'username': '=',
|
||||
'userId': '=',
|
||||
'roleName': '=',
|
||||
'projectId': '='
|
||||
'projectId': '=',
|
||||
'reload': '&'
|
||||
},
|
||||
'controller': EditProjectMemberController,
|
||||
'controllerAs': 'vm',
|
||||
|
@ -10,14 +10,14 @@
|
||||
<button class="btn btn-success" type="button" ng-click="vm.addProjectMember()"><span class="glyphicon glyphicon-plus"></span>Add Member</button>
|
||||
</div>
|
||||
<div class="pane">
|
||||
<add-project-member ng-show="vm.isOpen" is-open="vm.isOpen"></add-project-member>
|
||||
<add-project-member ng-show="vm.isOpen" is-open="vm.isOpen" reload='vm.search({projectId: vm.projectId, username: vm.username})'></add-project-member>
|
||||
<div class="sub-pane">
|
||||
<table class="table table-pane" >
|
||||
<thead>
|
||||
<th width="30%">Username</th><th width="40%">Role</th><th width="30%">Operation</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="pr in vm.projectMembers" edit-project-member username="pr.username" project-id="vm.projectId" user-id="pr.UserId" role-name="pr.Rolename"></tr>
|
||||
<tr ng-repeat="pr in vm.projectMembers" edit-project-member username="pr.username" project-id="vm.projectId" user-id="pr.UserId" role-name="pr.Rolename" reload='vm.search({projectId: vm.projectId, username: vm.username})'></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -6,21 +6,23 @@
|
||||
.module('harbor.project.member')
|
||||
.directive('listProjectMember', listProjectMember);
|
||||
|
||||
ListProjectMemberController.$inject = ['$scope', 'ListProjectMemberService', '$routeParams'];
|
||||
ListProjectMemberController.$inject = ['$scope', '$q', 'ListProjectMemberService'];
|
||||
|
||||
function ListProjectMemberController($scope, ListProjectMemberService, $routeParams) {
|
||||
function ListProjectMemberController($scope, $q, ListProjectMemberService) {
|
||||
var vm = this;
|
||||
|
||||
vm.projectId = $routeParams.project_id;
|
||||
|
||||
vm.isOpen = false;
|
||||
vm.username = "";
|
||||
|
||||
vm.search = search;
|
||||
vm.addProjectMember = addProjectMember;
|
||||
vm.retrieve = retrieve;
|
||||
|
||||
retrieve(vm.projectId , vm.username);
|
||||
|
||||
$scope.$watch('vm.projectId', function(current, origin) {
|
||||
if(current) {
|
||||
vm.retrieve(current , vm.username);
|
||||
}
|
||||
});
|
||||
|
||||
function search(e) {
|
||||
console.log('project_id:' + e.projectId);
|
||||
@ -56,12 +58,20 @@
|
||||
restrict: 'E',
|
||||
templateUrl: '/static/ng/resources/js/components/project-member/list-project-member.directive.html',
|
||||
replace: true,
|
||||
scope: {
|
||||
'projectId': '='
|
||||
},
|
||||
link: link,
|
||||
controller: ListProjectMemberController,
|
||||
controllerAs: 'vm',
|
||||
bindToController: true
|
||||
}
|
||||
|
||||
return directive;
|
||||
|
||||
function link(scope, element, attrs, ctrl) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="false">
|
||||
<div class="panel panel-default" ng-repeat="repo in vm.repositories | name: vm.filterInput : ''">
|
||||
<div class="panel panel-default" ng-repeat="repo in vm.repositories">
|
||||
<div class="panel-heading" role="tab" id="heading//$index + 1//" >
|
||||
<h4 class="panel-title">
|
||||
<a role="button" data-toggle="collapse" data-parent="#accordion" href="ng/repository#/repositories#collapse//$index + 1//" aria-expanded="true" aria-controls="collapse//$index + 1//" ng-click="vm.expand({repoName: repo})">
|
||||
|
@ -5,22 +5,31 @@
|
||||
.module('harbor.repository')
|
||||
.directive('listRepository', listRepository);
|
||||
|
||||
ListRepositoryController.$inject = ['$scope', 'ListRepositoryService', 'ListTagService', 'nameFilter', '$routeParams'];
|
||||
ListRepositoryController.$inject = ['$scope', '$q', 'ListRepositoryService', 'ListTagService', 'nameFilter'];
|
||||
|
||||
function ListRepositoryController($scope, ListRepositoryService, ListTagService, nameFilter, $routeParams) {
|
||||
function ListRepositoryController($scope, $q, ListRepositoryService, ListTagService, nameFilter) {
|
||||
var vm = this;
|
||||
|
||||
vm.projectId = $routeParams.project_id;
|
||||
vm.filterInput = "";
|
||||
vm.expand = expand;
|
||||
|
||||
ListRepositoryService({'projectId': vm.projectId, 'q': ''})
|
||||
.then(getRepositoryComplete)
|
||||
.catch(getRepositoryFailed);
|
||||
vm.retrieve = retrieve;
|
||||
|
||||
$scope.$watch('vm.projectId', function(current, origin) {
|
||||
if(current) {
|
||||
vm.retrieve(current, vm.filterInput);
|
||||
}
|
||||
});
|
||||
|
||||
function getRepositoryComplete(response) {
|
||||
vm.repositories = response.data;
|
||||
function retrieve(projectId, filterInput) {
|
||||
ListRepositoryService({'projectId': projectId, 'q': filterInput})
|
||||
.success(getRepositoryComplete)
|
||||
.error(getRepositoryFailed);
|
||||
}
|
||||
|
||||
function getRepositoryComplete(data, status) {
|
||||
console.log(data);
|
||||
vm.repositories = data;
|
||||
}
|
||||
|
||||
function getRepositoryFailed(repsonse) {
|
||||
@ -48,12 +57,21 @@
|
||||
restrict: 'E',
|
||||
templateUrl: '/static/ng/resources/js/components/repository/list-repository.directive.html',
|
||||
replace: true,
|
||||
scope: {
|
||||
'projectId': '='
|
||||
},
|
||||
link: 'link',
|
||||
controller: ListRepositoryController,
|
||||
controllerAs: 'vm',
|
||||
bindToController: true
|
||||
}
|
||||
|
||||
return directive;
|
||||
|
||||
function link(scope, element, attrs, ctrl) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})();
|
@ -1 +1 @@
|
||||
<list-log></list-log>
|
||||
<list-log project-id="vm.projectId"></list-log>
|
@ -6,8 +6,14 @@
|
||||
.module('harbor.layout.log')
|
||||
.controller('LogController', LogController);
|
||||
|
||||
function LogController() {
|
||||
LogController.$inject = ['$scope'];
|
||||
|
||||
function LogController($scope) {
|
||||
var vm = this;
|
||||
$scope.$on('currentProjectId', function(e, val) {
|
||||
console.log('received currentProjecjtId: ' + val + ' in LogController');
|
||||
vm.projectId = val;
|
||||
});
|
||||
}
|
||||
|
||||
})();
|
@ -1,5 +1,5 @@
|
||||
<ul class="switch-pane-tabs" role="tablist">
|
||||
<li><a tag="repositories" ng-click="vm.clickTab()" href="/ng/repository#/repositories?project_id=//vm.selectedProject.ProjectId//">Repositories</a><span class="gutter">|</span></li>
|
||||
<li><a tag="users" ng-click="vm.clickTab()" href="/ng/repository#/users?project_id=//vm.selectedProject.ProjectId//">Users</a><span class="gutter">|</span></li>
|
||||
<li><a tag="logs" ng-click="vm.clickTab()" href="/ng/repository#/logs?project_id=//vm.selectedProject.ProjectId//">Logs</a></li>
|
||||
<li><a tag="repositories" ng-click="vm.clickTab()" href="/ng/repository#/repositories">Repositories</a><span class="gutter">|</span></li>
|
||||
<li><a tag="users" ng-click="vm.clickTab()" href="/ng/repository#/users">Users</a><span class="gutter">|</span></li>
|
||||
<li><a tag="logs" ng-click="vm.clickTab()" href="/ng/repository#/logs">Logs</a></li>
|
||||
</ul>
|
@ -20,6 +20,7 @@
|
||||
function clickTab() {
|
||||
vm.isOpen = false;
|
||||
vm.url = $location.url();
|
||||
$scope.$emit('selectedProjectId', vm.selectedProject.ProjectId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -31,7 +32,7 @@
|
||||
link: link,
|
||||
scope: {
|
||||
'isOpen': '=',
|
||||
'selectedProject': '='
|
||||
'selectedProject': "="
|
||||
},
|
||||
replace: true,
|
||||
controller: NavigationDetailsController,
|
||||
@ -53,9 +54,14 @@
|
||||
|
||||
element.on('click', click);
|
||||
|
||||
|
||||
|
||||
|
||||
function click(event) {
|
||||
element.find('a').removeClass('active');
|
||||
$(event.target).not('span').addClass('active');
|
||||
|
||||
ctrl.clickTab();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
<list-project-member></list-project-member>
|
||||
<list-project-member project-id="vm.projectId"></list-project-member>
|
@ -11,9 +11,9 @@
|
||||
function ProjectMemberController($scope) {
|
||||
var vm = this;
|
||||
$scope.$on('currentProjectId', function(e, val) {
|
||||
console.log('received currentProjecjtId: ' + val + ' in ProjectMemberController');
|
||||
vm.projectId = val;
|
||||
});
|
||||
console.log('received currentProjectId: ' + val + ' in ProjectMemberController');
|
||||
vm.projectId = val;
|
||||
});
|
||||
}
|
||||
|
||||
})();
|
@ -1 +1 @@
|
||||
<list-repository></list-repository>
|
||||
<list-repository project-id="vm.projectId"></list-repository>
|
@ -11,7 +11,7 @@
|
||||
function RepositoryController($scope) {
|
||||
var vm = this;
|
||||
|
||||
$scope.$on('currentProjectId', function(e, val) {
|
||||
$scope.$on('currentProjectId', function(e, val){
|
||||
console.log('received currentProjecjtId: ' + val + ' in RepositoryController');
|
||||
vm.projectId = val;
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
9
static/ng/vendors/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js
vendored
Normal file
9
static/ng/vendors/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
74
static/ng/vendors/moment/min/moment-with-locales.min.js
vendored
Normal file
74
static/ng/vendors/moment/min/moment-with-locales.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
static/ng/vendors/spinner/spinner.min.js
vendored
Normal file
2
static/ng/vendors/spinner/spinner.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
// http://spin.js.org/#v2.3.2
|
||||
!function(a,b){"object"==typeof module&&module.exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(k.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",k.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;if(b=b.charAt(0).toUpperCase()+b.slice(1),void 0!==e[b])return b;for(d=0;d<l.length;d++)if(c=l[d]+b,void 0!==e[c])return c}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}k.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.scale*d.width,left:d.scale*d.radius,top:-d.scale*d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.scale*(d.length+d.width),k=2*d.scale*j,l=-(d.width+d.length)*d.scale*2+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k,l=["webkit","Moz","ms","O"],m={},n={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"};if(h.defaults={},f(h.prototype,{spin:function(b){this.stop();var c=this,d=c.opts,f=c.el=a(null,{className:d.className});if(e(f,{position:d.position,width:0,zIndex:d.zIndex,left:d.left,top:d.top}),b&&b.insertBefore(f,b.firstChild||null),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.scale*(f.length+f.width)+"px",height:f.scale*f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.scale*f.radius+"px,0)",borderRadius:(f.corners*f.scale*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.scale*f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}}),"undefined"!=typeof document){k=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}();var o=e(a("group"),{behavior:"url(#default#VML)"});!d(o,"transform")&&o.adj?i():j=d(o,"animation")}return h});
|
@ -5,6 +5,11 @@
|
||||
<script src="/static/ng/vendors/jquery/jquery-1.12.3.js"></script>
|
||||
|
||||
|
||||
<script src="/static/ng/vendors/moment/min/moment-with-locales.min.js"></script>
|
||||
<script src="/static/ng/vendors/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<link rel="stylesheet" href="/static/ng/vendors/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" />
|
||||
<script src="/static/ng/vendors/spinner/spinner.min.js"></script>
|
||||
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">-->
|
||||
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
|
||||
@ -45,11 +50,9 @@
|
||||
<script src="/static/ng/resources/js/layout/user/user.module.js"></script>
|
||||
<script src="/static/ng/resources/js/layout/user/user.controller.js"></script>
|
||||
|
||||
|
||||
<script src="/static/ng/resources/js/layout/log/log.module.js"></script>
|
||||
<script src="/static/ng/resources/js/layout/log/log.controller.js"></script>
|
||||
|
||||
|
||||
<script src="/static/ng/resources/js/services/project/services.project.module.js"></script>
|
||||
<script src="/static/ng/resources/js/services/project/services.list-project.js"></script>
|
||||
|
||||
@ -98,4 +101,3 @@
|
||||
<script src="/static/ng/resources/js/components/log/log.config.js"></script>
|
||||
<script src="/static/ng/resources/js/components/log/list-log.directive.js"></script>
|
||||
<script src="/static/ng/resources/js/components/log/advanced-search.directive.js"></script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user