mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-22 08:38:03 +01:00
parent
111638ae8e
commit
6088d45686
@ -99,13 +99,14 @@
|
|||||||
<div class="form-group col-md-12 form-group-custom">
|
<div class="form-group col-md-12 form-group-custom">
|
||||||
<div class="col-md-3"></div>
|
<div class="col-md-3"></div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<button type="button" class="btn btn-default" ng-disabled="vm.notAvailable || !vm.pingAvailable" ng-click="vm.pingDestination()" loading-progress hide-target="false" toggle-in-progress="vm.pingTIP">// 'test_connection' | tr //</button>
|
<button type="button" class="btn btn-default" ng-disabled="vm.notAvailable" ng-click="vm.pingDestination()" loading-progress hide-target="false" toggle-in-progress="vm.pingTIP">// 'test_connection' | tr //</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-12 form-group-custom">
|
<div class="form-group col-md-12 form-group-custom">
|
||||||
<div class="col-md-3"></div>
|
<div class="col-md-3"></div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<span class="error-message" >// vm.pingMessage //</span>
|
<span ng-if="vm.isError" class="error-message" >// vm.pingMessage //</span>
|
||||||
|
<span ng-if="!vm.isError">// vm.pingMessage //</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -201,9 +201,9 @@
|
|||||||
target.name = vm1.name;
|
target.name = vm1.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
vm.pingAvailable = false;
|
|
||||||
vm.pingMessage = $filter('tr')('pinging_target');
|
vm.pingMessage = $filter('tr')('pinging_target');
|
||||||
vm.pingTIP = true;
|
vm.pingTIP = true;
|
||||||
|
vm.isError = false;
|
||||||
|
|
||||||
PingDestinationService(target)
|
PingDestinationService(target)
|
||||||
.success(pingDestinationSuccess)
|
.success(pingDestinationSuccess)
|
||||||
@ -319,12 +319,12 @@
|
|||||||
console.log('Failed to update destination:' + data);
|
console.log('Failed to update destination:' + data);
|
||||||
}
|
}
|
||||||
function pingDestinationSuccess(data, status) {
|
function pingDestinationSuccess(data, status) {
|
||||||
vm.pingAvailable = true;
|
vm.isError = false;
|
||||||
vm.pingMessage = $filter('tr')('successful_ping_target', []);
|
vm.pingMessage = $filter('tr')('successful_ping_target', []);
|
||||||
vm.pingTIP = false;
|
vm.pingTIP = false;
|
||||||
}
|
}
|
||||||
function pingDestinationFailed(data, status) {
|
function pingDestinationFailed(data, status) {
|
||||||
vm.pingAvailable = true;
|
vm.isError = true;
|
||||||
if(status === 404) {
|
if(status === 404) {
|
||||||
data = '';
|
data = '';
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
<div class="form-group col-md-12 form-group-custom">
|
<div class="form-group col-md-12 form-group-custom">
|
||||||
<div class="col-md-3"></div>
|
<div class="col-md-3"></div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<span class="error-message">// vm.pingMessage //</span>
|
<span ng-if="vm.isError" class="error-message">// vm.pingMessage //</span>
|
||||||
|
<span ng-if="!vm.isError">// vm.pingMessage //</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
vm.errorMessages = [];
|
vm.errorMessages = [];
|
||||||
|
|
||||||
vm.pingTIP = false;
|
vm.pingTIP = false;
|
||||||
|
|
||||||
$timeout(function(){
|
$timeout(function(){
|
||||||
$scope.$watch('destination.endpoint', function(current) {
|
$scope.$watch('destination.endpoint', function(current) {
|
||||||
if(current) {
|
if(current) {
|
||||||
@ -140,6 +140,8 @@
|
|||||||
function pingDestination() {
|
function pingDestination() {
|
||||||
|
|
||||||
vm.pingTIP = true;
|
vm.pingTIP = true;
|
||||||
|
vm.pingMessage = $filter('tr')('pinging_target');
|
||||||
|
vm.isError = false;
|
||||||
|
|
||||||
var target = {
|
var target = {
|
||||||
'name': vm0.name,
|
'name': vm0.name,
|
||||||
@ -158,10 +160,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pingDestinationSuccess(data, status) {
|
function pingDestinationSuccess(data, status) {
|
||||||
|
vm.isError = false;
|
||||||
vm.pingTIP = false;
|
vm.pingTIP = false;
|
||||||
vm.pingMessage = $filter('tr')('successful_ping_target', []);
|
vm.pingMessage = $filter('tr')('successful_ping_target', []);
|
||||||
}
|
}
|
||||||
function pingDestinationFailed(data, status) {
|
function pingDestinationFailed(data, status) {
|
||||||
|
vm.isError = true;
|
||||||
vm.pingTIP = false;
|
vm.pingTIP = false;
|
||||||
if(status === 404) {
|
if(status === 404) {
|
||||||
data = '';
|
data = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user