ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [1/2] ignite git commit: IGNITE-843 Added java_home in agent.
Date Wed, 27 Jan 2016 07:37:45 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 aa03ab380 -> ee40f1205


IGNITE-843 Added java_home in agent.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/827996bc
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/827996bc
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/827996bc

Branch: refs/heads/ignite-843-rc2
Commit: 827996bc73fd14c8daf7c15fb9f8b45844d5c625
Parents: 1dccb65
Author: Andrey <anovikov@gridgain.com>
Authored: Wed Jan 27 10:32:24 2016 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Wed Jan 27 10:32:24 2016 +0700

----------------------------------------------------------------------
 .../bin/ignite-web-agent.bat                    | 35 +++++++++++++++-
 .../bin/ignite-web-agent.sh                     | 44 +++++++++++++++++++-
 .../js/app/modules/dialog/dialog.directive.js   |  6 ---
 3 files changed, 77 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/827996bc/modules/control-center-agent/bin/ignite-web-agent.bat
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/bin/ignite-web-agent.bat b/modules/control-center-agent/bin/ignite-web-agent.bat
index 8be3066..a994ab5 100644
--- a/modules/control-center-agent/bin/ignite-web-agent.bat
+++ b/modules/control-center-agent/bin/ignite-web-agent.bat
@@ -15,6 +15,39 @@
 :: limitations under the License.
 ::
 
+@echo off
+Setlocal EnableDelayedExpansion
+
+if "%OS%" == "Windows_NT"  setlocal
+
+:: Check JAVA_HOME.
+if defined JAVA_HOME  goto checkJdk
+    echo %0, ERROR:
+    echo JAVA_HOME environment variable is not found.
+    echo Please point JAVA_HOME variable to location of JDK 1.7 or JDK 1.8.
+    echo You can also download latest JDK at http://java.com/download.
+goto eof
+
+:checkJdk
+:: Check that JDK is where it should be.
+if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
+    echo %0, ERROR:
+    echo JAVA is not found in JAVA_HOME=%JAVA_HOME%.
+    echo Please point JAVA_HOME variable to installation of JDK 1.7 or JDK 1.8.
+    echo You can also download latest JDK at http://java.com/download.
+goto eof
+
+:checkJdkVersion
+"%JAVA_HOME%\bin\java.exe" -version 2>&1 | findstr "1\.[78]\." > nul
+if %ERRORLEVEL% equ 0 goto run_java
+    echo %0, ERROR:
+    echo The version of JAVA installed in %JAVA_HOME% is incorrect.
+    echo Please point JAVA_HOME variable to installation of JDK 1.7 or JDK 1.8.
+    echo You can also download latest JDK at http://java.com/download.
+goto eof
+
+:run_java
+
 ::
 :: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more
details.
 ::
@@ -22,4 +55,4 @@
 ::
 if "%JVM_OPTS%" == "" set JVM_OPTS=-Xms1g -Xmx1g -server -XX:+AggressiveOpts -XX:MaxPermSize=256m
 
-java %JVM_OPTS% -jar ignite-web-agent-${version}.jar %*
+"%JAVA_HOME%\bin\java.exe" %JVM_OPTS% -jar ignite-web-agent-${version}.jar %*

http://git-wip-us.apache.org/repos/asf/ignite/blob/827996bc/modules/control-center-agent/bin/ignite-web-agent.sh
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/bin/ignite-web-agent.sh b/modules/control-center-agent/bin/ignite-web-agent.sh
index eb7530f..f8346b4 100644
--- a/modules/control-center-agent/bin/ignite-web-agent.sh
+++ b/modules/control-center-agent/bin/ignite-web-agent.sh
@@ -16,6 +16,48 @@
 # limitations under the License.
 #
 
+# Check JAVA_HOME.
+if [ "$JAVA_HOME" = "" ]; then
+    JAVA=`type -p java`
+    RETCODE=$?
+
+    if [ $RETCODE -ne 0 ]; then
+        echo $0", ERROR:"
+        echo "JAVA_HOME environment variable is not found."
+        echo "Please point JAVA_HOME variable to location of JDK 1.7 or JDK 1.8."
+        echo "You can also download latest JDK at http://java.com/download"
+
+        exit 1
+    fi
+
+    JAVA_HOME=
+else
+    JAVA=${JAVA_HOME}/bin/java
+fi
+
+#
+# Check JDK.
+#
+if [ ! -e "$JAVA" ]; then
+    echo $0", ERROR:"
+    echo "JAVA is not found in JAVA_HOME=$JAVA_HOME."
+    echo "Please point JAVA_HOME variable to installation of JDK 1.7 or JDK 1.8."
+    echo "You can also download latest JDK at http://java.com/download"
+
+    exit 1
+fi
+
+JAVA_VER=`"$JAVA" -version 2>&1 | egrep "1\.[78]\."`
+
+if [ "$JAVA_VER" == "" ]; then
+    echo $0", ERROR:"
+    echo "The version of JAVA installed in JAVA_HOME=$JAVA_HOME is incorrect."
+    echo "Please point JAVA_HOME variable to installation of JDK 1.7 or JDK 1.8."
+    echo "You can also download latest JDK at http://java.com/download"
+
+    exit 1
+fi
+
 SOURCE="${BASH_SOURCE[0]}"
 
 DIR="$( dirname "$SOURCE" )"
@@ -42,4 +84,4 @@ if [ -z "$JVM_OPTS" ] ; then
     JVM_OPTS="-Xms1g -Xmx1g -server -XX:+AggressiveOpts -XX:MaxPermSize=256m"
 fi
 
-java ${JVM_OPTS} -jar ignite-web-agent-${version}.jar "$@"
+"$JAVA" ${JVM_OPTS} -jar ignite-web-agent-${version}.jar "$@"

http://git-wip-us.apache.org/repos/asf/ignite/blob/827996bc/modules/control-center-web/src/main/js/app/modules/dialog/dialog.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/dialog/dialog.directive.js
b/modules/control-center-web/src/main/js/app/modules/dialog/dialog.directive.js
index a034fce..e712219 100644
--- a/modules/control-center-web/src/main/js/app/modules/dialog/dialog.directive.js
+++ b/modules/control-center-web/src/main/js/app/modules/dialog/dialog.directive.js
@@ -21,12 +21,6 @@ const template = `<a ng-click='ctrl.show()'><span ng-transclude=''></span></a>`;
 
 export default ['igniteDialog', [() => {
     return {
-        scope: {
-            title: '='
-        },
-        bindToController: {
-            title: '='
-        },
         restrict: 'E',
         template,
         controller,


Mime
View raw message