Skip to content

Commit

Permalink
[webui] Allow timeline scroll-to-zoom without holding ALT (ray-projec…
Browse files Browse the repository at this point in the history
…t#993)

* Allow timeline scroll-to-zoom without holding ALT

* Update build_ui.sh

* Update build_ui.sh

* Update build_ui.sh

* Update build_ui.sh

* Retry when getting catapult.
  • Loading branch information
ericl authored and robertnishihara committed Sep 30, 2017
1 parent b991dc8 commit b118cef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/thirdparty/build_boost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BOOST_VERSION=1.65.1
BOOST_VERSION_UNDERSCORE=1_65_1

# Download and compile boost if it isn't already present.
if [ ! -d $TP_DIR/boost ]; then
if [[ ! -d $TP_DIR/boost ]]; then
# The wget command frequently fails, so retry up to 20 times.
for COUNT in {1..20}; do
# Attempt to wget boost and break from the retry loop if it succeeds.
Expand Down
20 changes: 14 additions & 6 deletions src/thirdparty/build_ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e

TP_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)

CATAPULT_COMMIT=33a9271eb3cf5caf925293ec6a4b47c94f1ac968
CATAPULT_COMMIT=18cd334755701cf0c3b90b7172126c686d2eb787
CATAPULT_HOME=$TP_DIR/catapult
VULCANIZE_BIN=$CATAPULT_HOME/tracing/bin/vulcanize_trace_viewer

Expand All @@ -18,7 +18,7 @@ mkdir -p $CATAPULT_FILES

if [ ! type python2 > /dev/null ]; then
echo "cannot properly set up UI without a python2 executable"
if [ "$INCLUDE_UI" == "1" ]; then
if [[ "$INCLUDE_UI" == "1" ]]; then
# Since the UI is explicitly supposed to be included, fail here.
exit 1
else
Expand All @@ -29,18 +29,26 @@ fi

# Download catapult and use it to autogenerate some static html if it isn't
# already present.
if [ ! -d $CATAPULT_HOME ]; then
if [[ ! -d $CATAPULT_HOME ]]; then
echo "setting up catapult"
# Clone the catapult repository.
git clone https://github.com/catapult-project/catapult.git $CATAPULT_HOME
# The git clone command seems to fail in Travis, so retry up to 20 times.
for COUNT in {1..20}; do
# Attempt to git clone catapult and break from the retry loop if it succeeds.
git clone https://github.com/ray-project/catapult.git $CATAPULT_HOME && break
# If none of the retries succeeded at getting boost, then fail.
if [[ $COUNT == 20 ]]; then
exit 1
fi
done

# Check out the appropriate commit from catapult.
pushd $CATAPULT_HOME
git checkout $CATAPULT_COMMIT
popd
fi

# If the autogenerated catapult files aren't present, then generate them.
if [ ! -f $CATAPULT_FILES/index.html ]; then
if [[ ! -f $CATAPULT_FILES/index.html ]]; then
python2 $VULCANIZE_BIN --config chrome --output $CATAPULT_FILES/trace_viewer_full.html
cp $CATAPULT_HOME/tracing/bin/index.html $CATAPULT_FILES/index.html
fi

0 comments on commit b118cef

Please sign in to comment.