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="col-md-3"></div>
|
||||
<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 class="form-group col-md-12 form-group-custom">
|
||||
<div class="col-md-3"></div>
|
||||
<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>
|
||||
|
@ -201,9 +201,9 @@
|
||||
target.name = vm1.name;
|
||||
}
|
||||
|
||||
vm.pingAvailable = false;
|
||||
vm.pingMessage = $filter('tr')('pinging_target');
|
||||
vm.pingTIP = true;
|
||||
vm.isError = false;
|
||||
|
||||
PingDestinationService(target)
|
||||
.success(pingDestinationSuccess)
|
||||
@ -319,12 +319,12 @@
|
||||
console.log('Failed to update destination:' + data);
|
||||
}
|
||||
function pingDestinationSuccess(data, status) {
|
||||
vm.pingAvailable = true;
|
||||
vm.isError = false;
|
||||
vm.pingMessage = $filter('tr')('successful_ping_target', []);
|
||||
vm.pingTIP = false;
|
||||
}
|
||||
function pingDestinationFailed(data, status) {
|
||||
vm.pingAvailable = true;
|
||||
vm.isError = true;
|
||||
if(status === 404) {
|
||||
data = '';
|
||||
}
|
||||
|
@ -69,7 +69,8 @@
|
||||
<div class="form-group col-md-12 form-group-custom">
|
||||
<div class="col-md-3"></div>
|
||||
<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>
|
||||
|
@ -140,6 +140,8 @@
|
||||
function pingDestination() {
|
||||
|
||||
vm.pingTIP = true;
|
||||
vm.pingMessage = $filter('tr')('pinging_target');
|
||||
vm.isError = false;
|
||||
|
||||
var target = {
|
||||
'name': vm0.name,
|
||||
@ -158,10 +160,12 @@
|
||||
}
|
||||
|
||||
function pingDestinationSuccess(data, status) {
|
||||
vm.isError = false;
|
||||
vm.pingTIP = false;
|
||||
vm.pingMessage = $filter('tr')('successful_ping_target', []);
|
||||
}
|
||||
function pingDestinationFailed(data, status) {
|
||||
vm.isError = true;
|
||||
vm.pingTIP = false;
|
||||
if(status === 404) {
|
||||
data = '';
|
||||
|
Loading…
Reference in New Issue
Block a user