Changeset 38983


Ignore:
Timestamp:
2024-05-02T21:24:03+12:00 (4 weeks ago)
Author:
anupama
Message:

I think these are all the changes needed for tthe new GS3 ext/DEACTIVATE.sh (and ext/ACTIVATE.sh) to (de)activate the webswing extension.

Files:
3 added
11 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/webswing/trunk/build.xml

    r38806 r38983  
    208208       delete failonerror="false" includeEmptyDirs="true" dir="${web.extdir.unix}/webswing"
    209209    </echo>
     210    <delete failonerror="false" includeEmptyDirs="true" dir="${web.extdir.unix}/webswing"/>
    210211  </target>
    211212 
     
    220221  </target>
    221222 
    222   <target name="del-extension" depends="accept-del-extension,del-etc-files,del-webswing-for-tomcat"
     223  <target name="del-extension" depends="accept-del-extension,deactivate"
    223224      description="Run this target to remove the Webswing extension for Greenstone3" />
    224225
     226  <!-- Called by DEACTIVATE.SH, no user prompt -->
     227  <target name="deactivate" depends="del-etc-files,del-webswing-for-tomcat"
     228      description="Run this target to QUIETLY remove the Webswing extension for Greenstone3" />
     229
    225230</project>
  • main/trunk/greenstone3/ant-start-with-exts.sh

    r37746 r38983  
    2424    if [ -d ext  ] ; then
    2525    for gsdl_ext in ext/* ; do
     26        if [[ "$gsdl_ext" == *.inactive ]]; then
     27        echo "Skipping inactive extension $gsdl_ext"
     28        continue
     29        fi
    2630        # Sourcing first for settings, then run ext's 'start' script if it exists
    2731        if [ -d $gsdl_ext ] ; then
     
    4145    if [ -d gs2build/ext  ] ; then
    4246    for gsdl_ext in gs2build/ext/* ; do
     47        if [[ "$gsdl_ext" == *.inactive ]]; then
     48        echo "Skipping inactive extension $gsdl_ext"
     49        continue
     50        fi
    4351        # Sourcing first for settings, then run ext's 'start' script if it exists
    4452        if [ -d $gsdl_ext ] ; then
  • main/trunk/greenstone3/ant-stop-with-exts.sh

    r37758 r38983  
    2424    if [ -d ext  ] ; then
    2525    for gsdl_ext in ext/* ; do
     26        if [[ "$gsdl_ext" == *.inactive ]]; then
     27        echo "Skipping inactive extension $gsdl_ext"
     28        continue
     29        fi
    2630        # Run ext's 'stop' script if it exists,
    2731        # Then source ant-stop-settings.bash in case there are any variables
     
    4448    if [ -d gs2build/ext  ] ; then
    4549    for gsdl_ext in gs2build/ext/* ; do
     50        if [[ "$gsdl_ext" == *.inactive ]]; then
     51        echo "Skipping inactive extension $gsdl_ext"
     52        continue
     53        fi
    4654        # Run ext's 'stop' script if it exists,
    4755        # Then source ant-stop-settings.bash in case there are any variables
  • main/trunk/greenstone3/build.xml

    r38982 r38983  
    126126  <property name="solr-ext.home"     value="${basedir}/ext/solr"/>
    127127  <property name="webswing-ext.home" value="${basedir}/ext/webswing"/>
    128 
     128 
     129  <if>
     130    <bool><available file="webswing-ext.home"/></bool>   
     131    <property name="webswing-ext.exists" value="true"/>
     132  </if>
     133 
    129134  <property file="build.properties"/>
    130135  <if>
     
    27672772
    27682773  <target name="configure-webswing-ext" depends="needs-gs3-setup,init" description="Configure the webswing extension (regenerates the config files)">
     2774    <if><bool><isset property="webswing-ext.exists"/></bool>
     2775   
    27692776    <exec executable="ant.bat" osfamily="windows" dir="${webswing-ext.home}" spawn="false" failonerror="true">
    27702777      <arg value="-Dweb.home=${web.home.unix}"/>
     
    27872794      <arg value="configure-extension"/>
    27882795    </exec>
    2789 
     2796    </if>
     2797   
    27902798    <if>
    27912799      <bool><available file="${web.writablehome}/ext/webswing/etc/catalina-opts-extra.args"/></bool>
     
    27942802    <property name="webswing.catalina.opts" value=""/>
    27952803      </else>
    2796     </if>       
     2804    </if>
    27972805  </target> 
    27982806 
  • main/trunk/greenstone3/gs3-devel.sh

    r37669 r38983  
    2626    if test -e ext ; then
    2727    for gsdl_ext in ext/* ; do
    28         if [ -d $gsdl_ext ] ; then
     28        if [ -d $gsdl_ext ] ; then
     29        if [[ "$gsdl_ext" == *.inactive ]]; then
     30            echo "Skipping inactive extension $gsdl_ext"
     31            continue
     32        fi
    2933        cd $gsdl_ext > /dev/null
    3034        if test -e gs3-devel.sh ; then
  • main/trunk/greenstone3/gs3-setup-cli.sh

    r37655 r38983  
    4747if test -e ext-cli ; then
    4848    for gsdl_ext in ext-cli/* ; do
    49     if test -d $gsdl_ext ; then
     49    if test -d $gsdl_ext ; then
     50        if [[ "$gsdl_ext" == *.inactive ]]; then
     51        echo "Skipping inactive cli extension $gsdl_ext"
     52        continue
     53        fi
    5054        echo $gsdl_ext
    5155        cd $gsdl_ext > /dev/null
  • main/trunk/greenstone3/gs3-setup.sh

    r38436 r38983  
    566566    if test -e ext ; then
    567567    for gsdl_ext in ext/* ; do
    568         if [ -d $gsdl_ext ] ; then
     568        if [ -d $gsdl_ext ] ; then
     569        if [[ "$gsdl_ext" == *.inactive ]]; then
     570            echo "Skipping inactive extension $gsdl_ext"
     571            continue
     572        fi
    569573        cd $gsdl_ext > /dev/null
    570574        if test -e gs3-setup.sh ; then
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/webswing-collage.xsl

    r38967 r38983  
    145145      } else {
    146146         if(verbosity>=3) {
    147             console.log("Applet element doesn't supply param: " + webswingParam + ". Using fallback: " + webswingParams[webswingParam]);
     147            console.log("Applet element does not supply param: " + webswingParam + ". Using fallback: " + webswingParams[webswingParam]);
    148148         }
    149149      }
     
    259259                    script.src = baseUrl + "javascript/webswing-embed.js?version=" + version;
    260260                    tag.parentNode.insertBefore(script, tag);
     261
     262            if (xmlhttp.status != 200) { // possibly no webswing-server
     263              document.getElementById("webswing-collage").style.setProperty("display", "none", "important");
     264              appletEl.style.setProperty("display", "block", "important");
     265              appletEl.textContent += " cannot be displayed as the webswing extension it requires has possibly been deactivated.";
     266            }
    261267                }
    262268            };
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl

    r38965 r38983  
    263263    <xsl:with-param name="paramDefaultValue">#96c29a</xsl:with-param>
    264264      </xsl:call-template>     
    265       The Collage Applet.     
     265      The Collage Applet     
    266266   </applet>
    267267  </xsl:template>
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/webswing-gli.xsl

    r38259 r38983  
    7676              </img>       
    7777            </xsl:when>     
    78         </xsl:choose>   
    79  
     78        </xsl:choose>
     79
     80        <div id="gli-displaying" style="display:none">Webswing GLI</div>
    8081        <!--Display the description text of the current collection,
    8182        and if some services are available then create a list
     
    169170                    script.src = baseUrl + "javascript/webswing-embed.js?version=" + version;
    170171                    tag.parentNode.insertBefore(script, tag);
     172           
     173            if (xmlhttp.status != 200) { // possibly no webswing-server
     174              document.getElementById("webswing-gli").style.setProperty("display", "none", "important");
     175
     176              document.getElementById("gli-displaying").style.setProperty("display", "block", "important");
     177              document.getElementById("gli-displaying").textContent += " cannot be displayed as the webswing extension it requires has possibly been deactivated.";           
     178            }
    171179                }
    172180            };
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/webswing-phind.xsl

    r38969 r38983  
    113113        <param name="fontsize" value="10" />
    114114        <param name="blocksize" value="10" />
    115         The Phind java applet.
     115        The Phind java applet
    116116      </applet>
    117117    </xsl:template>
     
    251251      } else {
    252252         if(verbosity>=3) {
    253             console.log("Applet element doesn't supply param: " + webswingParam + ". Using fallback: " + webswingParams[webswingParam]);
     253            console.log("Applet element does not supply param: " + webswingParam + ". Using fallback: " + webswingParams[webswingParam]);
    254254         }
    255255      }
     
    353353                    script.src = baseUrl + "javascript/webswing-embed.js?version=" + version;
    354354                    tag.parentNode.insertBefore(script, tag);
     355
     356            if (xmlhttp.status != 200) { // possibly no webswing-server
     357              document.getElementById("webswing-phind").style.setProperty("display", "none", "important");
     358              appletEl.style.setProperty("display", "block", "important");
     359              appletEl.textContent += " This applet cannot be displayed as the webswing extension it requires has possibly been deactivated.";
     360            }
    355361                }
    356362            };
Note: See TracChangeset for help on using the changeset viewer.