Skip to content

Commit

Permalink
Add Instane Upgrade eligibility UI indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
hbenali committed Dec 25, 2020
1 parent 87c8ab9 commit be5a07a
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 7 deletions.
1 change: 1 addition & 0 deletions var/www/company.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<td class="col-center"><?= componentStatusIcon($descriptor_array); ?></td>
<td>
<?= componentProductInfoIcon($descriptor_array) ?>&nbsp;
<?= componentUpgradeEligibility($descriptor_array); ?>
<?= componentVisibilityIcon($descriptor_array, empty($descriptor_array->DEPLOYMENT_APACHE_VHOST_ALIAS) ? '' : 'green'); ?>&nbsp;
<?= componentProductOpenLink($descriptor_array, "", true) ?>
<span class="pull-right">
Expand Down
3 changes: 2 additions & 1 deletion var/www/customers.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
<td class="col-center"><?= componentStatusIcon($descriptor_array); ?></td>
<td>
<?= componentProductOpenLink($descriptor_array); ?>
<br/><?= componentAddonsTags($descriptor_array); ?>
<br/><?= componentUpgradeEligibility($descriptor_array); ?>
<?= componentAddonsTags($descriptor_array); ?>
<span class="pull-right">
<?php
if(isset($descriptor_array->DEPLOYMENT_BUILD_URL)) {
Expand Down
3 changes: 2 additions & 1 deletion var/www/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@
}
?>
</span>
<br/><?= componentAddonsTags($descriptor_array); ?>
<br/><?= componentUpgradeEligibility($descriptor_array); ?>
<?= componentAddonsTags($descriptor_array); ?>
<br/><?= componentLabels($descriptor_array); ?>
</td>
<td class="col-left"><?= componentDownloadIcon($descriptor_array); ?>&nbsp;<?= componentProductVersion($descriptor_array); ?></td>
Expand Down
15 changes: 15 additions & 0 deletions var/www/lib/functions-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,21 @@ function componentAddonsDistributionTags ($deployment_descriptor) {
return $content;
}

/**
* Return the markup for instance upgrades eligiblity
*
* @param $deployment_descriptor
*
* @return string html markup
*/
function componentUpgradeEligibility($deployment_descriptor) {
if (property_exists($deployment_descriptor, 'INSTANCE_TOKEN') && $deployment_descriptor->INSTANCE_TOKEN) {
$content='<span class="label label-addon" rel="tooltip" data-original-title="This instance is eligible for upgrades."><i class="icon-flag"></i></span>';
return $content;
}
return '';
}

/**
* Return the markup for the Deployment Status
*
Expand Down
6 changes: 4 additions & 2 deletions var/www/qa.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
<i class="icon-refresh"></i>
</a>
</span>
<br/><?= componentAddonsTags($descriptor_array); ?>
<br/><?= componentUpgradeEligibility($descriptor_array); ?>
<?= componentAddonsTags($descriptor_array); ?>
</td>
<td class="col-center">
<?= componentDownloadIcon($descriptor_array); ?>&nbsp;
Expand Down Expand Up @@ -126,7 +127,8 @@
<i class="icon-refresh"></i>
</a>
</span>
<br/><?= componentAddonsTags($descriptor_array); ?>
<br/><?= componentUpgradeEligibility($descriptor_array); ?>
<?= componentAddonsTags($descriptor_array); ?>
</td>
<td class="col-center">
<?= componentDownloadIcon($descriptor_array); ?>&nbsp;
Expand Down
9 changes: 6 additions & 3 deletions var/www/sales.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
</a> - 
<?= componentEditNoteIcon($descriptor_array) ?>
</span>
<br/><?= componentAddonsTags($descriptor_array); ?>
<br/><?= componentUpgradeEligibility($descriptor_array); ?>
<?= componentAddonsTags($descriptor_array); ?>
</td>
<td class="col-center">
<?= componentProductInfoIcon($descriptor_array); ?>&nbsp;
Expand Down Expand Up @@ -121,7 +122,8 @@
</a> - 
<?= componentEditNoteIcon($descriptor_array) ?>
</span>
<br/><?= componentAddonsTags($descriptor_array); ?>
<br/><?= componentUpgradeEligibility($descriptor_array); ?>
<?= componentAddonsTags($descriptor_array); ?>
</td>
<td class="col-center">
<?= componentProductInfoIcon($descriptor_array); ?>&nbsp;
Expand Down Expand Up @@ -169,7 +171,8 @@
<span class="pull-right">
<?= componentEditNoteIcon($descriptor_array) ?>
</span>
<br/><?= componentAddonsTags($descriptor_array); ?>
<br/><?= componentUpgradeEligibility($descriptor_array); ?>
<?= componentAddonsTags($descriptor_array); ?>
</td>
<td class="col-center">
<?= componentProductInfoIcon($descriptor_array); ?>&nbsp;
Expand Down

0 comments on commit be5a07a

Please sign in to comment.