Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SWF-2500 : Dynamically display crash link only if supported

  • Loading branch information...
commit 967449613505c08797b8a117a7c68ff8a6e33776 1 parent 3560121
Arnaud Heritier aheritier authored
Showing with 7 additions and 2 deletions.
  1. +4 −0 adt.sh
  2. +1 −0  etc/adt/config.template
  3. +2 −2 var/www/index.php
4 adt.sh
View
@@ -284,6 +284,7 @@ initialize_product_settings() {
env_var "DEPLOYMENT_APPSRV_TYPE" "tomcat" #Server type
env_var "DEPLOYMENT_APPSRV_VERSION" "6.0.35" #Default version used to download additional resources like JMX lib
env_var "DEPLOYMENT_MYSQL_DRIVER_VERSION" "5.1.23" #Default version used to download additional mysql driver
+ env_var "DEPLOYMENT_CRASH_ENABLED" false
env_var "ARTIFACT_GROUPID" ""
env_var "ARTIFACT_ARTIFACTID" ""
@@ -1148,6 +1149,9 @@ do_deploy() {
exit 1
;;
esac
+ if [ -e "${DEPLOYMENT_DIR}/webapps/crash*.war" ]; then
+ env_var "DEPLOYMENT_CRASH_ENABLED" true
+ fi
do_create_deployment_descriptor
do_set_env
echo "[INFO] Server deployed"
1  etc/adt/config.template
View
@@ -43,6 +43,7 @@ DEPLOYMENT_DATABASE_USER="${DEPLOYMENT_DATABASE_USER}"
DEPLOYMENT_SETUP_APACHE=${DEPLOYMENT_SETUP_APACHE}
DEPLOYMENT_SETUP_AWSTATS=${DEPLOYMENT_SETUP_AWSTATS}
DEPLOYMENT_SETUP_UFW=${DEPLOYMENT_SETUP_UFW}
+DEPLOYMENT_CRASH_ENABLED=${DEPLOYMENT_CRASH_ENABLED}
PLF_BRANCH="${PLF_BRANCH}"
EXO_PROFILES="${EXO_PROFILES}"
DATASET_DATA_VALUES_ARCHIVE="${DATASET_DATA_VALUES_ARCHIVE}"
4 var/www/index.php
View
@@ -151,12 +151,12 @@
<td class="col-right <?= $descriptor_array->ARTIFACT_AGE_CLASS ?>"><?=$descriptor_array->ARTIFACT_AGE_STRING?></td>
<td class="col-right"><?= $descriptor_array->DEPLOYMENT_AGE_STRING ?></td>
<td class="col-left" style="font-size: small"><a href="<?= $descriptor_array->ARTIFACT_DL_URL ?>" rel="tooltip" title="Download <?= $descriptor_array->ARTIFACT_GROUPID ?>:<?= $descriptor_array->ARTIFACT_ARTIFACTID ?>:<?= $descriptor_array->ARTIFACT_TIMESTAMP ?> from Acceptance"><i class="icon-download-alt"></i>&nbsp;<?= $descriptor_array->ARTIFACT_TIMESTAMP?></a></td>
- <td class="col-center">
+ <td class="col-left">
<a href="<?= $descriptor_array->DEPLOYMENT_LOG_APPSRV_URL ?>" rel="tooltip" title="Instance logs" target="_blank"><img src="/images/terminal_tomcat.png" width="32" height="16" alt="instance logs" class="icon"/></a>&nbsp;
<a href="<?= $descriptor_array->DEPLOYMENT_LOG_APACHE_URL ?>" rel="tooltip" title="apache logs" target="_blank"><img src="/images/terminal_apache.png" width="32" height="16" alt="apache logs" class="icon"/></a>&nbsp;
<a href="<?= $descriptor_array->DEPLOYMENT_JMX_URL ?>" rel="tooltip" title="jmx monitoring" target="_blank"><img src="/images/action_log.png" alt="JMX url" width="16" height="16" class="icon"/></a>&nbsp;
<a href="<?= $descriptor_array->DEPLOYMENT_AWSTATS_URL ?>" rel="tooltip" title="<?= $descriptor_array->PRODUCT_NAME . " " . $descriptor_array->PRODUCT_VERSION ?> usage statistics" target="_blank"><img src="/images/server_chart.png" alt="<?= $descriptor_array->DEPLOYMENT_URL ?> usage statistics" width="16" height="16" class="icon"/></a>&nbsp;
- <a href="<?= "ssh://root@".$descriptor_array->DEPLOYMENT_EXT_HOST.":".$descriptor_array->DEPLOYMENT_CRASH_SSH_PORT ?>" rel="tooltip" title="CRaSH SSH Access"><i class="icon-laptop"></i></a>&nbsp;
+ <?php if (property_exists($descriptor_array,'DEPLOYMENT_CRASH_ENABLED') && $descriptor_array->DEPLOYMENT_CRASH_ENABLED) {?><a href="<?= "ssh://root@".$descriptor_array->DEPLOYMENT_EXT_HOST.":".$descriptor_array->DEPLOYMENT_CRASH_SSH_PORT ?>" rel="tooltip" title="CRaSH SSH Access"><i class="icon-laptop"></i></a>&nbsp;<?php } ?>
</td>
</tr>
<?php if (!empty($feature_branch)) { ?>
Please sign in to comment.
Something went wrong with that request. Please try again.