updates for pull-command prefix of HarborRegUrl of UI.

This commit is contained in:
kunw 2016-05-16 14:21:59 +08:00
parent ba6be0a359
commit 7c82af9e85
6 changed files with 12 additions and 6 deletions

View File

@ -1,9 +1,12 @@
package ng
import "os"
type RepositoryController struct {
BaseController
}
func (rc *RepositoryController) Get() {
rc.Data["HarborRegUrl"] = os.Getenv("HARBOR_REG_URL")
rc.Forward("Repository", "repository.htm")
}

View File

@ -3,8 +3,8 @@
<table class="repository-table">
<thead>
<th width="20%"><span class="glyphicon glyphicon-tags"></span> // 'tag' | tr //</th>
<th width="30%">// 'image_details' | tr //</th>
<th width="40%">// 'pull_command' | tr //</th>
<th width="10%">// 'image_details' | tr //</th>
<th width="60%">// 'pull_command' | tr //</th>
<th width="10%">// 'operation' | tr //</th>
</thead>
<tbody>

View File

@ -1,7 +1,7 @@
<form class="form-inline">
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" id="//vm.repoName//-//vm.tag//" value="docker pull //vm.repoName//://vm.tag//" readonly="readonly" size="30">
<input type="text" class="form-control" id="//vm.repoName//-//vm.tag//" value="docker pull //vm.harborRegUrl////vm.repoName//://vm.tag//" readonly="readonly" size="60">
<div class="input-group-addon">
<a href="javascript:void(0);" data-clipboard-target="//vm.repoName//-//vm.tag//"><span class="glyphicon glyphicon-duplicate" data-toggle="tooltip" data-placement="right" title="Copied!"></span></a>
</div>

View File

@ -26,7 +26,9 @@
return directive;
function link(scope, element, attrs, ctrl) {
ctrl.harborRegUrl = $('#HarborRegUrl').val() + '/';
ZeroClipboard.config( { swfPath: "/static/ng/vendors/zc/v2.2.0/ZeroClipboard.swf" } );
var clip = new ZeroClipboard(element.find('a'));
element.find('span').tooltip({'trigger': 'click'});

View File

@ -1,7 +1,7 @@
<form name="form" class="form-horizontal css-form" ng-submit="form.$valid" novalidate>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<input id="username" type="text" class="form-control" placeholder="// 'username_email' | tr //" name="uPrincipal" ng-model-options="{ updateOn: 'blur' }" ng-change="vm.reset()" ng-model="user.principal" required>
<input id="username" type="text" class="form-control" placeholder="// 'username_email' | tr //" name="uPrincipal" ng-change="vm.reset()" ng-model="user.principal" required>
<div class="error-message">
<div ng-messages="form.uPrincipal.$error" ng-if="form.uPrincipal.$touched">
<span ng-message="required">// 'username_is_required' | tr //</span>
@ -11,7 +11,7 @@
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<input type="password" class="form-control" placeholder="// 'password' | tr //" name="uPassword" ng-model-options="{ updateOn: 'blur' }" ng-change="vm.reset()" ng-model="user.password" required>
<input type="password" class="form-control" placeholder="// 'password' | tr //" name="uPassword" ng-change="vm.reset()" ng-model="user.password" required>
<div class="error-message">
<div ng-messages="form.uPassword.$error" ng-if="form.uPassword.$touched">
<span ng-message="required">// 'password_is_required' | tr //</span>

View File

@ -18,6 +18,7 @@
<retrieve-projects is-open="vm.open" selected-project="vm.selectedProject" is-project-member="vm.isProjectMember" publicity="vm.publicity"></retrieve-projects>
<!-- Tab panes -->
<div class="tab-content" ng-click="vm.closeRetrievePane()">
<input type="hidden" id="HarborRegUrl" value="{{.HarborRegUrl}}">
<ng-view></ng-view>
</div>
</div>