Browse Source

AMBARI-17359. Using alternative library for 'Tour' module (Dharmesh Makwana via oleewere)

oleewere 9 years ago
parent
commit
b166d72737
15 changed files with 1546 additions and 564 deletions
  1. 1 1
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/index.html
  2. 72 0
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/bootstrap-tour-0.10.3/css/bootstrap-tour.css
  3. 22 0
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/bootstrap-tour-0.10.3/css/bootstrap-tour.min.css
  4. 927 0
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/bootstrap-tour-0.10.3/js/bootstrap-tour.js
  5. 21 0
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/bootstrap-tour-0.10.3/js/bootstrap-tour.min.js
  6. 0 1
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/intro/css/introjs-rtl.min.css
  7. 0 0
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/intro/css/introjs.min.css
  8. 0 34
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/intro/js/intro.min.js
  9. 4 7
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/Init.js
  10. 0 511
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/utils/Intro.js
  11. 435 0
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/utils/Tour.js
  12. 10 5
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/Header.js
  13. 1 1
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dialog/ApplySearchFilterView.js
  14. 5 2
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dialog/TimeZoneChangeView.js
  15. 48 2
      ambari-logsearch/ambari-logsearch-portal/src/main/webapp/styles/style.css

+ 1 - 1
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/index.html

@@ -36,8 +36,8 @@
 		<link rel="stylesheet" type="text/css" href="styles/animate.css">
 		<link rel="stylesheet" type="text/css" href="libs/bower/select2/select2.css">
 		<link rel="stylesheet" type="text/css" href="libs/other/nvd3/css/nv.d3.min.css">
-		<link rel="stylesheet" type="text/css" href="libs/other/intro/css/introjs.min.css">
 		<link rel="stylesheet" type="text/css" href="libs/other/gridster/css/jquery.gridster.css">
+		<link rel="stylesheet" type="text/css" href="libs/other/bootstrap-tour-0.10.3/css/bootstrap-tour.min.css">
 		<link href="styles/style_v2.css" rel="stylesheet">
 		<link href="styles/style.css" rel="stylesheet">
 		

+ 72 - 0
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/bootstrap-tour-0.10.3/css/bootstrap-tour.css

@@ -0,0 +1,72 @@
+/* ========================================================================
+ * bootstrap-tour - v0.10.2
+ * http://bootstraptour.com
+ * ========================================================================
+ * Copyright 2012-2015 Ulrich Sossou
+ *
+ * ========================================================================
+ * Licensed under the MIT License (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://opensource.org/licenses/MIT
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================================
+ */
+
+.tour-backdrop {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  z-index: 1100;
+  background-color: #000;
+  opacity: 0.8;
+  filter: alpha(opacity=80);
+}
+.tour-step-backdrop {
+  position: relative;
+  z-index: 1101;
+}
+.tour-step-backdrop > td {
+  position: relative;
+  z-index: 1101;
+}
+.tour-step-background {
+  position: absolute !important;
+  z-index: 1100;
+  background: inherit;
+  border-radius: 6px;
+}
+.popover[class*="tour-"] {
+  z-index: 1102;
+}
+.popover[class*="tour-"] .popover-navigation {
+  padding: 9px 14px;
+}
+.popover[class*="tour-"] .popover-navigation *[data-role="end"] {
+  float: right;
+}
+.popover[class*="tour-"] .popover-navigation *[data-role="prev"],
+.popover[class*="tour-"] .popover-navigation *[data-role="next"],
+.popover[class*="tour-"] .popover-navigation *[data-role="end"] {
+  cursor: pointer;
+}
+.popover[class*="tour-"] .popover-navigation *[data-role="prev"].disabled,
+.popover[class*="tour-"] .popover-navigation *[data-role="next"].disabled,
+.popover[class*="tour-"] .popover-navigation *[data-role="end"].disabled {
+  cursor: default;
+}
+.popover[class*="tour-"].orphan {
+  position: fixed;
+  margin-top: 0;
+}
+.popover[class*="tour-"].orphan .arrow {
+  display: none;
+}

+ 22 - 0
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/bootstrap-tour-0.10.3/css/bootstrap-tour.min.css

@@ -0,0 +1,22 @@
+/* ========================================================================
+ * bootstrap-tour - v0.10.2
+ * http://bootstraptour.com
+ * ========================================================================
+ * Copyright 2012-2015 Ulrich Sossou
+ *
+ * ========================================================================
+ * Licensed under the MIT License (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://opensource.org/licenses/MIT
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================================
+ */
+
+.tour-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1100;background-color:#000;opacity:.8;filter:alpha(opacity=80)}.tour-step-backdrop{position:relative;z-index:1101}.tour-step-backdrop>td{position:relative;z-index:1101}.tour-step-background{position:absolute!important;z-index:1100;background:inherit;border-radius:6px}.popover[class*=tour-]{z-index:1102}.popover[class*=tour-] .popover-navigation{padding:9px 14px}.popover[class*=tour-] .popover-navigation [data-role=end]{float:right}.popover[class*=tour-] .popover-navigation [data-role=prev],.popover[class*=tour-] .popover-navigation [data-role=next],.popover[class*=tour-] .popover-navigation [data-role=end]{cursor:pointer}.popover[class*=tour-] .popover-navigation [data-role=prev].disabled,.popover[class*=tour-] .popover-navigation [data-role=next].disabled,.popover[class*=tour-] .popover-navigation [data-role=end].disabled{cursor:default}.popover[class*=tour-].orphan{position:fixed;margin-top:0}.popover[class*=tour-].orphan .arrow{display:none}

+ 927 - 0
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/bootstrap-tour-0.10.3/js/bootstrap-tour.js

@@ -0,0 +1,927 @@
+/* ========================================================================
+ * bootstrap-tour - v0.10.2
+ * http://bootstraptour.com
+ * ========================================================================
+ * Copyright 2012-2015 Ulrich Sossou
+ *
+ * ========================================================================
+ * Licensed under the MIT License (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://opensource.org/licenses/MIT
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================================
+ */
+
+(function($, window) {
+  var Tour, document;
+  document = window.document;
+  Tour = (function() {
+    function Tour(options) {
+      var storage;
+      try {
+        storage = window.localStorage;
+      } catch (_error) {
+        storage = false;
+      }
+      this._options = $.extend({
+        name: 'tour',
+        steps: [],
+        container: 'body',
+        autoscroll: true,
+        keyboard: true,
+        storage: storage,
+        debug: false,
+        backdrop: false,
+        backdropContainer: 'body',
+        backdropPadding: 0,
+        redirect: true,
+        orphan: false,
+        duration: false,
+        delay: false,
+        basePath: '',
+        template: '<div class="popover" role="tooltip"> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation"> <div class="btn-group"> <button class="btn btn-sm btn-default" data-role="prev">&laquo; Prev</button> <button class="btn btn-sm btn-default" data-role="next">Next &raquo;</button> <button class="btn btn-sm btn-default" data-role="pause-resume" data-pause-text="Pause" data-resume-text="Resume">Pause</button> </div> <button class="btn btn-sm btn-default" data-role="end">End tour</button> </div> </div>',
+        afterSetState: function(key, value) {},
+        afterGetState: function(key, value) {},
+        afterRemoveState: function(key) {},
+        onStart: function(tour) {},
+        onEnd: function(tour) {},
+        onShow: function(tour) {},
+        onShown: function(tour) {},
+        onHide: function(tour) {},
+        onHidden: function(tour) {},
+        onNext: function(tour) {},
+        onPrev: function(tour) {},
+        onPause: function(tour, duration) {},
+        onResume: function(tour, duration) {},
+        onRedirectError: function(tour) {}
+      }, options);
+      this._force = false;
+      this._inited = false;
+      this._current = null;
+      this.backdrop = {
+        overlay: null,
+        $element: null,
+        $background: null,
+        backgroundShown: false,
+        overlayElementShown: false
+      };
+      this;
+    }
+
+    Tour.prototype.addSteps = function(steps) {
+      var step, _i, _len;
+      for (_i = 0, _len = steps.length; _i < _len; _i++) {
+        step = steps[_i];
+        this.addStep(step);
+      }
+      return this;
+    };
+
+    Tour.prototype.addStep = function(step) {
+      this._options.steps.push(step);
+      return this;
+    };
+
+    Tour.prototype.getStep = function(i) {
+      if (this._options.steps[i] != null) {
+        return $.extend({
+          id: "step-" + i,
+          path: '',
+          host: '',
+          placement: 'right',
+          title: '',
+          content: '<p></p>',
+          next: i === this._options.steps.length - 1 ? -1 : i + 1,
+          prev: i - 1,
+          animation: true,
+          container: this._options.container,
+          autoscroll: this._options.autoscroll,
+          backdrop: this._options.backdrop,
+          backdropContainer: this._options.backdropContainer,
+          backdropPadding: this._options.backdropPadding,
+          redirect: this._options.redirect,
+          reflexElement: this._options.steps[i].element,
+          orphan: this._options.orphan,
+          duration: this._options.duration,
+          delay: this._options.delay,
+          template: this._options.template,
+          onShow: this._options.onShow,
+          onShown: this._options.onShown,
+          onHide: this._options.onHide,
+          onHidden: this._options.onHidden,
+          onNext: this._options.onNext,
+          onPrev: this._options.onPrev,
+          onPause: this._options.onPause,
+          onResume: this._options.onResume,
+          onRedirectError: this._options.onRedirectError
+        }, this._options.steps[i]);
+      }
+    };
+
+    Tour.prototype.init = function(force) {
+      this._force = force;
+      if (this.ended()) {
+        this._debug('Tour ended, init prevented.');
+        return this;
+      }
+      this.setCurrentStep();
+      this._initMouseNavigation();
+      this._initKeyboardNavigation();
+      this._onResize((function(_this) {
+        return function() {
+          return _this.showStep(_this._current);
+        };
+      })(this));
+      if (this._current !== null) {
+        this.showStep(this._current);
+      }
+      this._inited = true;
+      return this;
+    };
+
+    Tour.prototype.start = function(force) {
+      var promise;
+      if (force == null) {
+        force = false;
+      }
+      if (!this._inited) {
+        this.init(force);
+      }
+      if (this._current === null) {
+        promise = this._makePromise(this._options.onStart != null ? this._options.onStart(this) : void 0);
+        this._callOnPromiseDone(promise, this.showStep, 0);
+      }
+      return this;
+    };
+
+    Tour.prototype.next = function() {
+      var promise;
+      promise = this.hideStep(this._current);
+      return this._callOnPromiseDone(promise, this._showNextStep);
+    };
+
+    Tour.prototype.prev = function() {
+      var promise;
+      promise = this.hideStep(this._current);
+      return this._callOnPromiseDone(promise, this._showPrevStep);
+    };
+
+    Tour.prototype.goTo = function(i) {
+      var promise;
+      promise = this.hideStep(this._current);
+      return this._callOnPromiseDone(promise, this.showStep, i);
+    };
+
+    Tour.prototype.end = function() {
+      var endHelper, promise;
+      endHelper = (function(_this) {
+        return function(e) {
+          $(document).off("click.tour-" + _this._options.name);
+          $(document).off("keyup.tour-" + _this._options.name);
+          $(window).off("resize.tour-" + _this._options.name);
+          _this._setState('end', 'yes');
+          _this._inited = false;
+          _this._force = false;
+          _this._clearTimer();
+          if (_this._options.onEnd != null) {
+            return _this._options.onEnd(_this);
+          }
+        };
+      })(this);
+      promise = this.hideStep(this._current);
+      return this._callOnPromiseDone(promise, endHelper);
+    };
+
+    Tour.prototype.ended = function() {
+      return !this._force && !!this._getState('end');
+    };
+
+    Tour.prototype.restart = function() {
+      this._removeState('current_step');
+      this._removeState('end');
+      this._removeState('redirect_to');
+      return this.start();
+    };
+
+    Tour.prototype.pause = function() {
+      var step;
+      step = this.getStep(this._current);
+      if (!(step && step.duration)) {
+        return this;
+      }
+      this._paused = true;
+      this._duration -= new Date().getTime() - this._start;
+      window.clearTimeout(this._timer);
+      this._debug("Paused/Stopped step " + (this._current + 1) + " timer (" + this._duration + " remaining).");
+      if (step.onPause != null) {
+        return step.onPause(this, this._duration);
+      }
+    };
+
+    Tour.prototype.resume = function() {
+      var step;
+      step = this.getStep(this._current);
+      if (!(step && step.duration)) {
+        return this;
+      }
+      this._paused = false;
+      this._start = new Date().getTime();
+      this._duration = this._duration || step.duration;
+      this._timer = window.setTimeout((function(_this) {
+        return function() {
+          if (_this._isLast()) {
+            return _this.next();
+          } else {
+            return _this.end();
+          }
+        };
+      })(this), this._duration);
+      this._debug("Started step " + (this._current + 1) + " timer with duration " + this._duration);
+      if ((step.onResume != null) && this._duration !== step.duration) {
+        return step.onResume(this, this._duration);
+      }
+    };
+
+    Tour.prototype.hideStep = function(i) {
+      var hideStepHelper, promise, step;
+      step = this.getStep(i);
+      if (!step) {
+        return;
+      }
+      this._clearTimer();
+      promise = this._makePromise(step.onHide != null ? step.onHide(this, i) : void 0);
+      hideStepHelper = (function(_this) {
+        return function(e) {
+          var $element;
+          $element = $(step.element);
+          if (!($element.data('bs.popover') || $element.data('popover'))) {
+            $element = $('body');
+          }
+          $element.popover('destroy').removeClass("tour-" + _this._options.name + "-element tour-" + _this._options.name + "-" + i + "-element");
+          $element.removeData('bs.popover');
+          if (step.reflex) {
+            $(step.reflexElement).removeClass('tour-step-element-reflex').off("" + (_this._reflexEvent(step.reflex)) + ".tour-" + _this._options.name);
+          }
+          if (step.backdrop) {
+            _this._hideBackdrop();
+          }
+          if (step.onHidden != null) {
+            return step.onHidden(_this);
+          }
+        };
+      })(this);
+      this._callOnPromiseDone(promise, hideStepHelper);
+      return promise;
+    };
+
+    Tour.prototype.showStep = function(i) {
+      var promise, showStepHelper, skipToPrevious, step;
+      if (this.ended()) {
+        this._debug('Tour ended, showStep prevented.');
+        return this;
+      }
+      step = this.getStep(i);
+      if (!step) {
+        return;
+      }
+      skipToPrevious = i < this._current;
+      promise = this._makePromise(step.onShow != null ? step.onShow(this, i) : void 0);
+      showStepHelper = (function(_this) {
+        return function(e) {
+          var path, showPopoverAndOverlay;
+          _this.setCurrentStep(i);
+          path = (function() {
+            switch ({}.toString.call(step.path)) {
+              case '[object Function]':
+                return step.path();
+              case '[object String]':
+                return this._options.basePath + step.path;
+              default:
+                return step.path;
+            }
+          }).call(_this);
+          if (_this._isRedirect(step.host, path, document.location)) {
+            _this._redirect(step, i, path);
+            if (!_this._isJustPathHashDifferent(step.host, path, document.location)) {
+              return;
+            }
+          }
+          if (_this._isOrphan(step)) {
+            if (step.orphan === false) {
+              _this._debug("Skip the orphan step " + (_this._current + 1) + ".\nOrphan option is false and the element does not exist or is hidden.");
+              if (skipToPrevious) {
+                _this._showPrevStep();
+              } else {
+                _this._showNextStep();
+              }
+              return;
+            }
+            _this._debug("Show the orphan step " + (_this._current + 1) + ". Orphans option is true.");
+          }
+          if (step.backdrop) {
+            _this._showBackdrop(step);
+          }
+          showPopoverAndOverlay = function() {
+            if (_this.getCurrentStep() !== i || _this.ended()) {
+              return;
+            }
+            if ((step.element != null) && step.backdrop) {
+              _this._showOverlayElement(step);
+            }
+            _this._showPopover(step, i);
+            if (step.onShown != null) {
+              step.onShown(_this);
+            }
+            return _this._debug("Step " + (_this._current + 1) + " of " + _this._options.steps.length);
+          };
+          if (step.autoscroll) {
+            _this._scrollIntoView(step.element, showPopoverAndOverlay);
+          } else {
+            showPopoverAndOverlay();
+          }
+          if (step.duration) {
+            return _this.resume();
+          }
+        };
+      })(this);
+      if (step.delay) {
+        this._debug("Wait " + step.delay + " milliseconds to show the step " + (this._current + 1));
+        window.setTimeout((function(_this) {
+          return function() {
+            return _this._callOnPromiseDone(promise, showStepHelper);
+          };
+        })(this), step.delay);
+      } else {
+        this._callOnPromiseDone(promise, showStepHelper);
+      }
+      return promise;
+    };
+
+    Tour.prototype.getCurrentStep = function() {
+      return this._current;
+    };
+
+    Tour.prototype.setCurrentStep = function(value) {
+      if (value != null) {
+        this._current = value;
+        this._setState('current_step', value);
+      } else {
+        this._current = this._getState('current_step');
+        this._current = this._current === null ? null : parseInt(this._current, 10);
+      }
+      return this;
+    };
+
+    Tour.prototype.redraw = function() {
+      return this._showOverlayElement(this.getStep(this.getCurrentStep()).element, true);
+    };
+
+    Tour.prototype._setState = function(key, value) {
+      var e, keyName;
+      if (this._options.storage) {
+        keyName = "" + this._options.name + "_" + key;
+        try {
+          this._options.storage.setItem(keyName, value);
+        } catch (_error) {
+          e = _error;
+          if (e.code === DOMException.QUOTA_EXCEEDED_ERR) {
+            this._debug('LocalStorage quota exceeded. State storage failed.');
+          }
+        }
+        return this._options.afterSetState(keyName, value);
+      } else {
+        if (this._state == null) {
+          this._state = {};
+        }
+        return this._state[key] = value;
+      }
+    };
+
+    Tour.prototype._removeState = function(key) {
+      var keyName;
+      if (this._options.storage) {
+        keyName = "" + this._options.name + "_" + key;
+        this._options.storage.removeItem(keyName);
+        return this._options.afterRemoveState(keyName);
+      } else {
+        if (this._state != null) {
+          return delete this._state[key];
+        }
+      }
+    };
+
+    Tour.prototype._getState = function(key) {
+      var keyName, value;
+      if (this._options.storage) {
+        keyName = "" + this._options.name + "_" + key;
+        value = this._options.storage.getItem(keyName);
+      } else {
+        if (this._state != null) {
+          value = this._state[key];
+        }
+      }
+      if (value === void 0 || value === 'null') {
+        value = null;
+      }
+      this._options.afterGetState(key, value);
+      return value;
+    };
+
+    Tour.prototype._showNextStep = function() {
+      var promise, showNextStepHelper, step;
+      step = this.getStep(this._current);
+      showNextStepHelper = (function(_this) {
+        return function(e) {
+          return _this.showStep(step.next);
+        };
+      })(this);
+      promise = this._makePromise(step.onNext != null ? step.onNext(this) : void 0);
+      return this._callOnPromiseDone(promise, showNextStepHelper);
+    };
+
+    Tour.prototype._showPrevStep = function() {
+      var promise, showPrevStepHelper, step;
+      step = this.getStep(this._current);
+      showPrevStepHelper = (function(_this) {
+        return function(e) {
+          return _this.showStep(step.prev);
+        };
+      })(this);
+      promise = this._makePromise(step.onPrev != null ? step.onPrev(this) : void 0);
+      return this._callOnPromiseDone(promise, showPrevStepHelper);
+    };
+
+    Tour.prototype._debug = function(text) {
+      if (this._options.debug) {
+        return window.console.log("Bootstrap Tour '" + this._options.name + "' | " + text);
+      }
+    };
+
+    Tour.prototype._isRedirect = function(host, path, location) {
+      var currentPath;
+      if (host !== '') {
+        if (this._isHostDifferent(host, location.href)) {
+          return true;
+        }
+      }
+      currentPath = [location.pathname, location.search, location.hash].join('');
+      return (path != null) && path !== '' && (({}.toString.call(path) === '[object RegExp]' && !path.test(currentPath)) || ({}.toString.call(path) === '[object String]' && this._isPathDifferent(path, currentPath)));
+    };
+
+    Tour.prototype._isHostDifferent = function(host, currentURL) {
+      return this._getProtocol(host) !== this._getProtocol(currentURL) || this._getHost(host) !== this._getHost(currentURL);
+    };
+
+    Tour.prototype._isPathDifferent = function(path, currentPath) {
+      return this._getPath(path) !== this._getPath(currentPath) || !this._equal(this._getQuery(path), this._getQuery(currentPath)) || !this._equal(this._getHash(path), this._getHash(currentPath));
+    };
+
+    Tour.prototype._isJustPathHashDifferent = function(host, path, location) {
+      var currentPath;
+      if (host !== '') {
+        if (this._isHostDifferent(host, location.href)) {
+          return false;
+        }
+      }
+      currentPath = [location.pathname, location.search, location.hash].join('');
+      if ({}.toString.call(path) === '[object String]') {
+        return this._getPath(path) === this._getPath(currentPath) && this._equal(this._getQuery(path), this._getQuery(currentPath)) && !this._equal(this._getHash(path), this._getHash(currentPath));
+      }
+      return false;
+    };
+
+    Tour.prototype._redirect = function(step, i, path) {
+      if ($.isFunction(step.redirect)) {
+        return step.redirect.call(this, path);
+      } else if (step.redirect === true) {
+        this._debug("Redirect to " + step.host + path);
+        if (this._getState('redirect_to') === ("" + i)) {
+          this._debug("Error redirection loop to " + path);
+          this._removeState('redirect_to');
+          if (step.onRedirectError != null) {
+            return step.onRedirectError(this);
+          }
+        } else {
+          this._setState('redirect_to', "" + i);
+          return document.location.href = "" + step.host + path;
+        }
+      }
+    };
+
+    Tour.prototype._isOrphan = function(step) {
+      return (step.element == null) || !$(step.element).length || $(step.element).is(':hidden') && ($(step.element)[0].namespaceURI !== 'http://www.w3.org/2000/svg');
+    };
+
+    Tour.prototype._isLast = function() {
+      return this._current < this._options.steps.length - 1;
+    };
+
+    Tour.prototype._showPopover = function(step, i) {
+      var $element, $tip, isOrphan, options, shouldAddSmart;
+      $(".tour-" + this._options.name).remove();
+      options = $.extend({}, this._options);
+      isOrphan = this._isOrphan(step);
+      step.template = this._template(step, i);
+      if (isOrphan) {
+        step.element = 'body';
+        step.placement = 'top';
+      }
+      $element = $(step.element);
+      $element.addClass("tour-" + this._options.name + "-element tour-" + this._options.name + "-" + i + "-element");
+      if (step.options) {
+        $.extend(options, step.options);
+      }
+      if (step.reflex && !isOrphan) {
+        $(step.reflexElement).addClass('tour-step-element-reflex').off("" + (this._reflexEvent(step.reflex)) + ".tour-" + this._options.name).on("" + (this._reflexEvent(step.reflex)) + ".tour-" + this._options.name, (function(_this) {
+          return function() {
+            if (_this._isLast()) {
+              return _this.next();
+            } else {
+              return _this.end();
+            }
+          };
+        })(this));
+      }
+      shouldAddSmart = step.smartPlacement === true && step.placement.search(/auto/i) === -1;
+      $element.popover({
+        placement: shouldAddSmart ? "auto " + step.placement : step.placement,
+        trigger: 'manual',
+        title: step.title,
+        content: step.content,
+        html: true,
+        animation: step.animation,
+        container: step.container,
+        template: step.template,
+        selector: step.element
+      }).popover('show');
+      $tip = $element.data('bs.popover') ? $element.data('bs.popover').tip() : $element.data('popover').tip();
+      $tip.attr('id', step.id);
+      this._reposition($tip, step);
+      if (isOrphan) {
+        return this._center($tip);
+      }
+    };
+
+    Tour.prototype._template = function(step, i) {
+      var $navigation, $next, $prev, $resume, $template, template;
+      template = step.template;
+      if (this._isOrphan(step) && {}.toString.call(step.orphan) !== '[object Boolean]') {
+        template = step.orphan;
+      }
+      $template = $.isFunction(template) ? $(template(i, step)) : $(template);
+      $navigation = $template.find('.popover-navigation');
+      $prev = $navigation.find('[data-role="prev"]');
+      $next = $navigation.find('[data-role="next"]');
+      $resume = $navigation.find('[data-role="pause-resume"]');
+      if (this._isOrphan(step)) {
+        $template.addClass('orphan');
+      }
+      $template.addClass("tour-" + this._options.name + " tour-" + this._options.name + "-" + i);
+      if (step.reflex) {
+        $template.addClass("tour-" + this._options.name + "-reflex");
+      }
+      if (step.prev < 0) {
+        $prev.addClass('disabled');
+        $prev.prop('disabled', true);
+      }
+      if (step.next < 0) {
+        $next.addClass('disabled');
+        $next.prop('disabled', true);
+      }
+      if (!step.duration) {
+        $resume.remove();
+      }
+      return $template.clone().wrap('<div>').parent().html();
+    };
+
+    Tour.prototype._reflexEvent = function(reflex) {
+      if ({}.toString.call(reflex) === '[object Boolean]') {
+        return 'click';
+      } else {
+        return reflex;
+      }
+    };
+
+    Tour.prototype._reposition = function($tip, step) {
+      var offsetBottom, offsetHeight, offsetRight, offsetWidth, originalLeft, originalTop, tipOffset;
+      offsetWidth = $tip[0].offsetWidth;
+      offsetHeight = $tip[0].offsetHeight;
+      tipOffset = $tip.offset();
+      originalLeft = tipOffset.left;
+      originalTop = tipOffset.top;
+      offsetBottom = $(document).outerHeight() - tipOffset.top - $tip.outerHeight();
+      if (offsetBottom < 0) {
+        tipOffset.top = tipOffset.top + offsetBottom;
+      }
+      offsetRight = $('html').outerWidth() - tipOffset.left - $tip.outerWidth();
+      if (offsetRight < 0) {
+        tipOffset.left = tipOffset.left + offsetRight;
+      }
+      if (tipOffset.top < 0) {
+        tipOffset.top = 0;
+      }
+      if (tipOffset.left < 0) {
+        tipOffset.left = 0;
+      }
+      $tip.offset(tipOffset);
+      if (step.placement === 'bottom' || step.placement === 'top') {
+        if (originalLeft !== tipOffset.left) {
+          return this._replaceArrow($tip, (tipOffset.left - originalLeft) * 2, offsetWidth, 'left');
+        }
+      } else {
+        if (originalTop !== tipOffset.top) {
+          return this._replaceArrow($tip, (tipOffset.top - originalTop) * 2, offsetHeight, 'top');
+        }
+      }
+    };
+
+    Tour.prototype._center = function($tip) {
+      return $tip.css('top', $(window).outerHeight() / 2 - $tip.outerHeight() / 2);
+    };
+
+    Tour.prototype._replaceArrow = function($tip, delta, dimension, position) {
+      return $tip.find('.arrow').css(position, delta ? 50 * (1 - delta / dimension) + '%' : '');
+    };
+
+    Tour.prototype._scrollIntoView = function(element, callback) {
+      var $element, $window, counter, offsetTop, scrollTop, windowHeight;
+      $element = $(element);
+      if (!$element.length) {
+        return callback();
+      }
+      $window = $(window);
+      offsetTop = $element.offset().top;
+      windowHeight = $window.height();
+      scrollTop = Math.max(0, offsetTop - (windowHeight / 2));
+      this._debug("Scroll into view. ScrollTop: " + scrollTop + ". Element offset: " + offsetTop + ". Window height: " + windowHeight + ".");
+      counter = 0;
+      return $('body, html').stop(true, true).animate({
+        scrollTop: Math.ceil(scrollTop)
+      }, (function(_this) {
+        return function() {
+          if (++counter === 2) {
+            callback();
+            return _this._debug("Scroll into view.\nAnimation end element offset: " + ($element.offset().top) + ".\nWindow height: " + ($window.height()) + ".");
+          }
+        };
+      })(this));
+    };
+
+    Tour.prototype._onResize = function(callback, timeout) {
+      return $(window).on("resize.tour-" + this._options.name, function() {
+        clearTimeout(timeout);
+        return timeout = setTimeout(callback, 100);
+      });
+    };
+
+    Tour.prototype._initMouseNavigation = function() {
+      var _this;
+      _this = this;
+      return $(document).off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='prev']").off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='next']").off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='end']").off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='pause-resume']").on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='next']", (function(_this) {
+        return function(e) {
+          e.preventDefault();
+          return _this.next();
+        };
+      })(this)).on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='prev']", (function(_this) {
+        return function(e) {
+          e.preventDefault();
+          return _this.prev();
+        };
+      })(this)).on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='end']", (function(_this) {
+        return function(e) {
+          e.preventDefault();
+          return _this.end();
+        };
+      })(this)).on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='pause-resume']", function(e) {
+        var $this;
+        e.preventDefault();
+        $this = $(this);
+        $this.text(_this._paused ? $this.data('pause-text') : $this.data('resume-text'));
+        if (_this._paused) {
+          return _this.resume();
+        } else {
+          return _this.pause();
+        }
+      });
+    };
+
+    Tour.prototype._initKeyboardNavigation = function() {
+      if (!this._options.keyboard) {
+        return;
+      }
+      return $(document).on("keyup.tour-" + this._options.name, (function(_this) {
+        return function(e) {
+          if (!e.which) {
+            return;
+          }
+          switch (e.which) {
+            case 39:
+              e.preventDefault();
+              if (_this._isLast()) {
+                return _this.next();
+              } else {
+                return _this.end();
+              }
+              break;
+            case 37:
+              e.preventDefault();
+              if (_this._current > 0) {
+                return _this.prev();
+              }
+              break;
+            case 27:
+              e.preventDefault();
+              return _this.end();
+          }
+        };
+      })(this));
+    };
+
+    Tour.prototype._makePromise = function(result) {
+      if (result && $.isFunction(result.then)) {
+        return result;
+      } else {
+        return null;
+      }
+    };
+
+    Tour.prototype._callOnPromiseDone = function(promise, cb, arg) {
+      if (promise) {
+        return promise.then((function(_this) {
+          return function(e) {
+            return cb.call(_this, arg);
+          };
+        })(this));
+      } else {
+        return cb.call(this, arg);
+      }
+    };
+
+    Tour.prototype._showBackdrop = function(step) {
+      if (this.backdrop.backgroundShown) {
+        return;
+      }
+      this.backdrop = $('<div>', {
+        "class": 'tour-backdrop'
+      });
+      this.backdrop.backgroundShown = true;
+      return $(step.backdropContainer).append(this.backdrop);
+    };
+
+    Tour.prototype._hideBackdrop = function() {
+      this._hideOverlayElement();
+      return this._hideBackground();
+    };
+
+    Tour.prototype._hideBackground = function() {
+      if (this.backdrop) {
+        this.backdrop.remove();
+        this.backdrop.overlay = null;
+        return this.backdrop.backgroundShown = false;
+      }
+    };
+
+    Tour.prototype._showOverlayElement = function(step, force) {
+      var $element, elementData;
+      $element = $(step.element);
+      if (!$element || $element.length === 0 || this.backdrop.overlayElementShown && !force) {
+        return;
+      }
+      if (!this.backdrop.overlayElementShown) {
+        this.backdrop.$element = $element.addClass('tour-step-backdrop');
+        this.backdrop.$background = $('<div>', {
+          "class": 'tour-step-background'
+        });
+        this.backdrop.$background.appendTo(step.backdropContainer);
+        this.backdrop.overlayElementShown = true;
+      }
+      elementData = {
+        width: $element.innerWidth(),
+        height: $element.innerHeight(),
+        offset: $element.offset()
+      };
+      if (step.backdropPadding) {
+        elementData = this._applyBackdropPadding(step.backdropPadding, elementData);
+      }
+      return this.backdrop.$background.width(elementData.width).height(elementData.height).offset(elementData.offset);
+    };
+
+    Tour.prototype._hideOverlayElement = function() {
+      if (!this.backdrop.overlayElementShown) {
+        return;
+      }
+      this.backdrop.$element.removeClass('tour-step-backdrop');
+      this.backdrop.$background.remove();
+      this.backdrop.$element = null;
+      this.backdrop.$background = null;
+      return this.backdrop.overlayElementShown = false;
+    };
+
+    Tour.prototype._applyBackdropPadding = function(padding, data) {
+      if (typeof padding === 'object') {
+        if (padding.top == null) {
+          padding.top = 0;
+        }
+        if (padding.right == null) {
+          padding.right = 0;
+        }
+        if (padding.bottom == null) {
+          padding.bottom = 0;
+        }
+        if (padding.left == null) {
+          padding.left = 0;
+        }
+        data.offset.top = data.offset.top - padding.top;
+        data.offset.left = data.offset.left - padding.left;
+        data.width = data.width + padding.left + padding.right;
+        data.height = data.height + padding.top + padding.bottom;
+      } else {
+        data.offset.top = data.offset.top - padding;
+        data.offset.left = data.offset.left - padding;
+        data.width = data.width + (padding * 2);
+        data.height = data.height + (padding * 2);
+      }
+      return data;
+    };
+
+    Tour.prototype._clearTimer = function() {
+      window.clearTimeout(this._timer);
+      this._timer = null;
+      return this._duration = null;
+    };
+
+    Tour.prototype._getProtocol = function(url) {
+      url = url.split('://');
+      if (url.length > 1) {
+        return url[0];
+      } else {
+        return 'http';
+      }
+    };
+
+    Tour.prototype._getHost = function(url) {
+      url = url.split('//');
+      url = url.length > 1 ? url[1] : url[0];
+      return url.split('/')[0];
+    };
+
+    Tour.prototype._getPath = function(path) {
+      return path.replace(/\/?$/, '').split('?')[0].split('#')[0];
+    };
+
+    Tour.prototype._getQuery = function(path) {
+      return this._getParams(path, '?');
+    };
+
+    Tour.prototype._getHash = function(path) {
+      return this._getParams(path, '#');
+    };
+
+    Tour.prototype._getParams = function(path, start) {
+      var param, params, paramsObject, _i, _len;
+      params = path.split(start);
+      if (params.length === 1) {
+        return {};
+      }
+      params = params[1].split('&');
+      paramsObject = {};
+      for (_i = 0, _len = params.length; _i < _len; _i++) {
+        param = params[_i];
+        param = param.split('=');
+        paramsObject[param[0]] = param[1] || '';
+      }
+      return paramsObject;
+    };
+
+    Tour.prototype._equal = function(obj1, obj2) {
+      var k, v;
+      if ({}.toString.call(obj1) === '[object Object]' && {}.toString.call(obj2) === '[object Object]') {
+        for (k in obj1) {
+          v = obj1[k];
+          if (obj2[k] !== v) {
+            return false;
+          }
+        }
+        for (k in obj2) {
+          v = obj2[k];
+          if (obj1[k] !== v) {
+            return false;
+          }
+        }
+        return true;
+      }
+      return obj1 === obj2;
+    };
+
+    return Tour;
+
+  })();
+  return window.Tour = Tour;
+})(jQuery, window);

File diff suppressed because it is too large
+ 21 - 0
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/bootstrap-tour-0.10.3/js/bootstrap-tour.min.js


+ 0 - 1
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/intro/css/introjs-rtl.min.css

@@ -1 +0,0 @@
-.introjs-tooltipbuttons{text-align:left}.introjs-skipbutton{margin-left:5px}.introjs-tooltip{direction:rtl}.introjs-prevbutton{border:1px solid #d4d4d4;border-left:none;-webkit-border-radius:0 .2em .2em 0;-moz-border-radius:0 .2em .2em 0;border-radius:0 .2em .2em 0}.introjs-nextbutton{border:1px solid #d4d4d4;-webkit-border-radius:.2em 0 0 .2em;-moz-border-radius:.2em 0 0 .2em;border-radius:.2em 0 0 .2em}

File diff suppressed because it is too large
+ 0 - 0
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/intro/css/introjs.min.css


+ 0 - 34
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/libs/other/intro/js/intro.min.js

@@ -1,34 +0,0 @@
-(function(B,n){"object"===typeof exports?n(exports):"function"===typeof define&&define.amd?define(["exports"],n):n(B)})(this,function(B){function n(a){this._targetElement=a;this._options={nextLabel:"Next &rarr;",prevLabel:"&larr; Back",skipLabel:"Skip",doneLabel:"Done",tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,overlayOpacity:0.8,positionPrecedence:["bottom",
-"top","right","left"],disableInteraction:!1}}function M(a){var b=[],c=this;if(this._options.steps)for(var e=0,d=this._options.steps.length;e<d;e++){var f=H(this._options.steps[e]);f.step=b.length+1;"string"===typeof f.element&&(f.element=document.querySelector(f.element));if("undefined"===typeof f.element||null==f.element){var h=document.querySelector(".introjsFloatingElement");null==h&&(h=document.createElement("div"),h.className="introjsFloatingElement",document.body.appendChild(h));f.element=h;
-f.position="floating"}null!=f.element&&b.push(f)}else{d=a.querySelectorAll("*[data-intro]");if(1>d.length)return!1;e=0;for(f=d.length;e<f;e++){var h=d[e],q=parseInt(h.getAttribute("data-step"),10);0<q&&(b[q-1]={element:h,intro:h.getAttribute("data-intro"),step:parseInt(h.getAttribute("data-step"),10),tooltipClass:h.getAttribute("data-tooltipClass"),highlightClass:h.getAttribute("data-highlightClass"),position:h.getAttribute("data-position")||this._options.tooltipPosition})}e=q=0;for(f=d.length;e<
-f;e++)if(h=d[e],null==h.getAttribute("data-step")){for(;"undefined"!=typeof b[q];)q++;b[q]={element:h,intro:h.getAttribute("data-intro"),step:q+1,tooltipClass:h.getAttribute("data-tooltipClass"),highlightClass:h.getAttribute("data-highlightClass"),position:h.getAttribute("data-position")||this._options.tooltipPosition}}}e=[];for(d=0;d<b.length;d++)b[d]&&e.push(b[d]);b=e;b.sort(function(a,b){return a.step-b.step});c._introItems=b;N.call(c,a)&&(x.call(c),a.querySelector(".introjs-skipbutton"),a.querySelector(".introjs-nextbutton"),
-c._onKeyDown=function(b){if(27===b.keyCode&&!0==c._options.exitOnEsc)void 0!=c._introExitCallback&&c._introExitCallback.call(c),y.call(c,a);else if(37===b.keyCode)C.call(c);else if(39===b.keyCode)x.call(c);else if(13===b.keyCode){var d=b.target||b.srcElement;d&&0<d.className.indexOf("introjs-prevbutton")?C.call(c):d&&0<d.className.indexOf("introjs-skipbutton")?(c._introItems.length-1==c._currentStep&&"function"===typeof c._introCompleteCallback&&c._introCompleteCallback.call(c),void 0!=c._introExitCallback&&
-c._introExitCallback.call(c),y.call(c,a)):x.call(c);b.preventDefault?b.preventDefault():b.returnValue=!1}},c._onResize=function(a){t.call(c,document.querySelector(".introjs-helperLayer"));t.call(c,document.querySelector(".introjs-tooltipReferenceLayer"))},window.addEventListener?(this._options.keyboardNavigation&&window.addEventListener("keydown",c._onKeyDown,!0),window.addEventListener("resize",c._onResize,!0)):document.attachEvent&&(this._options.keyboardNavigation&&document.attachEvent("onkeydown",
-c._onKeyDown),document.attachEvent("onresize",c._onResize)));return!1}function H(a){if(null==a||"object"!=typeof a||"undefined"!=typeof a.nodeType)return a;var b={},c;for(c in a)b[c]="undefined"!=typeof jQuery&&a[c]instanceof jQuery?a[c]:H(a[c]);return b}function x(){this._direction="forward";"undefined"===typeof this._currentStep?this._currentStep=0:++this._currentStep;if(this._introItems.length<=this._currentStep)"function"===typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),
-y.call(this,this._targetElement);else{var a=this._introItems[this._currentStep];"undefined"!==typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,a.element);I.call(this,a)}}function C(){this._direction="backward";if(0===this._currentStep)return!1;var a=this._introItems[--this._currentStep];"undefined"!==typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,a.element);I.call(this,a)}function y(a){var b=a.querySelector(".introjs-overlay");if(null!=
-b){b.style.opacity=0;setTimeout(function(){b.parentNode&&b.parentNode.removeChild(b)},500);var c=a.querySelector(".introjs-helperLayer");c&&c.parentNode.removeChild(c);(c=a.querySelector(".introjs-tooltipReferenceLayer"))&&c.parentNode.removeChild(c);(a=a.querySelector(".introjs-disableInteraction"))&&a.parentNode.removeChild(a);(a=document.querySelector(".introjsFloatingElement"))&&a.parentNode.removeChild(a);if(a=document.querySelector(".introjs-showElement"))a.className=a.className.replace(/introjs-[a-zA-Z]+/g,
-"").replace(/^\s+|\s+$/g,"");if((a=document.querySelectorAll(".introjs-fixParent"))&&0<a.length)for(c=a.length-1;0<=c;c--)a[c].className=a[c].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");window.removeEventListener?window.removeEventListener("keydown",this._onKeyDown,!0):document.detachEvent&&document.detachEvent("onkeydown",this._onKeyDown);this._currentStep=void 0}}function J(a,b,c,e){var d="",f,h;b.style.top=null;b.style.right=null;b.style.bottom=null;b.style.left=null;b.style.marginLeft=
-null;b.style.marginTop=null;c.style.display="inherit";"undefined"!=typeof e&&null!=e&&(e.style.top=null,e.style.left=null);if(this._introItems[this._currentStep]){d=this._introItems[this._currentStep];d="string"===typeof d.tooltipClass?d.tooltipClass:this._options.tooltipClass;b.className=("introjs-tooltip "+d).replace(/^\s+|\s+$/g,"");h=this._introItems[this._currentStep].position;if(("auto"==h||"auto"==this._options.tooltipPosition)&&"floating"!=h){d=h;f=this._options.positionPrecedence.slice();
-h=F();var q=v(b).height+10,r=v(b).width+20,k=v(a),l="floating";k.left+r>h.width||0>k.left+k.width/2-r?(s(f,"bottom"),s(f,"top")):(k.height+k.top+q>h.height&&s(f,"bottom"),0>k.top-q&&s(f,"top"));k.width+k.left+r>h.width&&s(f,"right");0>k.left-r&&s(f,"left");0<f.length&&(l=f[0]);d&&"auto"!=d&&-1<f.indexOf(d)&&(l=d);h=l}d=v(a);a=v(b);f=F();switch(h){case "top":c.className="introjs-arrow bottom";z(d,15,a,f,b);b.style.bottom=d.height+20+"px";break;case "right":b.style.left=d.width+20+"px";d.top+a.height>
-f.height?(c.className="introjs-arrow left-bottom",b.style.top="-"+(a.height-d.height-20)+"px"):c.className="introjs-arrow left";break;case "left":!0==this._options.showStepNumbers&&(b.style.top="15px");d.top+a.height>f.height?(b.style.top="-"+(a.height-d.height-20)+"px",c.className="introjs-arrow right-bottom"):c.className="introjs-arrow right";b.style.right=d.width+20+"px";break;case "floating":c.style.display="none";b.style.left="50%";b.style.top="50%";b.style.marginLeft="-"+a.width/2+"px";b.style.marginTop=
-"-"+a.height/2+"px";"undefined"!=typeof e&&null!=e&&(e.style.left="-"+(a.width/2+18)+"px",e.style.top="-"+(a.height/2+18)+"px");break;case "bottom-right-aligned":c.className="introjs-arrow top-right";K(d,0,a,b);b.style.top=d.height+20+"px";break;case "bottom-middle-aligned":c.className="introjs-arrow top-middle";c=d.width/2-a.width/2;K(d,c,a,b)&&(b.style.right=null,z(d,c,a,f,b));b.style.top=d.height+20+"px";break;default:c.className="introjs-arrow top",z(d,0,a,f,b),b.style.top=d.height+20+"px"}}}
-function z(a,b,c,e,d){if(a.left+b+c.width>e.width)return d.style.left=e.width-c.width-a.left+"px",!1;d.style.left=b+"px";return!0}function K(a,b,c,e){if(0>a.left+a.width-b-c.width)return e.style.left=-a.left+"px",!1;e.style.right=b+"px";return!0}function s(a,b){-1<a.indexOf(b)&&a.splice(a.indexOf(b),1)}function t(a){if(a&&this._introItems[this._currentStep]){var b=this._introItems[this._currentStep],c=v(b.element),e=10;"floating"==b.position&&(e=0);a.setAttribute("style","width: "+(c.width+e)+"px; height:"+
-(c.height+e)+"px; top:"+(c.top-5)+"px;left: "+(c.left-5)+"px;")}}function O(){var a=document.querySelector(".introjs-disableInteraction");null===a&&(a=document.createElement("div"),a.className="introjs-disableInteraction",this._targetElement.appendChild(a));t.call(this,a)}function I(a){"undefined"!==typeof this._introChangeCallback&&this._introChangeCallback.call(this,a.element);var b=this,c=document.querySelector(".introjs-helperLayer"),e=document.querySelector(".introjs-tooltipReferenceLayer"),
-d="introjs-helperLayer";v(a.element);"string"===typeof a.highlightClass&&(d+=" "+a.highlightClass);"string"===typeof this._options.highlightClass&&(d+=" "+this._options.highlightClass);if(null!=c){var f=e.querySelector(".introjs-helperNumberLayer"),h=e.querySelector(".introjs-tooltiptext"),q=e.querySelector(".introjs-arrow"),r=e.querySelector(".introjs-tooltip"),k=e.querySelector(".introjs-skipbutton"),l=e.querySelector(".introjs-prevbutton"),p=e.querySelector(".introjs-nextbutton");c.className=d;
-r.style.opacity=0;r.style.display="none";if(null!=f){var g=this._introItems[0<=a.step-2?a.step-2:0];if(null!=g&&"forward"==this._direction&&"floating"==g.position||"backward"==this._direction&&"floating"==a.position)f.style.opacity=0}t.call(b,c);t.call(b,e);if((g=document.querySelectorAll(".introjs-fixParent"))&&0<g.length)for(d=g.length-1;0<=d;d--)g[d].className=g[d].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");g=document.querySelector(".introjs-showElement");g.className=g.className.replace(/introjs-[a-zA-Z]+/g,
-"").replace(/^\s+|\s+$/g,"");b._lastShowElementTimer&&clearTimeout(b._lastShowElementTimer);b._lastShowElementTimer=setTimeout(function(){null!=f&&(f.innerHTML=a.step);h.innerHTML=a.intro;r.style.display="block";J.call(b,a.element,r,q,f);e.querySelector(".introjs-bullets li > a.active").className="";e.querySelector('.introjs-bullets li > a[data-stepnumber="'+a.step+'"]').className="active";e.querySelector(".introjs-progress .introjs-progressbar").setAttribute("style","width:"+L.call(b)+"%;");r.style.opacity=
-1;f&&(f.style.opacity=1);-1===p.tabIndex?k.focus():p.focus()},350)}else{var n=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div"),m=document.createElement("div"),s=document.createElement("div"),D=document.createElement("div"),E=document.createElement("div"),u=document.createElement("div");n.className=d;l.className="introjs-tooltipReferenceLayer";t.call(b,n);t.call(b,l);this._targetElement.appendChild(n);this._targetElement.appendChild(l);c.className="introjs-arrow";
-s.className="introjs-tooltiptext";s.innerHTML=a.intro;D.className="introjs-bullets";!1===this._options.showBullets&&(D.style.display="none");for(var n=document.createElement("ul"),d=0,B=this._introItems.length;d<B;d++){var z=document.createElement("li"),A=document.createElement("a");A.onclick=function(){b.goToStep(this.getAttribute("data-stepnumber"))};d===a.step-1&&(A.className="active");A.href="javascript:void(0);";A.innerHTML="&nbsp;";A.setAttribute("data-stepnumber",this._introItems[d].step);
-z.appendChild(A);n.appendChild(z)}D.appendChild(n);E.className="introjs-progress";!1===this._options.showProgress&&(E.style.display="none");d=document.createElement("div");d.className="introjs-progressbar";d.setAttribute("style","width:"+L.call(this)+"%;");E.appendChild(d);u.className="introjs-tooltipbuttons";!1===this._options.showButtons&&(u.style.display="none");m.className="introjs-tooltip";m.appendChild(s);m.appendChild(D);m.appendChild(E);!0==this._options.showStepNumbers&&(g=document.createElement("span"),
-g.className="introjs-helperNumberLayer",g.innerHTML=a.step,l.appendChild(g));m.appendChild(c);l.appendChild(m);p=document.createElement("a");p.onclick=function(){b._introItems.length-1!=b._currentStep&&x.call(b)};p.href="javascript:void(0);";p.innerHTML=this._options.nextLabel;l=document.createElement("a");l.onclick=function(){0!=b._currentStep&&C.call(b)};l.href="javascript:void(0);";l.innerHTML=this._options.prevLabel;k=document.createElement("a");k.className="introjs-button introjs-skipbutton";
-k.href="javascript:void(0);";k.innerHTML=this._options.skipLabel;k.onclick=function(){b._introItems.length-1==b._currentStep&&"function"===typeof b._introCompleteCallback&&b._introCompleteCallback.call(b);b._introItems.length-1!=b._currentStep&&"function"===typeof b._introExitCallback&&b._introExitCallback.call(b);y.call(b,b._targetElement)};u.appendChild(k);1<this._introItems.length&&(u.appendChild(l),u.appendChild(p));m.appendChild(u);J.call(b,a.element,m,c,g)}!0===this._options.disableInteraction&&
-O.call(b);l.removeAttribute("tabIndex");p.removeAttribute("tabIndex");0==this._currentStep&&1<this._introItems.length?(l.className="introjs-button introjs-prevbutton introjs-disabled",l.tabIndex="-1",p.className="introjs-button introjs-nextbutton",k.innerHTML=this._options.skipLabel):this._introItems.length-1==this._currentStep||1==this._introItems.length?(k.innerHTML=this._options.doneLabel,l.className="introjs-button introjs-prevbutton",p.className="introjs-button introjs-nextbutton introjs-disabled",
-p.tabIndex="-1"):(l.className="introjs-button introjs-prevbutton",p.className="introjs-button introjs-nextbutton",k.innerHTML=this._options.skipLabel);p.focus();a.element.className+=" introjs-showElement";g=w(a.element,"position");"absolute"!==g&&"relative"!==g&&(a.element.className+=" introjs-relativePosition");for(g=a.element.parentNode;null!=g&&"body"!==g.tagName.toLowerCase();){c=w(g,"z-index");m=parseFloat(w(g,"opacity"));u=w(g,"transform")||w(g,"-webkit-transform")||w(g,"-moz-transform")||w(g,
-"-ms-transform")||w(g,"-o-transform");if(/[0-9]+/.test(c)||1>m||"none"!==u&&void 0!==u)g.className+=" introjs-fixParent";g=g.parentNode}P(a.element)||!0!==this._options.scrollToElement||(m=a.element.getBoundingClientRect(),g=F().height,c=m.bottom-(m.bottom-m.top),m=m.bottom-g,0>c||a.element.clientHeight>g?window.scrollBy(0,c-30):window.scrollBy(0,m+100));"undefined"!==typeof this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,a.element)}function w(a,b){var c="";a.currentStyle?
-c=a.currentStyle[b]:document.defaultView&&document.defaultView.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b));return c&&c.toLowerCase?c.toLowerCase():c}function F(){if(void 0!=window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var a=document.documentElement;return{width:a.clientWidth,height:a.clientHeight}}function P(a){a=a.getBoundingClientRect();return 0<=a.top&&0<=a.left&&a.bottom+80<=window.innerHeight&&a.right<=window.innerWidth}
-function N(a){var b=document.createElement("div"),c="",e=this;b.className="introjs-overlay";if("body"===a.tagName.toLowerCase())c+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",b.setAttribute("style",c);else{var d=v(a);d&&(c+="width: "+d.width+"px; height:"+d.height+"px; top:"+d.top+"px;left: "+d.left+"px;",b.setAttribute("style",c))}a.appendChild(b);b.onclick=function(){!0==e._options.exitOnOverlayClick&&(void 0!=e._introExitCallback&&e._introExitCallback.call(e),y.call(e,a))};setTimeout(function(){c+=
-"opacity: "+e._options.overlayOpacity.toString()+";";b.setAttribute("style",c)},10);return!0}function v(a){var b={};b.width=a.offsetWidth;b.height=a.offsetHeight;for(var c=0,e=0;a&&!isNaN(a.offsetLeft)&&!isNaN(a.offsetTop);)c+=a.offsetLeft,e+=a.offsetTop,a=a.offsetParent;b.top=e;b.left=c;return b}function L(){return 100*(parseInt(this._currentStep+1,10)/this._introItems.length)}var G=function(a){if("object"===typeof a)return new n(a);if("string"===typeof a){if(a=document.querySelector(a))return new n(a);
-throw Error("There is no element with given selector.");}return new n(document.body)};G.version="1.0.0";G.fn=n.prototype={clone:function(){return new n(this)},setOption:function(a,b){this._options[a]=b;return this},setOptions:function(a){var b=this._options,c={},e;for(e in b)c[e]=b[e];for(e in a)c[e]=a[e];this._options=c;return this},start:function(){M.call(this,this._targetElement);return this},goToStep:function(a){this._currentStep=a-2;"undefined"!==typeof this._introItems&&x.call(this);return this},
-nextStep:function(){x.call(this);return this},previousStep:function(){C.call(this);return this},exit:function(){y.call(this,this._targetElement);return this},refresh:function(){t.call(this,document.querySelector(".introjs-helperLayer"));t.call(this,document.querySelector(".introjs-tooltipReferenceLayer"));return this},onbeforechange:function(a){if("function"===typeof a)this._introBeforeChangeCallback=a;else throw Error("Provided callback for onbeforechange was not a function");return this},onchange:function(a){if("function"===
-typeof a)this._introChangeCallback=a;else throw Error("Provided callback for onchange was not a function.");return this},onafterchange:function(a){if("function"===typeof a)this._introAfterChangeCallback=a;else throw Error("Provided callback for onafterchange was not a function");return this},oncomplete:function(a){if("function"===typeof a)this._introCompleteCallback=a;else throw Error("Provided callback for oncomplete was not a function.");return this},onexit:function(a){if("function"===typeof a)this._introExitCallback=
-a;else throw Error("Provided callback for onexit was not a function.");return this}};return B.introJs=G});

+ 4 - 7
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/Init.js

@@ -137,12 +137,6 @@
          noty: {
              deps: ['jquery'],
          },
-         timeline: {
-             deps: ['jquery']
-         },
-         intro: {
-             exports: 'introJs'
-         },
          WorldMapGenerator: {
              deps: ['jquery']
          },
@@ -157,6 +151,9 @@
          },
          dashboard: {
              deps: ['jquery', 'jquery-ui', 'gridster']
+         },
+         tour : {
+            exports : 'tour'
          }
 
      },
@@ -219,13 +216,13 @@
          'd3.tip': "../libs/other/d3/d3.tip",
          'nv': "../libs/other/nvd3/js/nv.d3",
          'noty': '../libs/other/noty/jquery.noty.packaged',
-         'intro': '../libs/other/intro/js/intro.min',
          'tmpl': '../templates',
          'WorldMapGenerator': '../libs/other/timezone/WorldMapGenerator',
          'jstimezonedetect': '../libs/other/timezone/jstz-1.0.4.min',
          'sparkline': '../libs/other/sparkline/jquery.sparkline',
          'gridster': '../libs/other/gridster/js/jquery.gridster',
          'dashboard': '../libs/other/dashboard/dashboard',
+         'tour' : '../libs/other/bootstrap-tour-0.10.3/js/bootstrap-tour.min'
 
 
      },

+ 0 - 511
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/utils/Intro.js

@@ -1,511 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-define(['require', 'intro'], function(require, IntroJs) {
-    'use strict';
-    var Intro = {};
-    Intro.Start = function() {
-
-        var intro = IntroJs();
-        intro.setOptions({
-
-            skipLabel: "Close",
-
-            showBullets : false,
-
-            steps: [{
-                element: $('[data-id="troubleshoot"]').get(0),
-                intro: "Welcome to Log Search!  Choose Troubleshooting to display high-level log and usage aggregates for all services and components in your cluster.",
-                position: "right"
-            }, {
-                element: $('#troubleShootHeader').get(0),
-                intro: "Choose a Service to display high-level information about that service. Optionally, filter by components and apply a specific diagnostic time frame.",
-                position: "bottom"
-            }, {
-                element: $('div[data-id="dateRange"] .selectDateRange').get(0),
-                intro: "Click the Date-Time picker and choose a pre-defined time slot or specify date and time values.",
-                position: "top"
-            }, {
-                element: $("#showServicelog").get(0),
-                intro: "Choose Go To Logs to further refine your examination of Service Logs for a selected service.",
-                position: "top"
-            }, {
-                element: $('[data-id="hierarchy"]').get(0),
-                intro: "Service Logs displays a high-level history of logs generated by a selected service and allows you to filter logs by component. You control your view of log data per component and host, Choose to view aggregate Service Logs or drill into details of each log message.",
-                position: "right"
-            }, {
-                element: $("#searchIncludeExclude").get(0),
-                intro: "This filter allows you to query the log data column wise(log_message, level, host etc). Include Search is basically \"or\" condition and Exclude Search is \"and\" condition between multiple input.",
-                position: "top"
-            }, {
-                element: $("#compInculdeExculde").get(0),
-                intro: "This filter allows you to filter the log data depending upon the component selection. Include Component is again \"or\" condition and Exclude Component is \"and\" condition between multiple selection.",
-                position: "top"
-            }, {
-                element: $('#r_EventHistory').get(0),
-                intro: "Event History displays the current, filtered query results.",
-                position: "top"
-            }, {
-                element: $('#r_Histogram').get(0),
-                intro: "Histogram displays comparative ratios of log severity during the currently defined time filter.",
-                position: "top"
-            }, {
-                element: document.querySelectorAll('#r_BubbleTable')[1],
-                intro: "The Log Data default view displays consolidated for all hosts.",
-                position: "top",
-                child: 'li[data-parent="true"]'
-            }, {
-                element: document.querySelectorAll('#r_BubbleTable')[1],
-                intro: "Expand the Log Data tree view and choose components to further refine your diagnostics.",
-                position: "top",
-                child: 'li[data-parent="true"]'
-            }, {
-                element: $(document.querySelectorAll('#r_BubbleTable')[1]).find('.box-content')[1],
-                intro: "Choose the blue arrow icon to view logs for a specific component on a new tab.",
-                position: "right",
-                child: 'li[data-parent="true"]'
-            }, {
-                element: document.querySelectorAll('#r_BubbleTable')[1],
-                intro: "Choose Service Logs to show a column-separated view of actual log entries.",
-                position: "top",
-                child: 'li[data-parent="true"]'
-            }, {
-                element: $(document.querySelectorAll('#r_BubbleTable')[1]).find('td.logTime:first').get(0),
-                intro: "The Log Time column lists a consolidated view of filtered log entries for the selected service.",
-                position: "right"
-            }, {
-                element: $('li[data-id="audit"]').get(0),
-                intro: "The Access Logs tab displays access information across services and their components. You can create different views and aggregations and apply filters for viewing access log details.",
-                position: "right"
-            }, {
-                element: $('#r_AuditLine').get(0),
-                intro: "The Line section shows component access during a specific time frame.",
-                position: "bottom"
-            }, {
-                element: $('#AuditSearch').get(0),
-                intro: "This filter allows you to query Access log data column- wise (Access Enforcer, Access type etc). Include Search applies the \"or\" condition and Exclude Search the \"and\" condition between multiple inputs.",
-                position: "top"
-            }, {
-                element: $('li[data-id="createFilters"]').get(0),
-                intro: "The Log Feeder Filter feature supports limiting data handled by LogSearch. For example, you can limit logs tracked by LogSearch to only those logs with level ERROR or FATAL.",
-                position: "left"
-            }].filter(function(obj) {
-                if (obj.child)
-                    return $(obj.element).find(obj.child).length
-                return $(obj.element).length;
-            }),
-            'exitOnOverlayClick': false
-        });
-        Intro.bindEvent(intro)
-
-        this.dataAttribute = $('div[role="tabpanel"]').find('.nav-tabs .active').attr('data-id');
-        if (this.dataAttribute != "troubleshoot") {
-            $('div[role="tabpanel"]').find('.nav-tabs [data-id="troubleshoot"] a').click();
-        }
-        intro.start();
-
-        //Hiding Back button
-        $('.introjs-prevbutton').hide();
-
-        if ($('#r_EventHistory').find(".fa-chevron-down").length > 0) {
-            $('#r_EventHistory').find('a.collapse-link').click();
-        }
-        if ($('#r_Histogram').find(".fa-chevron-down").length > 0) {
-            $('#r_Histogram').find('a.collapse-link').click();
-            this.histoGram = true;
-        }
-        if ($(document.querySelectorAll('#r_BubbleTable')[1]).find(".fa-chevron-down").length > 0) {
-            $(document.querySelectorAll('#r_BubbleTable')[1]).find('a.collapse-link').click();
-            this.bubbleGraph = true;
-        }
-        var overlay = document.createElement('div');
-        overlay.setAttribute('class', 'overlayIntro');
-        $('body').append(overlay);
-
-    };
-
-    Intro.bindEvent = function(intro) {
-
-        var that = this;
-        var options = {
-            0: {
-                css: {
-                    'top': '0px',
-                    'left': '98px'
-                },
-                handDirection: 'down',
-                handClass: "up-down"
-            },
-            1: {
-                css: {
-                    'top': '0px',
-                    'left': '98px'
-                },
-                handDirection: 'down',
-                handClass: "up-down"
-            },
-            2: {
-                css: {
-                    'top': '0',
-                    'right': '95px'
-                },
-                handDirection: 'left',
-                handClass: "left-right"
-            },
-            3: {
-                css: {
-                    'top': '0',
-                    'left': '40px'
-                },
-                handDirection: 'right',
-                handClass: "left-right"
-            },
-            4: {
-                css: {
-                    'top': '0px',
-                    'left': '98px'
-                },
-                handDirection: 'down',
-                handClass: "up-down"
-            },
-            5: {
-                css: {
-                    'top': '10px',
-                    'left': '10px'
-                },
-                handDirection: 'right',
-                handClass: "right-left"
-            },
-            6: {
-                css: {
-                    'top': '10px',
-                    'left': '10px'
-                },
-                handDirection: 'right',
-                handClass: "right-left"
-            },
-            7: {
-                css: {
-                    'top': '38px',
-                    'left': '98px'
-                },
-                handDirection: 'down',
-                handClass: "up-down"
-            },
-            8: {
-                css: {
-                    'top': '38px',
-                    'left': '98px'
-                },
-                handDirection: 'up',
-                handClass: "up-down"
-            },
-            9: {
-                css: {
-                    'top': '38px',
-                    'left': '98px'
-                },
-                appendIndex: 0,
-                handDirection: 'down',
-                handClass: "up-down"
-            },
-            10: {
-                css: {
-                    'top': '14px',
-                    'left': '142px'
-                },
-                appendIndex: 1,
-                handDirection: 'left',
-                handText: "Components",
-                handClass: "left-right"
-
-            },
-            11: {
-                css: {
-                    'top': '45px',
-                    'right': '0'
-                },
-                appendIndex: 0,
-                handDirection: 'left',
-                handClass: "left-right"
-            },
-            12: {
-                css: {
-                    'top': '25px',
-                    'left': '190px'
-                },
-                appendIndex: 0,
-                handDirection: 'up',
-                handClass: "up-down"
-            },
-            13: {
-                css: {
-                    'top': '50%',
-                    'left': '0'
-                },
-                appendIndex: 0,
-                handDirection: 'up',
-                handClass: "up-down"
-            },
-            14: {
-                css: {
-                    'top': '0',
-                    'left': '0'
-                },
-                handDirection: 'right',
-                handClass: "left-right"
-            },
-            15: {
-                css: {
-                    'top': '0',
-                    'left': '0'
-                },
-                handDirection: 'right',
-                handClass: "left-right"
-            },
-            16: {
-                css: {
-                    'top': '0',
-                    'left': '0'
-                },
-                handDirection: 'right',
-                handClass: "left-right"
-            },
-            17: {
-                css: {
-                    'top': '0',
-                    'left': '0'
-                },
-                handDirection: 'right',
-                handClass: "left-right"
-            },
-            18: {
-                css: {
-                    'top': '0',
-                    'left': '0'
-                },
-                handDirection: 'right',
-                handClass: "left-right"
-            }
-        }
-
-
-        //Onafter step Callback
-        intro.onafterchange(function(targetElement) {
-            if (this._currentStep == 0) {
-
-            } else if (this._currentStep == 1) {
-                scroll(targetElement, -200);
-            } else if (this._currentStep == 2) {
-                // scroll(targetElement, 0);
-            }else if (this._currentStep == 3) {
-                // scroll(targetElement, 0);
-            } else if (this._currentStep == 4) {
-                // scroll(targetElement, 0);
-            } else if (this._currentStep == 5) {
-                // scroll(targetElement, 0);
-            } else if (this._currentStep == 6) {
-               
-            } else if (this._currentStep == 7) {
-                
-            } else if (this._currentStep == 8) {
-                scroll(targetElement, -200);
-            } else if (this._currentStep == 9) {
-                scroll(targetElement, -150);
-            } else if (this._currentStep == 10) {
-                scroll(targetElement, 0);
-            } else if (this._currentStep == 1) {
-                scroll(targetElement, -250);
-            } else if (this._currentStep == 12) {
-                scroll(targetElement, -150);
-            } else if (this._currentStep == 13) {
-                setTimeout(function() {
-                    $(targetElement).mouseover();
-                }, 100);
-                setTimeout(function() {
-                    $('#rLogTable').find('.btn-quickMenu').first().click();
-                }, 800);
-            } else if (this._currentStep == 14) {
-
-            } else if (this._currentStep == 15) {
-
-            }else if (this._currentStep == 16) {
-
-            }
-
-
-        });
-
-        //OnBefore step Callback
-        intro.onbeforechange(function(targetElement) {
-            removeFingerAndOverlayDiv();
-            if (this._currentStep == 0) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="troubleshoot"] a').click();
-                dispatchResizeEvent();
-            } else if (this._currentStep == 1) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="troubleshoot"] a').click();
-                dispatchResizeEvent();
-                appendFingerAndOverlayDiv(targetElement, options[this._currentStep]);
-            } else if (this._currentStep == 2) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="troubleshoot"] a').click();
-                dispatchResizeEvent();
-                appendFingerAndOverlayDiv(targetElement, options[this._currentStep]);
-            } else if (this._currentStep == 3) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="troubleshoot"] a').click();
-                dispatchResizeEvent();
-                appendFingerAndOverlayDiv(targetElement, options[this._currentStep]);
-            } else if (this._currentStep == 4) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="hierarchy"] a').click();
-                dispatchResizeEvent();
-            } else if (this._currentStep == 5) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="hierarchy"] a').click();
-                dispatchResizeEvent();
-            } else if (this._currentStep == 6) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="hierarchy"] a').click();
-                dispatchResizeEvent();
-            } else if (this._currentStep == 7) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="hierarchy"] a').click();
-                dispatchResizeEvent();
-                appendFingerAndOverlayDiv(targetElement, options[this._currentStep]);
-            } else if (this._currentStep == 8) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="hierarchy"] a').click();
-                $(targetElement).find('input[value="H"]').click();
-                $(targetElement).find('li[data-parent="true"]').first().find('span[data-state="expand"]').first().click();
-                dispatchResizeEvent();
-                appendFingerAndOverlayDiv(targetElement, options[this._currentStep]);
-            } else if (this._currentStep == 9) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="hierarchy"] a').click();               
-                $(document.querySelectorAll('#r_BubbleTable')[1]).find('input[value="H"]').click();
-                dispatchResizeEvent();
-                appendFingerAndOverlayDiv(targetElement, options[this._currentStep]);
-            } else if (this._currentStep == 10) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="hierarchy"] a').click();
-                $(document.querySelectorAll('#r_BubbleTable')[1]).find('li[data-parent="true"]').first().find('span[data-state="collapse"]').first().click();
-                $(document.querySelectorAll('#r_BubbleTable')[1]).find('input[value="H"]').click();
-                $(targetElement).find('ul[role="group"]').find('li').first().mouseover();
-                dispatchResizeEvent();
-                appendFingerAndOverlayDiv(targetElement, options[this._currentStep]);
-            } else if (this._currentStep == 11) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="hierarchy"] a').click();
-                $(targetElement).find('input[value="T"]').click();
-                $(targetElement).find('[data-id="r_tableList"]').css('height', '200px');
-                dispatchResizeEvent();
-                appendFingerAndOverlayDiv(targetElement, options[this._currentStep]);
-            } else if (this._currentStep == 12) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="hierarchy"] a').click();
-                $(document.querySelectorAll('#r_BubbleTable')[1]).find('input[value="T"]').click();
-                dispatchResizeEvent();
-                appendFingerAndOverlayDiv(targetElement, options[this._currentStep]);
-            } else if (this._currentStep == 13) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="hierarchy"] a').click();
-            } else if (this._currentStep == 14) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="audit"] a').click();
-                dispatchResizeEvent();
-            }else if (this._currentStep == 15) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="audit"] a').click();
-                dispatchResizeEvent();
-            }else if (this._currentStep == 15) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="audit"] a').click();
-                dispatchResizeEvent();
-            }else if (this._currentStep == 16) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="audit"] a').click();
-                dispatchResizeEvent();
-            }
-        });
-
-        //OnDone Callback
-        intro.oncomplete(function() {
-            $($('#r_EventHistory').get(0)).find('a.collapse-link').click();
-            $(document.querySelectorAll('#r_BubbleTable')[1]).find('input[value="H"]').click();
-            $(document.querySelectorAll('#r_BubbleTable')[1]).find('li[data-parent="true"]').first().find('span[data-state="expand"]').first().click();
-            $(document.querySelectorAll('#r_BubbleTable')[1]).find('[data-id="r_tableList"]').css('height', '');
-            removeFingerAndOverlayDiv(true);
-            tabClick();
-        });
-
-        //OnSkip Callback
-        intro.onexit(function(targetElement) {
-            $(document.querySelectorAll('#r_BubbleTable')[1]).find('input[value="H"]').click();
-            $(document.querySelectorAll('#r_BubbleTable')[1]).find('li[data-parent="true"]').first().find('span[data-state="expand"]').first().click();
-            $('#r_EventHistory').find('a.collapse-link').click();
-            $(document.querySelectorAll('#r_BubbleTable')[1]).find('[data-id="r_tableList"]').css('height', '');
-            if (that.histoGram) {
-                $('#r_Histogram').find('a.collapse-link').click();
-            }
-            if (that.bubbleGraph) {
-                $(document.querySelectorAll('#r_BubbleTable')[1]).find('a.collapse-link').click();
-            }
-            removeFingerAndOverlayDiv(true);
-            tabClick();
-        });
-
-        //remove all animation and overlay div
-        function removeFingerAndOverlayDiv(overlay) {
-            if (overlay) {
-                $('body').find('.overlayIntro').remove();
-            }
-            $('body').find('.box-content .finger').remove();
-
-        }
-        //add all animation and overlay div
-        function appendFingerAndOverlayDiv(targetElementObject, options) {
-
-            if (options.appendIndex != undefined) {
-                if ($(targetElementObject).find('.box-content').length == 0) {
-                    $(targetElementObject).append('<div class="animated infinite finger ' + options.handClass + '"><i class="fa fa-hand-o-' + options.handDirection + ' fa-2x"></i></div>');
-                    $(targetElementObject).find('.finger').css(options.css);
-                } else {
-                    $($(targetElementObject).find('.box-content')[options.appendIndex]).append('<div class="animated infinite finger ' + options.handClass + '"><i class="fa fa-hand-o-' + options.handDirection + ' fa-2x"></i></div>');
-                    $($(targetElementObject).find('.box-content')[options.appendIndex]).find('.finger').css(options.css);
-                }
-            } else {
-                var flag = $(targetElementObject).find('.box-content');
-                if (flag.length != 0) {
-                    $(targetElementObject).find('.box-content').append('<div class="animated infinite finger ' + options.handClass + '"><i class="fa fa-hand-o-' + options.handDirection + ' fa-2x"></i></div>');
-                    $(targetElementObject).find('.box-content').find('.finger').css(options.css);
-                } else {
-                    $(targetElementObject).append('<div class="animated infinite finger ' + options.handClass + '"><i class="fa fa-hand-o-' + options.handDirection + ' fa-2x"></i></div>');
-                    $(targetElementObject).find('.finger').css(options.css);
-                }
-            }
-
-        }
-
-        function scroll(targetElement, offsetPlus) {
-            $('html,body').animate({
-                scrollTop: (($(targetElement).offset().top) + offsetPlus)
-            });
-        }
-
-        function dispatchResizeEvent() {
-            setTimeout(function() {
-                window.dispatchEvent(new Event('resize'));
-            }, 100);
-        }
-
-        function tabClick() {
-            if (!that.dataAttribute) {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id="troubleshoot"] a').click();
-            } else {
-                $('div[role="tabpanel"]').find('.nav-tabs [data-id=' + that.dataAttribute + '] a').click();
-            }
-            window.scrollTo(0, 0);
-        }
-    }
-    return Intro;
-});

+ 435 - 0
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/utils/Tour.js

@@ -0,0 +1,435 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+define(['require', 'tour'], function(require, TourJs) {
+    'use strict';
+
+    var TourJs = {};
+    var tour = '';
+    TourJs.Start = function() {
+        var getTourElement = function() {
+            return tour._options.steps[tour._current].element;
+        };
+        tour = new Tour({
+                name: "tour",
+                steps: [{
+                    element: $('[data-id="troubleshoot"]').get(0),
+                    content: "Welcome to Log Search!  Choose Troubleshooting to display high-level log and usage aggregates for all services and components in your cluster.",
+                    placement: "right"
+                }, {
+                    element: $('#troubleShootHeader').get(0),
+                    content: "Choose a Service to display high-level information about that service. Optionally, filter by components and apply a specific diagnostic time frame.",
+                    placement: "bottom"
+                }, {
+                    element: $('div[data-id="dateRange"] .selectDateRange').get(0),
+                    content: "Click the Date-Time picker and choose a pre-defined time slot or specify date and time values.",
+                    placement: "top"
+                }, {
+                    element: $("#showServicelog").get(0),
+                    content: "Choose Go To Logs to further refine your examination of Service Logs for a selected service.",
+                    placement: "top"
+                }, {
+                    element: $('[data-id="hierarchy"]').get(0),
+                    content: "Service Logs displays a high-level history of logs generated by a selected service and allows you to filter logs by component. You control your view of log data per component and host, Choose to view aggregate Service Logs or drill into details of each log message.",
+                    placement: "right"
+                }, {
+                    element: $("#searchIncludeExclude").get(0),
+                    content: "This filter allows you to query the log data column wise(log_message, level, host etc). Include Search is basically \"or\" condition and Exclude Search is \"and\" condition between multiple input.",
+                    placement: "bottom"
+                }, {
+                    element: $("#compInculdeExculde").get(0),
+                    content: "This filter allows you to filter the log data depending upon the component selection. Include Component is again \"or\" condition and Exclude Component is \"and\" condition between multiple selection.",
+                    placement: "bottom"
+                }, {
+                    element: $('#r_Histogram').get(0),
+                    content: "Histogram displays comparative ratios of log severity during the currently defined time filter.",
+                    placement: "top"
+                }, {
+                    element: document.querySelectorAll('#r_BubbleTable')[1],
+                    content: "The Log Data default view displays consolidated for all hosts.",
+                    placement: "top",
+                }, {
+                    element: document.querySelectorAll('#r_BubbleTable')[1],
+                    content: "Expand the Log Data tree view and choose components to further refine your diagnostics.",
+                    placement: "top",
+                }, {
+                    element: $(document.querySelectorAll('#r_BubbleTable')[1]).find('.box-content')[1],
+                    content: "Choose the blue arrow icon to view logs for a specific component on a new tab.",
+                    placement: "right",
+                }, {
+                    element: document.querySelectorAll('#r_BubbleTable')[1],
+                    content: "Choose Service Logs to show a column-separated view of actual log entries.",
+                    placement: "top",
+                }, {
+                    element: $(document.querySelectorAll('#r_BubbleTable')[1]).find('td.logTime:first').get(0),
+                    content: "The Log Time column lists a consolidated view of filtered log entries for the selected service.",
+                    placement: "right"
+                }, {
+                    element: $('li[data-id="audit"]').get(0),
+                    content: "The Access Logs tab displays access information across services and their components. You can create different views and aggregations and apply filters for viewing access log details.",
+                    placement: "right"
+                }, {
+                    element: $('#r_AuditLine').get(0),
+                    content: "The Line section shows component access during a specific time frame.",
+                    placement: "bottom"
+                }, {
+                    element: $('#AuditSearch').get(0),
+                    content: "This filter allows you to query Access log data column- wise (Access Enforcer, Access type etc). Include Search applies the \"or\" condition and Exclude Search the \"and\" condition between multiple inputs.",
+                    placement: "top"
+                }, {
+                    element: $('li[data-id="createFilters"]').get(0),
+                    content: "The Log Feeder Filter feature supports limiting data handled by LogSearch. For example, you can limit logs tracked by LogSearch to only those logs with level ERROR or FATAL.",
+                    placement: "left"
+                }],
+                container: "body",
+                smartPlacement: true,
+                keyboard: true,
+                storage: false,
+                debug: false,
+                backdrop: true,
+                backdropContainer: 'body',
+                backdropPadding: 0,
+                redirect: true,
+                orphan: false,
+                duration: false,
+                delay: false,
+                basePath: "",
+                template: "<div class='popover tour'>" +
+                    "<div class='arrow'></div>" +
+                    "<h3 class='popover-title'></h3>" +
+                    "<div class='popover-content'></div>" +
+                    "<div class='popover-navigation'>" +
+                    "<button class='btn btn-default' data-role='next'>Next »</button>" +
+                    "<button class='btn btn-default' data-role='end'>Close</button>" +
+                    "</div>" +
+                    "</div>",
+                afterGetState: function(key, value) {},
+                afterSetState: function(key, value) {},
+                afterRemoveState: function(key, value) {},
+                onShow: function(tour) {},
+                onShown: function(tour) {
+                    var stepElement = getTourElement(tour);
+                    $(stepElement).after($('.tour-step-background'));
+                    $(stepElement).before($('.tour-backdrop'));
+
+                    if (tour._state.current_step == 1) {
+                        appendFingerAndOverlayDiv(tour._options.showFinger[tour._state.current_step]);
+                    } else if (tour._state.current_step == 2) {
+                        appendFingerAndOverlayDiv(tour._options.showFinger[tour._state.current_step]);
+                    } else if (tour._state.current_step == 3) {
+                        appendFingerAndOverlayDiv(tour._options.showFinger[tour._state.current_step]);
+                    } else if (tour._state.current_step == 4) {} else if (tour._state.current_step == 5) {} else if (tour._state.current_step == 6) {} else if (tour._state.current_step == 7) {
+                        appendFingerAndOverlayDiv(tour._options.showFinger[tour._state.current_step]);
+                    } else if (tour._state.current_step == 8) {
+                        appendFingerAndOverlayDiv(tour._options.showFinger[tour._state.current_step]);
+                    } else if (tour._state.current_step == 9) {
+                        appendFingerAndOverlayDiv(tour._options.showFinger[tour._state.current_step]);
+                    } else if (tour._state.current_step == 10) {
+                        appendFingerAndOverlayDiv(tour._options.showFinger[tour._state.current_step]);
+                    } else if (tour._state.current_step == 11) {
+                        appendFingerAndOverlayDiv(tour._options.showFinger[tour._state.current_step]);
+                    } else if (tour._state.current_step == 12) {
+                        $('[data-id="r_tableList"]').find('table thead tr').css({ 'display': '-webkit-box' });
+                        $('[data-id="r_tableList"]').find('table tbody tr').css({ 'display': '-webkit-box' });
+                        $('[data-id="r_tableList"]').find('table thead tr').css({ 'display': '-moz-box' });
+                        $('[data-id="r_tableList"]').find('table tbody tr').css({ 'display': '-moz-box' });
+                    } else if (tour._state.current_step == 13) {}
+
+                    var count = $('body').find('.finger');
+                    if (count.length > 1) {
+                        $('body').find('.finger:first').remove();
+                    }
+                }
+
+            }),
+            TourJs.bindEvent(tour),
+            tour.start();
+
+        //add all animation and overlay div
+        function appendFingerAndOverlayDiv(options) {
+            $('.tour-step-backdrop:first').append('<div class="animated infinite finger ' + options.handClass + '"><i class="fa fa-hand-o-' + options.handDirection + ' fa-2x"></i></div>');
+            $('.tour-step-backdrop:first').find('.finger').css(options.css);
+        };
+
+        // var overlay = document.createElement('div');
+        // overlay.setAttribute('class', 'overlayIntro');
+        // $('body').append(overlay);
+    };
+
+    TourJs.bindEvent = function(tour) {
+        var that = this;
+        var tourCallBack = tour._options;
+
+        var optionSet = {
+            0: {
+                css: {
+                    'top': '0px',
+                    'left': '98px'
+                },
+                handDirection: 'down',
+                handClass: "up-down"
+            },
+            1: {
+                css: {
+                    'top': '0px',
+                    'left': '98px'
+                },
+                handDirection: 'down',
+                handClass: "up-down"
+            },
+            2: {
+                css: {
+                    'top': '0',
+                    'right': '95px'
+                },
+                handDirection: 'left',
+                handClass: "left-right"
+            },
+            3: {
+                css: {
+                    'top': '0',
+                    'left': '40px'
+                },
+                handDirection: 'right',
+                handClass: "left-right"
+            },
+            4: {
+                css: {
+                    'top': '0px',
+                    'left': '98px'
+                },
+                handDirection: 'down',
+                handClass: "up-down"
+            },
+            5: {
+                css: {
+                    'top': '10px',
+                    'left': '10px'
+                },
+                handDirection: 'right',
+                handClass: "right-left"
+            },
+            // 6: {
+            //     css: {
+            //         'top': '10px',
+            //         'left': '10px'
+            //     },
+            //     handDirection: 'right',
+            //     handClass: "right-left"
+            // },
+            7: {
+                css: {
+                    'top': '5px',
+                    'left': '100px'
+                },
+                handDirection: 'down',
+                handClass: "up-down"
+            },
+            8: {
+                css: {
+                    'top': '45px',
+                    'left': '122px'
+                },
+                handDirection: 'up',
+                handClass: "up-down"
+            },
+            9: {
+                css: {
+                    'top': '45px',
+                    'left': '100px'
+                },
+                appendIndex: 0,
+                handDirection: 'down',
+                handClass: "up-down"
+            },
+            10: {
+                css: {
+                    'top': '45px',
+                    'right': '10px'
+                },
+                appendIndex: 1,
+                handDirection: 'left',
+                handText: "Components",
+                handClass: "left-right"
+
+            },
+            11: {
+                css: {
+                    'top': '30px',
+                    'left': '309px'
+                },
+                appendIndex: 0,
+                handDirection: 'left',
+                handClass: "left-right"
+            },
+            12: {
+                css: {
+                    'top': '50px',
+                    'left': '0px'
+                },
+                appendIndex: 0,
+                handDirection: 'up',
+                handClass: "up-down"
+            },
+            13: {
+                css: {
+                    'top': '0',
+                    'left': '0'
+                },
+                appendIndex: 0,
+                handDirection: 'up',
+                handClass: "up-down"
+            },
+            14: {
+                css: {
+                    'top': '0',
+                    'left': '0'
+                },
+                handDirection: 'right',
+                handClass: "left-right"
+            },
+            15: {
+                css: {
+                    'top': '0',
+                    'left': '0'
+                },
+                handDirection: 'right',
+                handClass: "left-right"
+            },
+            16: {
+                css: {
+                    'top': '0',
+                    'left': '0'
+                },
+                handDirection: 'right',
+                handClass: "left-right"
+            },
+            17: {
+                css: {
+                    'top': '0',
+                    'left': '0'
+                },
+                handDirection: 'right',
+                handClass: "left-right"
+            },
+            18: {
+                css: {
+                    'top': '0',
+                    'left': '0'
+                },
+                handDirection: 'right',
+                handClass: "left-right"
+            }
+        };
+
+        $.extend(tour._options, { "showFinger": optionSet });
+
+        // on tour start
+        tourCallBack.onStart = function(tour) {
+            $('.ui-dialog').fadeOut();
+            $('.ui-widget-overlay').fadeOut();
+            $('.compare').fadeOut();
+            that.dataAttribute = $('div[role="tabpanel"]').find('.nav-tabs .active').attr('data-id');
+            if (that.dataAttribute != "troubleshoot") {
+                $('div[role="tabpanel"]').find('.nav-tabs [data-id="troubleshoot"] a').click();
+            }
+        };
+
+        // on the Next button click
+        tourCallBack.onNext = function(tour) {
+            if (tour._state.current_step == 0) {} else if (tour._state.current_step == 1) {
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 2) {
+                $("#showServicelog").css('z-index', '');
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 3) {
+                $('div[role="tabpanel"]').find('.nav-tabs [data-id="hierarchy"] a').click();
+                $("#showServicelog").css('z-index', 1);
+            } else if (tour._state.current_step == 4) {} else if (tour._state.current_step == 5) {
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 6) {
+                ($('[id="r_Histogram"]').find('.collapse-link').first().find('i').hasClass('fa-chevron-down')) ? $('[id="r_Histogram"]').find('.collapse-link').first().find('i').click(): '';
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 7) {
+                ($('#r_BubbleTable a.collapse-link').first().find('i').hasClass('fa-chevron-down')) ? $('#r_BubbleTable a.collapse-link').first().find('i').click(): '';
+                 $('#r_BubbleTable li[data-parent="true"]').first().find('span[data-state="expand"]').first().click();
+                $('#r_BubbleTable input[value="H"]').click();
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 8) {
+                $('#r_BubbleTable li[data-parent="true"]').first().find('span[data-state="collapse"]').first().click();
+                $('#r_BubbleTable li[data-parent="true"]').first().find('a[data-type="C"]').first().removeClass('hidden');
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 9) {
+                $('#r_BubbleTable li[data-parent="true"]').first().find('a[data-type="C"]').first().removeClass('hidden');
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 10) {
+                $('#r_BubbleTable input[value="T"]').click();
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 11) {
+                setTimeout(function() {
+                    $('#rLogTable').find('.btn-quickMenu').first().click();
+                }, 300);
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 12) {
+                $('[data-id="r_tableList"]').find('table thead tr').css({ 'display': '' });
+                $('[data-id="r_tableList"]').find('table tbody tr').css({ 'display': '' });
+                $('div[role="tabpanel"]').find('.nav-tabs [data-id="audit"] a').click();
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 13) {
+                ($('#r_AuditLine a.collapse-link').first().find('i').hasClass('fa-chevron-down')) ? $('#r_AuditLine a.collapse-link').first().find('i').click(): '';
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 14) {
+                ($('#AuditSearch a.collapse-link').first().find('i').hasClass('fa-chevron-down')) ? $('#AuditSearch a.collapse-link').first().find('i').click(): '';
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 15) {
+                removeFingerAndOverlayDiv();
+            } else if (tour._state.current_step == 16) {}
+
+        };
+
+        // on tour Ends
+        tourCallBack.onEnd = function(tour) {
+            tabClick();
+            $('body').find('.overlayIntro').remove();
+            $('.ui-dialog').fadeIn();
+            $('.ui-widget-overlay').fadeIn();
+            $('.compare').fadeIn();
+            removeFingerAndOverlayDiv();
+            $('[data-id="r_tableList"]').find('table thead tr').css({ 'display': '' });
+            $('[data-id="r_tableList"]').find('table tbody tr').css({ 'display': '' });
+        };
+
+        function tabClick() {
+            if (!that.dataAttribute) {
+                $('div[role="tabpanel"]').find('.nav-tabs [data-id="troubleshoot"] a').click();
+            } else {
+                $('div[role="tabpanel"]').find('.nav-tabs [data-id=' + that.dataAttribute + '] a').click();
+            }
+            window.scrollTo(0, 0);
+        };
+
+        //remove all animation and overlay div
+        function removeFingerAndOverlayDiv() {
+            $('body').find('.finger').remove();
+        };
+
+    }
+
+
+    return TourJs;
+});

+ 10 - 5
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/common/Header.js

@@ -77,7 +77,9 @@ define(['require',
 
             /** all events binding here */
             bindEvents: function() {
-
+                this.listenTo(this.globalVent,"currentMap:load",function(obj){
+                    this.currentTimezone = obj;
+                },this);
             },
             /** on render callback */
             onRender: function() {
@@ -94,6 +96,7 @@ define(['require',
                     }
                     this.ui.timeZoneChange.find('span').text(moment.tz(storeTimezone.value.split(',')[0]).zoneName());
                 }
+                this.currentTimezone = storeTimezone;
                 this.checkParams();
             },
             onShow : function(){
@@ -146,9 +149,9 @@ define(['require',
                  });
             },
             takeATour: function() {
-                require(['utils/Intro'], function(Intro) {
-                    Intro.Start();
-                });
+            	require(['utils/Tour'],function(Tour){
+            		Tour.Start();
+            	});
 
                 /*localStorage.clear();
                 if (typeof(Storage) !== "undefined") {
@@ -354,7 +357,7 @@ define(['require',
             timeZoneChangeClick: function() {
                 var that = this;
                 require(['views/dialog/TimeZoneChangeView'], function(TimeZoneChangeView) {
-                    var view = new TimeZoneChangeView({});
+                    var view = new TimeZoneChangeView({currentTime : that.currentTimezone});
                     var opts = {
                         title: "Time Zone",
                         content: view,
@@ -392,8 +395,10 @@ define(['require',
                 var content = this.dialog.options.content;
                 this.onDialogClosed();
                 if (content.changedTimeZone) {
+                    var obj = Utils.localStorage.checkLocalStorage('timezone');
                     Utils.localStorage.setLocalStorage('timezone', content.selectedtimeZone);
                     //this.ui.timeZoneChange.find('span').text(moment.tz(content.selectedtimeZone).zoneName());
+                    this.globalVent.trigger("currentMap:load",obj);
                     window.open(window.location.href, '_blank');
 
                 }

+ 1 - 1
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dialog/ApplySearchFilterView.js

@@ -78,7 +78,7 @@ define(['require',
                     userId: "admin",
                     rowType:"history"
                 });
-                this.collection.fetch({
+                this.collection.getFirstPage({
                     error: function(jqXHR, textStatus, errorThrown) {
                         Utils.notifyError({
                             content: "There is some problem in Event History, Please try again later."

+ 5 - 2
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/scripts/views/dialog/TimeZoneChangeView.js

@@ -47,10 +47,13 @@ define(['require',
              * @constructs
              */
             initialize: function(options) {
-                _.extend(this, _.pick(options, ''));
+                _.extend(this, _.pick(options, 'currentTime'));
                 this.dateUtil = Utils.dateUtil;
                 this.changedTimeZone = false;
-                var storeTimezone = Utils.localStorage.checkLocalStorage('timezone');
+                var storeTimezone = '';
+                if(!_.isUndefined(this.currentTime)){
+                    storeTimezone = this.currentTime;
+                }
                 if (storeTimezone && storeTimezone != "undefined") {
                     this.selectedtimeZone = storeTimezone.value
                 }

+ 48 - 2
ambari-logsearch/ambari-logsearch-portal/src/main/webapp/styles/style.css

@@ -1010,7 +1010,7 @@ body {
     left: 0;
     width: 100%;
     right: 0;
-    z-index: 9999999;
+    z-index: 2002;
     height: 100%;
 }
 .overlayDashboard{
@@ -1816,7 +1816,7 @@ button.depLinks{
 
 
 .addOnWrap{
-  min-height:30px;
+  height:30px;
 }
 .addOnRightBDR{
   border-right:1px solid #CCC !important;
@@ -2148,3 +2148,49 @@ input.filterInput{
 .nvd3 rect[height="1"] {
   display: none !important;
 }
+.popover {
+  z-index: 2002;
+}
+.popover[class*="tour-"] {
+  z-index: 2002;
+}
+.tour-backdrop {
+  z-index: 2001;
+  opacity: 0.6;
+}
+.tour-step-backdrop {
+  z-index: 2001;
+}
+.tour-step-backdrop > td {
+  z-index: 2001;
+}
+.tour-step-background {
+  z-index: 2002;
+}
+.popover.right>.arrow {
+    border-right-color: rgba(255, 255, 255, 1);
+}
+.popover.bottom>.arrow{
+      border-bottom-color: rgba(255, 255, 255, 1);
+}
+.popover.top>.arrow {
+    border-top-color: rgba(255, 255, 255, 1);
+}
+.tour-tour-element{
+  background-color: #ffffff !important;
+}
+.popover.left>.arrow {
+    border-left-color: rgba(255, 255, 255, 1);
+}
+.modal-backdrop{
+  background-color: rgba(0,0,0,0.6);
+}
+a.params{
+  font-size: 10px;
+  color: yellow;
+  display: none;
+}
+a.params:hover,a.params:visited,a.params:active,a.params:focus{
+  color:#e8e80c !important;
+  text-decoration: none;
+}

Some files were not shown because too many files changed in this diff