Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions client/htmls/private/ajax/Settings/CreateProviders.html
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,14 @@ <h4 class="widget-margin" style="color: black;"><span id="spnprovider"></span></
}
$('#myForm54').ajaxForm({
beforeSubmit: function(arr, $form, options) {
if (location.toString().indexOf('?new') === -1) {
var orgValue = $('#orgId').val();
arr.push({name:'orgId',value:orgValue,type:'select-one',required:false})
}
if (location.toString().indexOf('?new') === -1 && $('#providertype').val() == 'AZURE') {
var azureSubscriptionId = $('#azureSubscriptionId').val();
arr.push({name:'azureSubscriptionId',value:orgValue,type:'text',required:false})
}
// return false to cancel submit
if ($('#providertype').val() == 'OPENSTACK' || $('#providertype').val() == 'HPPUBLICCLOUD') {
if (isFormValidOpenStack(null, 'cat-validation-openstack')) {
Expand Down
44 changes: 21 additions & 23 deletions client/htmls/public/instanceLog.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,29 +117,29 @@ <h4 class="modal-title" id="myModalLabel">
$modalBody.empty();
}
var $table = $('<table></table>');
for (var i = 0; i < data.logs.length; i++) {
for (var i = 0; i < data.length; i++) {
var $rowDiv = $('<tr class="row rowSpacing"></tr>');
var timeString;
if(data.logs[i].timestamp){
timeString = new Date().setTime(data.logs[i].timestamp);
if(data[i].timestamp){
timeString = new Date().setTime(data[i].timestamp);
}
var date = new Date(timeString).toLocaleString();
var logStr ="";
if(data.logs[i].log){
logStr = data.logs[i].log;
if(data[i].log){
logStr = data[i].log;
}
if (data.logs[i].err) {
if (data[i].err) {
$rowDiv.append($('<td class="col-lg-12 col-sm-12" style="color:red;"></td>').append('<span class="textLogs">' + date + '</span>' + '&nbsp;&nbsp;&nbsp;' + '<span>' + logStr + '</span>'));
} else {
$rowDiv.append($('<td class="col-lg-12 col-sm-12" style="color:DarkBlue;"></td>').append('<span class="textLogs">' + date + '</span>' + '&nbsp;&nbsp;&nbsp;' + '<span>' + logStr + '</span>'));
}
$table.append($rowDiv);
lastTimestamp = data.logs[i].timestamp;
if (data.logs[i]) {
lastTimestamp = data[i].timestamp;
if (data[i]) {
$modalBody.append($table);
$modalBody.scrollTop($modalBody[0].scrollHeight + 100);
}
}
}
if ($instanceLogModalContainer.data()['bs.modal'].isShown) {
pollLogs(lastTimestamp, 10000, false);
} else {
Expand Down Expand Up @@ -262,14 +262,6 @@ <h4 class="modal-title" id="myModalLabel">
$osImg = $("<img class ='imgStyle' src = '../private/img/osIcons/linux.png' alt='OS'/>");
} else if (managnedData[i].os == 'windows') {
$osImg = $("<img class ='imgStyle' src = '../private/img/osIcons/windows.png' alt='OS'/>");
} else if (managnedData[i].platform == 'ubuntu' && managnedData[i].bootStrap == 'success') {
$osImg = $("<img class ='imgStyle' src = '../private/img/osIcons/ubuntu.png' alt='OS'/>");
} else if (managnedData[i].platform == 'ubuntu' && managnedData[i].bootStrap != 'success') {
$osImg = $("<img class ='imgStyle' src = '../private/img/osIcons/linux.png' alt='OS'/>");
} else if (managnedData[i].platform == 'centos' && managnedData[i].bootStrap != 'success') {
$osImg = $("<img class ='imgStyle' src = '../private/img/osIcons/linux.png' alt='OS'/>");
} else if (managnedData[i].platform == 'centos' && managnedData[i].bootStrap == 'success') {
$osImg = $("<img class ='imgStyle' src = '../private/img/osIcons/centos.png' alt='OS'/>");
} else if (managnedData[i].platform == 'unknown') {
$osImg = $("<img class ='imgStyle' src = '../private/img/osIcons/linux.png' alt='OS'/>");
} else if (managnedData[i].os == 'linux' && managnedData[i].platform == 'unknown') {
Expand All @@ -285,13 +277,19 @@ <h4 class="modal-title" id="myModalLabel">
$tr.append($tdOs);
if (managnedData[i].status == 'running') {
$tdStatus = $("<img title='running' class ='statusIcon' src = '../private/img/aws_logo_started.png' alt='statusType'/>");
} else if (managnedData[i].status == 'pending' || managnedData[i].status == 'unknown') {
} else if (managnedData[i].status == 'pending' || managnedData[i].status == 'unknown' || managnedData[i].status == 'waiting') {
$tdStatus = $("<img title='pending' class ='statusIcon' src = '../private/img/aws_logo_inactive.png' alt='statusType'/>");
} else if (managnedData[i].status == 'stopping' || managnedData[i].status == 'paused') {
$tdStatus = $("<img title='stopping' class ='statusIcon' src = '../private/img/aws_logo_paused.png' alt='statusType'/>");
} else if (managnedData[i].status == 'stopped' || managnedData[i].status == 'terminated') {
} else if (managnedData[i].status == 'stopped') {
$tdStatus = $("<img title='stopped' class ='statusIcon' src = '../private/img/aws_logo_stopped.png' alt='statusType'/>");
} else {
}else if (managnedData[i].status == 'terminated') {
$tdStatus = $("<img title='terminated' class ='statusIcon' src = '../private/img/aws_logo_stopped.png' alt='statusType'/>");
}else if (managnedData[i].status == 'deleted') {
$tdStatus = $("<img title='deleted' class ='statusIcon' src = '../private/img/aws_logo_stopped.png' alt='statusType'/>");
}else if (managnedData[i].status == 'shutting-down') {
$tdStatus = $("<img title='shutting-down' class ='statusIcon' src = '../private/img/aws_logo_stopped.png' alt='statusType'/>");
}else {
$tdStatus = $("<img title='unknown' class ='statusIcon' src = '../private/img/aws_logo_stopped.png' alt='statusType'/>");
}
var $tdStatus = $('<td></td>').append($tdStatus);
Expand Down Expand Up @@ -325,11 +323,11 @@ <h4 class="modal-title" id="myModalLabel">
$tr.append($tdData);
if (managnedData[i].actionStatus == 'success') {
$tdActionStatus = $("<img title='success' class ='statusIcon' src = '../private/img/aws_logo_started.png' alt='statusType'/>");
} else if (managnedData[i].actionStatus == 'pending') {
}else if (managnedData[i].actionStatus == 'pending' || managnedData[i].actionStatus == 'waiting') {
$tdActionStatus = $("<img title='pending' class ='statusIcon' src = '../private/img/aws_logo_paused.png' alt='statusType'/>");
} else if (managnedData[i].actionStatus == 'failed') {
}else if (managnedData[i].actionStatus == 'failed') {
$tdActionStatus = $("<img title='failed' class ='statusIcon' src = '../private/img/aws_logo_stopped.png' alt='statusType'/>");
} else {
}else {
$tdActionStatus = $("<img title='failed' class ='statusIcon' src = '../private/img/aws_logo_stopped.png' alt='statusType'/>");
}
var $tdActionStatus = $('<td></td>').append($tdActionStatus);
Expand Down
2 changes: 1 addition & 1 deletion client/htmls/public/orchestrationLog.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ <h4 class="modal-title" id="myModalLabel">
$modalBody.append($table);
$modalBody.scrollTop($modalBody[0].scrollHeight + 100);
}
}
}
if ($taskLogModalContainer.data()['bs.modal'].isShown) {
pollLogs(lastTimestamp, 10000, false);
} else {
Expand Down
Loading