Retab files.
This commit is contained in:
parent
2fbd016595
commit
ccc6e3bd2e
4 changed files with 91 additions and 94 deletions
|
@ -1,23 +1,21 @@
|
||||||
quayApp = angular.module('quay', ['restangular']).
|
quayApp = angular.module('quay', ['restangular']).
|
||||||
config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
|
config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
|
||||||
$routeProvider.
|
$routeProvider.
|
||||||
when('/repository/:namespace/:name', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl}).
|
when('/repository/:namespace/:name', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl}).
|
||||||
when('/repository/:namespace/:name/:tag', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl}).
|
when('/repository/:namespace/:name/:tag', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl}).
|
||||||
|
|
||||||
when('/repository/', {title: 'Repositories', templateUrl: '/static/partials/repo-list.html', controller: RepoListCtrl}).
|
when('/repository/', {title: 'Repositories', templateUrl: '/static/partials/repo-list.html', controller: RepoListCtrl}).
|
||||||
when('/', {title: 'Quay', templateUrl: '/static/partials/landing.html', controller: LandingCtrl}).
|
when('/', {title: 'Quay', templateUrl: '/static/partials/landing.html', controller: LandingCtrl}).
|
||||||
otherwise({redirectTo: '/'});
|
otherwise({redirectTo: '/'});
|
||||||
|
|
||||||
//$locationProvider.html5Mode(true);
|
|
||||||
}]).
|
}]).
|
||||||
config(function(RestangularProvider) {
|
config(function(RestangularProvider) {
|
||||||
RestangularProvider.setBaseUrl('/api/');
|
RestangularProvider.setBaseUrl('/api/');
|
||||||
});
|
});
|
||||||
|
|
||||||
quayApp.run(['$location', '$rootScope', function($location, $rootScope) {
|
quayApp.run(['$location', '$rootScope', function($location, $rootScope) {
|
||||||
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) {
|
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) {
|
||||||
if (current.$$route.title) {
|
if (current.$$route.title) {
|
||||||
$rootScope.title = current.$$route.title;
|
$rootScope.title = current.$$route.title;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}]);
|
}]);
|
|
@ -13,15 +13,15 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope) {
|
||||||
$rootScope.title = 'Loading...';
|
$rootScope.title = 'Loading...';
|
||||||
|
|
||||||
$scope.editDescription = function() {
|
$scope.editDescription = function() {
|
||||||
if (!$scope.repo.can_write) { return; }
|
if (!$scope.repo.can_write) { return; }
|
||||||
$('#descriptionEdit')[0].value = $scope.repo.description || '';
|
$('#descriptionEdit')[0].value = $scope.repo.description || '';
|
||||||
$('#editModal').modal({});
|
$('#editModal').modal({});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.saveDescription = function() {
|
$scope.saveDescription = function() {
|
||||||
$('#editModal').modal('hide');
|
$('#editModal').modal('hide');
|
||||||
$scope.repo.description = $('#descriptionEdit')[0].value;
|
$scope.repo.description = $('#descriptionEdit')[0].value;
|
||||||
$scope.repo.put();
|
$scope.repo.put();
|
||||||
};
|
};
|
||||||
|
|
||||||
var namespace = $routeParams.namespace;
|
var namespace = $routeParams.namespace;
|
||||||
|
@ -30,11 +30,11 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope) {
|
||||||
|
|
||||||
var repositoryFetch = Restangular.one('repository/' + namespace + '/' + name);
|
var repositoryFetch = Restangular.one('repository/' + namespace + '/' + name);
|
||||||
repositoryFetch.get().then(function(repo) {
|
repositoryFetch.get().then(function(repo) {
|
||||||
$rootScope.title = namespace + '/' + name;
|
$rootScope.title = namespace + '/' + name;
|
||||||
$scope.repo = repo;
|
$scope.repo = repo;
|
||||||
$scope.currentTag = repo.tags[tag] || repo.tags['latest'];
|
$scope.currentTag = repo.tags[tag] || repo.tags['latest'];
|
||||||
}, function() {
|
}, function() {
|
||||||
$scope.repo = null;
|
$scope.repo = null;
|
||||||
$rootScope.title = 'Unknown Repository';
|
$rootScope.title = 'Unknown Repository';
|
||||||
});
|
});
|
||||||
}
|
}
|
|
@ -21,56 +21,55 @@
|
||||||
|
|
||||||
<!-- Tab bar -->
|
<!-- Tab bar -->
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li>
|
<li>
|
||||||
<span class="tag-dropdown dropdown">
|
<span class="tag-dropdown dropdown">
|
||||||
<i class="icon-bookmark"></i>
|
<i class="icon-bookmark"></i>
|
||||||
<a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">{{currentTag.name}} <b class="caret"></b></a>
|
<a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">{{currentTag.name}} <b class="caret"></b></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li ng-repeat="tag in repo.tags">
|
<li ng-repeat="tag in repo.tags">
|
||||||
<a href="{{ '#/repository/' + repo.namespace + '/' + repo.name + '/' + tag.name }}">{{tag.name}}</a>
|
<a href="{{ '#/repository/' + repo.namespace + '/' + repo.name + '/' + tag.name }}">{{tag.name}}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
|
</li>
|
||||||
</li>
|
<li class="active"><a href="javascript:void(0)">Current Image</a></li>
|
||||||
<li class="active"><a href="javascript:void(0)">Current Image</a></li>
|
<li><a href="javascript:void(0)">Image History</a></li>
|
||||||
<li><a href="javascript:void(0)">Image History</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div id="current-image">
|
<div id="current-image">
|
||||||
<dl class="dl-horizontal">
|
<dl class="dl-horizontal">
|
||||||
<dt>Created</dt>
|
<dt>Created</dt>
|
||||||
<dd>{{ currentTag.image.created }}</dd>
|
<dd>{{ currentTag.image.created }}</dd>
|
||||||
|
|
||||||
<dt>ID</dt>
|
<dt>ID</dt>
|
||||||
<dd>{{ currentTag.image.id }}</dd>
|
<dd>{{ currentTag.image.id }}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<div ng-show="currentTag.image.comment">
|
<div ng-show="currentTag.image.comment">
|
||||||
<strong>Description:</strong>
|
<strong>Description:</strong>
|
||||||
<blockquote style="margin-top: 10px;">
|
<blockquote style="margin-top: 10px;">
|
||||||
{{ currentTag.image.comment || '' }}
|
{{ currentTag.image.comment || '' }}
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal edit for the description -->
|
<!-- Modal edit for the description -->
|
||||||
<div class="modal fade" id="editModal">
|
<div class="modal fade" id="editModal">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
<h4 class="modal-title">Edit Repository Description</h4>
|
<h4 class="modal-title">Edit Repository Description</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<textarea id="descriptionEdit" placeholder="Enter description">{{ repo.description }}</textarea>
|
<textarea id="descriptionEdit" placeholder="Enter description">{{ repo.description }}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-primary" ng-click="saveDescription()">Save changes</button>
|
<button type="button" class="btn btn-primary" ng-click="saveDescription()">Save changes</button>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.modal-content -->
|
</div><!-- /.modal-content -->
|
||||||
</div><!-- /.modal-dialog -->
|
</div><!-- /.modal-dialog -->
|
||||||
</div><!-- /.modal -->
|
</div><!-- /.modal -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,39 +27,39 @@
|
||||||
<nav class="navbar navbar-default" role="navigation">
|
<nav class="navbar navbar-default" role="navigation">
|
||||||
<!-- Quay -->
|
<!-- Quay -->
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
|
||||||
<span class="sr-only">Toggle navigation</span>
|
<span class="sr-only">Toggle navigation</span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" href="#">Quay</a>
|
<a class="navbar-brand" href="#">Quay</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Collapsable stuff -->
|
<!-- Collapsable stuff -->
|
||||||
<div class="collapse navbar-collapse navbar-ex1-collapse">
|
<div class="collapse navbar-collapse navbar-ex1-collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li><a ng-href="/repository">Repositories</a></li>
|
<li><a ng-href="#/repository/">Repositories</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<form class="navbar-form navbar-left" role="search">
|
<form class="navbar-form navbar-left" role="search">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="text" class="form-control" placeholder="Find Repo">
|
<input type="text" class="form-control" placeholder="Find Repo">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<!--<button type="button" class="btn btn-default navbar-btn">Sign in</button>-->
|
<!--<button type="button" class="btn btn-default navbar-btn">Sign in</button>-->
|
||||||
|
|
||||||
<a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">devtable <b class="caret"></b></a>
|
<a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">devtable <b class="caret"></b></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="#">Settings</a></li>
|
<li><a href="#">Settings</a></li>
|
||||||
<li><a href="#">Sign out</a></li>
|
<li><a href="#">Sign out</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- /.navbar-collapse -->
|
</div><!-- /.navbar-collapse -->
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
Reference in a new issue