[40/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/yarn.lock
--
diff --git a/ambari-logsearch/ambari-logsearch-web-new/yarn.lock 
b/ambari-logsearch/ambari-logsearch-web-new/yarn.lock
deleted file mode 100644
index 291b489..000
--- a/ambari-logsearch/ambari-logsearch-web-new/yarn.lock
+++ /dev/null
@@ -1,5766 +0,0 @@
-# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-# yarn lockfile v1
-
-
-"@angular/cli@1.0.0":
-  version "1.0.0"
-  resolved 
"https://registry.yarnpkg.com/@angular/cli/-/cli-1.0.0.tgz#7bfde1e7c5f28bf5bed4dda1352ee67ee887302f;
-  dependencies:
-"@ngtools/json-schema" "1.0.5"
-"@ngtools/webpack" "1.3.0"
-autoprefixer "^6.5.3"
-chalk "^1.1.3"
-common-tags "^1.3.1"
-css-loader "^0.26.1"
-cssnano "^3.10.0"
-debug "^2.1.3"
-denodeify "^1.2.1"
-diff "^3.1.0"
-ember-cli-normalize-entity-name "^1.0.0"
-ember-cli-string-utils "^1.0.0"
-exports-loader "^0.6.3"
-extract-text-webpack-plugin "~2.0.0"
-file-loader "^0.10.0"
-fs-extra "^2.0.0"
-get-caller-file "^1.0.0"
-glob "^7.0.3"
-html-webpack-plugin "^2.19.0"
-inflection "^1.7.0"
-inquirer "^3.0.0"
-isbinaryfile "^3.0.0"
-istanbul-instrumenter-loader "^2.0.0"
-json-loader "^0.5.4"
-karma-sourcemap-loader "^0.3.7"
-karma-webpack "^2.0.0"
-less "^2.7.2"
-less-loader "^2.2.3"
-lodash "^4.11.1"
-minimatch "^3.0.3"
-node-modules-path "^1.0.0"
-nopt "^4.0.1"
-opn "4.0.2"
-portfinder "~1.0.12"
-postcss-loader "^0.13.0"
-postcss-url "^5.1.2"
-raw-loader "^0.5.1"
-resolve "^1.1.7"
-rimraf "^2.5.3"
-rsvp "^3.0.17"
-rxjs "^5.0.1"
-sass-loader "^4.1.1"
-script-loader "^0.7.0"
-semver "^5.1.0"
-silent-error "^1.0.0"
-source-map-loader "^0.1.5"
-style-loader "^0.13.1"
-stylus "^0.54.5"
-stylus-loader "^2.4.0"
-temp "0.8.3"
-typescript ">=2.0.0 <2.3.0"
-url-loader "^0.5.7"
-walk-sync "^0.3.1"
-webpack "~2.2.0"
-webpack-dev-server "~2.3.0"
-webpack-merge "^2.4.0"
-zone.js "^0.7.2"
-  optionalDependencies:
-node-sass "^4.3.0"
-
-"@angular/common@^4.0.0":
-  version "4.1.3"
-  resolved 
"https://registry.yarnpkg.com/@angular/common/-/common-4.1.3.tgz#e7c4791e32131cf74c239428c2a67daab2eef017;
-
-"@angular/compiler-cli@^4.0.0":
-  version "4.1.3"
-  resolved 
"https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-4.1.3.tgz#c2362ffdf65756471481f839fab675bcac213f96;
-  dependencies:
-"@angular/tsc-wrapped" "4.1.3"
-minimist "^1.2.0"
-reflect-metadata "^0.1.2"
-
-"@angular/compiler@^4.0.0":
-  version "4.1.3"
-  resolved 
"https://registry.yarnpkg.com/@angular/compiler/-/compiler-4.1.3.tgz#d2dd30853b0cf4a54758b4a314632c231f9c94c3;
-
-"@angular/core@^4.0.0":
-  version "4.1.3"
-  resolved 
"https://registry.yarnpkg.com/@angular/core/-/core-4.1.3.tgz#285498eb86ab7d0b6f982f8f9f487ef610013b35;
-
-"@angular/forms@^4.0.0":
-  version "4.1.3"
-  resolved 
"https://registry.yarnpkg.com/@angular/forms/-/forms-4.1.3.tgz#380ab4c3af84c5d1d748c2a7d04151c7dc8e4982;
-
-"@angular/http@^4.0.0":
-  version "4.1.3"
-  resolved 
"https://registry.yarnpkg.com/@angular/http/-/http-4.1.3.tgz#eb9d1c302a0172815f9a573310d9be0bdeb845ae;
-
-"@angular/platform-browser-dynamic@^4.0.0":
-  version "4.1.3"
-  resolved 
"https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-4.1.3.tgz#3c13fdcf591d487f6efdc1d46913f280c6d8c2ec;
-
-"@angular/platform-browser@^4.0.0":
-  version "4.1.3"
-  resolved 
"https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-4.1.3.tgz#4fa1db5119dd178b315ddae5b329bee1a932a5bd;
-
-"@angular/router@^4.0.0":
-  version "4.1.3"
-  resolved 
"https://registry.yarnpkg.com/@angular/router/-/router-4.1.3.tgz#ddafd46ae7ccc8b1f74904ffb45f394e44625216;
-
-"@angular/tsc-wrapped@4.1.3":
-  version "4.1.3"
-  resolved 
"https://registry.yarnpkg.com/@angular/tsc-wrapped/-/tsc-wrapped-4.1.3.tgz#2d6372c9187bf1621eacd960b94b39c4f95293cd;
-  dependencies:
-tsickle "^0.21.0"
-
-"@ngrx/core@^1.2.0":
-  version "1.2.0"
-  resolved 
"https://registry.yarnpkg.com/@ngrx/core/-/core-1.2.0.tgz#882b46abafa2e0e6d887cb71a1b2c2fa3e6d0dc6;
-
-"@ngrx/store@^2.2.2":
-  version "2.2.2"
-  resolved 
"https://registry.yarnpkg.com/@ngrx/store/-/store-2.2.2.tgz#a00305a6452032a3385886a11ce529dce2dae65b;
-
-"@ngtools/json-schema@1.0.5":
-  version "1.0.5"
-  resolved 
"https://registry.yarnpkg.com/@ngtools/json-schema/-/json-schema-1.0.5.tgz#ad39037c70c88b245ac7267a71777646b6063d77;
-
-"@ngtools/webpack@1.3.0":
-  version "1.3.0"
-  resolved 
"https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-1.3.0.tgz#a1071230985358ecdf87b2fa9879ae6cc6355e83;
-  dependencies:
-enhanced-resolve "^3.1.0"
-loader-utils "^1.0.2"
-magic-string "^0.19.0"
-source-map "^0.5.6"

[02/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/styles/bootstrap.css
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/styles/bootstrap.css 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/styles/bootstrap.css
deleted file mode 100644
index 3c48696..000
--- a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/styles/bootstrap.css
+++ /dev/null
@@ -1,6422 +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.
- */
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-nav,
-section {
-  display: block;
-}
-audio,
-canvas,
-video {
-  display: inline-block;
-  *display: inline;
-  *zoom: 1;
-}
-audio:not([controls]) {
-  display: none;
-}
-html {
-  font-size: 100%;
-  -webkit-text-size-adjust: 100%;
-  -ms-text-size-adjust: 100%;
-}
-a:focus {
-  outline: thin dotted #333;
-  outline: 5px auto -webkit-focus-ring-color;
-  outline-offset: -2px;
-}
-a:hover,
-a:active {
-  outline: 0;
-}
-sub,
-sup {
-  position: relative;
-  font-size: 75%;
-  line-height: 0;
-  vertical-align: baseline;
-}
-sup {
-  top: -0.5em;
-}
-sub {
-  bottom: -0.25em;
-}
-img {
-  /* Responsive images (ensure images don't scale beyond their parents) */
-  max-width: 100%;
-  /* Part 1: Set a maxium relative to the parent */
-  width: auto\9;
-  /* IE7-8 need help adjusting responsive images */
-  height: auto;
-  /* Part 2: Scale the height according to the width, otherwise you get 
stretching */
-  vertical-align: middle;
-  border: 0;
-  -ms-interpolation-mode: bicubic;
-}
-#map_canvas img,
-.google-maps img {
-  max-width: none;
-}
-button,
-input,
-select,
-textarea {
-  margin: 0;
-  font-size: 100%;
-  vertical-align: middle;
-}
-button,
-input {
-  *overflow: visible;
-  line-height: normal;
-}
-button::-moz-focus-inner,
-input::-moz-focus-inner {
-  padding: 0;
-  border: 0;
-}
-button,
-html input[type="button"],
-input[type="reset"],
-input[type="submit"] {
-  -webkit-appearance: button;
-  cursor: pointer;
-}
-label,
-select,
-button,
-input[type="button"],
-input[type="reset"],
-input[type="submit"],
-input[type="radio"],
-input[type="checkbox"] {
-  cursor: pointer;
-}
-input[type="search"] {
-  -webkit-box-sizing: content-box;
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-  -webkit-appearance: textfield;
-}
-input[type="search"]::-webkit-search-decoration,
-input[type="search"]::-webkit-search-cancel-button {
-  -webkit-appearance: none;
-}
-textarea {
-  overflow: auto;
-  vertical-align: top;
-}
-@media print {
-  * {
-text-shadow: none !important;
-color: #000 !important;
-background: transparent !important;
-box-shadow: none !important;
-  }
-  a,
-  a:visited {
-text-decoration: underline;
-  }
-  a[href]:after {
-content: " (" attr(href) ")";
-  }
-  abbr[title]:after {
-content: " (" attr(title) ")";
-  }
-  .ir a:after,
-  a[href^="javascript:"]:after,
-  a[href^="#"]:after {
-content: "";
-  }
-  pre,
-  blockquote {
-border: 1px solid #999;
-page-break-inside: avoid;
-  }
-  thead {
-display: table-header-group;
-  }
-  tr,
-  img {
-page-break-inside: avoid;
-  }
-  img {
-max-width: 100% !important;
-  }
-  @page {
-margin: 0.5cm;
-  }
-  p,
-  h2,
-  h3 {
-orphans: 3;
-widows: 3;
-  }
-  h2,
-  h3 {
-page-break-after: avoid;
-  }
-}
-.clearfix {
-  *zoom: 1;
-}
-.clearfix:before,
-.clearfix:after {
-  display: table;
-  content: "";
-  line-height: 0;
-}
-.clearfix:after {
-  clear: both;
-}
-.hide-text {
-  font: 0/0 a;
-  color: transparent;
-  text-shadow: none;
-  background-color: transparent;
-  border: 0;
-}
-.input-block-level {
-  display: block;
-  width: 100%;
-  min-height: 30px;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-body {
-  margin: 0;
-  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
-  font-size: 13px;
-  line-height: 20px;
-  color: #44;
-  background-color: #f1f1f1;
-}
-a {
-  color: #3ea211;
-  text-decoration: none;
-}
-a:hover,
-a:focus {
-  color: #245d0a;
-  

[16/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/timezone/jstz-1.0.4.min.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/timezone/jstz-1.0.4.min.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/timezone/jstz-1.0.4.min.js
deleted file mode 100644
index 96e3dd8..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/timezone/jstz-1.0.4.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! jstz - v1.0.4 - 2012-12-12 */
-(function(e){var t=function(){"use strict";var e="s",n=function(e){var 
t=-e.getTimezoneOffset();return t!==null?t:0},r=function(e,t,n){var r=new 
Date;return 
e!==undefined&(e),r.setDate(n),r.setMonth(t),r},i=function(e){return
 n(r(e,0,2))},s=function(e){return n(r(e,5,2))},o=function(e){var 
t=e.getMonth()>7?s(e.getFullYear()):i(e.getFullYear()),r=n(e);return 
t-r!==0},u=function(){var t=i(),n=s(),r=i()-s();return 
r<0?t+",1":r>0?n+",1,"+e:t+",0"},a=function(){var e=u();return new 
t.TimeZone(t.olson.timezones[e])};return{determine:a,date_is_dst:o}}();t.TimeZone=function(e){"use
 strict";var n=null,r=function(){return n},i=function(){var 
e=t.olson.ambiguity_list[n],r=e.length,i=0,s=e[0];for(;i

[08/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/dashboard/MainLayoutView.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/dashboard/MainLayoutView.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/dashboard/MainLayoutView.js
deleted file mode 100644
index 929ca98..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/dashboard/MainLayoutView.js
+++ /dev/null
@@ -1,670 +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',
-'backbone',
-'utils/Utils',
-'utils/ViewUtils',
-'utils/Globals',
-'hbs!tmpl/dashboard/MainLayoutView_tmpl',
-'select2',
-'sparkline',
-'d3.tip'
-],function(require,Backbone,Utils,ViewUtils,Globals,MainLayoutViewTmpl){
-'use strict';
-
-var MainLayoutView = Backbone.Marionette.Layout.extend(
-/** @lends MainLayoutView */
-{
-_viewName : 'MainLayoutView',
-
-template: MainLayoutViewTmpl,
-
-/** Layout sub regions */
-regions: {
-RLogLevel : "#r_logLevel",
-RComponents : "#r_components",
-RHosts : "#r_hosts",
-RHierarchyTab : "#r_Hierarchy",
-RHostInfoTab : "#r_HostInfo",
-RBubbleTable : "#r_BubbleTable",
-RAuditTab : "#r_AuditInfo",
-RAuditDashboard:"#r_AuditDashboard",
-RTroubleShoot:"#r_TroubleShoot"
-},
-
-/** ui selector cache */
-ui: {
-//graph : "#graphAgg",
-searchBox : '[data-id="mainSearch"]',
-searchBoxBtn : '[data-id="mainSearchBtn"]',
-compare:".compare .panel-heading",
-CompareButton:"[data-id='CompareButton']",
-CompareClearAll:"[data-id='CompareClearAll']",
-CloseCompareComponent:".hostCompList .closeComponent"
-//viewType: "input[name='viewType']",
-},
-
-/** ui events hash */
-events: function() {
-var events = {};
-//events['click #searchLog'] = 'onSearchLogClick';
-events["click "+this.ui.searchBoxBtn] = 'onSearchLogClick';
-events['change ' + this.ui.viewType]  = 'onViewTypeChange';
-events['click button[data-tab-id]']  = 'onDeleteTabClick';
-events["click "+this.ui.compare] = function(e){
-this.togglePanelPosition(false,false);
-}
-events["click "+this.ui.CompareButton] = 'onCompareButtonClick';
-events["click "+this.ui.CompareClearAll] = 
'onCompareClearAllClick';
-events["click "+this.ui.CloseCompareComponent] = function(e){
-
this.onCloseCompareComponentClick($(e.currentTarget).parents('span').data().id,true);
-}
-events["click .nav.nav-tabs li"] = function(e){
-this.hideContextMenu();
-}
-return events;
-},
-
-/**
- * intialize a new MainLayoutView Layout
- * @constructs
- */
-initialize: function(options) {
-_.extend(this, _.pick(options,'globalVent'));
-this.vent = new Backbone.Wreqr.EventAggregator();
-this.dateUtil = Utils.dateUtil;
-this.bindEvents();
-this.componetList =[];
-},
-bindEvents : function(){
-this.listenTo(this.globalVent,"render:tab",function(options){
-var that = this;
-this.hideContextMenu();
-this.renderLogFileTab(options);
-setTimeout(function(){
-that.reAdjustTab()
-},1000);
-
-},this);
-
this.listenTo(this.globalVent,"render:comparison:tab",function(options){
-this.hideContextMenu();
-this.renderComparisonTab(options);
-},this);
-this.listenTo(this.globalVent,"show:tab",function(tabName){
-this.showTab(tabName);
-},this);
-

[37/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.ts
new file mode 100644
index 000..3e2a6c7
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-container/logs-container.component.ts
@@ -0,0 +1,105 @@
+/**
+ * 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.
+ */
+
+import {Component, OnInit, Input} from '@angular/core';
+import {FormGroup} from '@angular/forms';
+import {Observable} from 'rxjs/Observable';
+import 'rxjs/add/operator/map';
+import {FilteringService} from '@app/services/filtering.service';
+import {LogsContainerService} from '@app/services/logs-container.service';
+import {ServiceLogsHistogramDataService} from 
'@app/services/storage/service-logs-histogram-data.service';
+import {AppStateService} from '@app/services/storage/app-state.service';
+import {AuditLog} from '@app/models/audit-log.model';
+import {ServiceLog} from '@app/models/service-log.model';
+import {LogField} from '@app/models/log-field.model';
+
+@Component({
+  selector: 'logs-container',
+  templateUrl: './logs-container.component.html',
+  styleUrls: ['./logs-container.component.less']
+})
+export class LogsContainerComponent implements OnInit {
+
+  constructor(private serviceLogsHistogramStorage: 
ServiceLogsHistogramDataService, private appState: AppStateService, private 
filtering: FilteringService, private logsContainer: LogsContainerService) {
+serviceLogsHistogramStorage.getAll().subscribe(data => this.histogramData 
= this.logsContainer.getHistogramData(data));
+  }
+
+  ngOnInit() {
+const fieldsModel = this.logsTypeMapObject.fieldsModel,
+  logsModel = this.logsTypeMapObject.logsModel;
+
this.appState.getParameter(this.logsTypeMapObject.isSetFlag).subscribe(value => 
this.isLogsSet = value);
+this.availableColumns = fieldsModel.getAll().map(fields => {
+  return fields.filter(field => field.isAvailable).map(field => {
+return {
+  value: field.name,
+  label: field.displayName || field.name,
+  isChecked: field.isDisplayed
+};
+  });
+});
+fieldsModel.getAll().subscribe(columns => {
+  const availableFields = columns.filter(field => field.isAvailable),
+availableNames = availableFields.map(field => field.name);
+  if (availableNames.length && !this.isLogsSet) {
+this.logs = logsModel.getAll().map(logs => logs.map(log => {
+  let logObject = availableNames.reduce((obj, key) => 
Object.assign(obj, {
+[key]: log[key]
+  }), {});
+  if (logObject.level) {
+logObject.className = logObject.level.toLowerCase();
+  }
+  return logObject;
+}));
+this.appState.setParameter(this.logsTypeMapObject.isSetFlag, true);
+  }
+  this.displayedColumns = columns.filter(column => column.isAvailable && 
column.isDisplayed);
+});
+this.logsContainer.loadLogs(this.logsType);
+this.filtersForm.valueChanges.subscribe(() => 
this.logsContainer.loadLogs(this.logsType));
+  }
+
+  @Input()
+  logsType: string;
+
+  private isLogsSet: boolean = false;
+
+  get logsTypeMapObject(): any {
+return this.logsContainer.logsTypeMap[this.logsType];
+  }
+
+  get totalCount(): number {
+return this.logsContainer.totalCount;
+  }
+
+  logs: Observable;
+
+  availableColumns: Observable;
+
+  displayedColumns: any[] = [];
+
+  histogramData: any;
+
+  readonly histogramOptions = {
+keysWithColors: this.logsContainer.colors
+  };
+
+  private get filtersForm(): FormGroup {
+return this.filtering.filtersForm;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/components/logs-list/logs-list.component.html

[01/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
Repository: ambari
Updated Branches:
  refs/heads/trunk 93011b260 -> 02360dd5d


http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/styles/bootstrap.min.css
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/styles/bootstrap.min.css
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/styles/bootstrap.min.css
deleted file mode 100644
index 3c48696..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/styles/bootstrap.min.css
+++ /dev/null
@@ -1,6422 +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.
- */
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-nav,
-section {
-  display: block;
-}
-audio,
-canvas,
-video {
-  display: inline-block;
-  *display: inline;
-  *zoom: 1;
-}
-audio:not([controls]) {
-  display: none;
-}
-html {
-  font-size: 100%;
-  -webkit-text-size-adjust: 100%;
-  -ms-text-size-adjust: 100%;
-}
-a:focus {
-  outline: thin dotted #333;
-  outline: 5px auto -webkit-focus-ring-color;
-  outline-offset: -2px;
-}
-a:hover,
-a:active {
-  outline: 0;
-}
-sub,
-sup {
-  position: relative;
-  font-size: 75%;
-  line-height: 0;
-  vertical-align: baseline;
-}
-sup {
-  top: -0.5em;
-}
-sub {
-  bottom: -0.25em;
-}
-img {
-  /* Responsive images (ensure images don't scale beyond their parents) */
-  max-width: 100%;
-  /* Part 1: Set a maxium relative to the parent */
-  width: auto\9;
-  /* IE7-8 need help adjusting responsive images */
-  height: auto;
-  /* Part 2: Scale the height according to the width, otherwise you get 
stretching */
-  vertical-align: middle;
-  border: 0;
-  -ms-interpolation-mode: bicubic;
-}
-#map_canvas img,
-.google-maps img {
-  max-width: none;
-}
-button,
-input,
-select,
-textarea {
-  margin: 0;
-  font-size: 100%;
-  vertical-align: middle;
-}
-button,
-input {
-  *overflow: visible;
-  line-height: normal;
-}
-button::-moz-focus-inner,
-input::-moz-focus-inner {
-  padding: 0;
-  border: 0;
-}
-button,
-html input[type="button"],
-input[type="reset"],
-input[type="submit"] {
-  -webkit-appearance: button;
-  cursor: pointer;
-}
-label,
-select,
-button,
-input[type="button"],
-input[type="reset"],
-input[type="submit"],
-input[type="radio"],
-input[type="checkbox"] {
-  cursor: pointer;
-}
-input[type="search"] {
-  -webkit-box-sizing: content-box;
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-  -webkit-appearance: textfield;
-}
-input[type="search"]::-webkit-search-decoration,
-input[type="search"]::-webkit-search-cancel-button {
-  -webkit-appearance: none;
-}
-textarea {
-  overflow: auto;
-  vertical-align: top;
-}
-@media print {
-  * {
-text-shadow: none !important;
-color: #000 !important;
-background: transparent !important;
-box-shadow: none !important;
-  }
-  a,
-  a:visited {
-text-decoration: underline;
-  }
-  a[href]:after {
-content: " (" attr(href) ")";
-  }
-  abbr[title]:after {
-content: " (" attr(title) ")";
-  }
-  .ir a:after,
-  a[href^="javascript:"]:after,
-  a[href^="#"]:after {
-content: "";
-  }
-  pre,
-  blockquote {
-border: 1px solid #999;
-page-break-inside: avoid;
-  }
-  thead {
-display: table-header-group;
-  }
-  tr,
-  img {
-page-break-inside: avoid;
-  }
-  img {
-max-width: 100% !important;
-  }
-  @page {
-margin: 0.5cm;
-  }
-  p,
-  h2,
-  h3 {
-orphans: 3;
-widows: 3;
-  }
-  h2,
-  h3 {
-page-break-after: avoid;
-  }
-}
-.clearfix {
-  *zoom: 1;
-}
-.clearfix:before,
-.clearfix:after {
-  display: table;
-  content: "";
-  line-height: 0;
-}
-.clearfix:after {
-  clear: both;
-}
-.hide-text {
-  font: 0/0 a;
-  color: transparent;
-  text-shadow: none;
-  background-color: transparent;
-  border: 0;
-}
-.input-block-level {
-  display: block;
-  width: 100%;
-  min-height: 30px;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-body {
-  margin: 0;
-  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
-  font-size: 13px;
-  line-height: 20px;
-  color: #44;
-  background-color: #f1f1f1;
-}
-a {
-  

[21/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/select2/select2x2.png
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/select2/select2x2.png
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/select2/select2x2.png
deleted file mode 100644
index 4bdd5c9..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/select2/select2x2.png
 and /dev/null differ



[36/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.spec.ts
new file mode 100644
index 000..0ef17de
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.spec.ts
@@ -0,0 +1,73 @@
+/**
+ * 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.
+ */
+
+import {async, ComponentFixture, TestBed} from '@angular/core/testing';
+import {Http} from '@angular/http';
+import {TranslateModule, TranslateLoader} from '@ngx-translate/core';
+import {TranslateHttpLoader} from '@ngx-translate/http-loader';
+import {StoreModule} from '@ngrx/store';
+import {AppSettingsService, appSettings} from 
'@app/services/storage/app-settings.service';
+import {ComponentActionsService} from 
'@app/services/component-actions.service';
+import {TimeZoneAbbrPipe} from '@app/pipes/timezone-abbr.pipe';
+import {ModalComponent} from '@app/components/modal/modal.component';
+
+import {TimeZonePickerComponent} from './timezone-picker.component';
+
+export function HttpLoaderFactory(http: Http) {
+  return new TranslateHttpLoader(http, 'assets/i18n/', '.json');
+}
+
+describe('TimeZonePickerComponent', () => {
+  let component: TimeZonePickerComponent;
+  let fixture: ComponentFixture;
+
+  beforeEach(async(() => {
+TestBed.configureTestingModule({
+  declarations: [
+TimeZonePickerComponent,
+ModalComponent,
+TimeZoneAbbrPipe
+  ],
+  imports: [
+StoreModule.provideStore({
+  appSettings
+}),
+TranslateModule.forRoot({
+  provide: TranslateLoader,
+  useFactory: HttpLoaderFactory,
+  deps: [Http]
+})
+  ],
+  providers: [
+AppSettingsService,
+ComponentActionsService
+  ],
+})
+.compileComponents();
+  }));
+
+  beforeEach(() => {
+fixture = TestBed.createComponent(TimeZonePickerComponent);
+component = fixture.componentInstance;
+fixture.detectChanges();
+  });
+
+  it('should create component', () => {
+expect(component).toBeTruthy();
+  });
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.ts
new file mode 100644
index 000..32f6474
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/timezone-picker/timezone-picker.component.ts
@@ -0,0 +1,77 @@
+/**
+ * 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.
+ */
+
+import {Component} from '@angular/core';
+import * as $ from 'jquery';
+import '@vendor/js/WorldMapGenerator.min';
+import {AppSettingsService} from '@app/services/storage/app-settings.service';
+import {ComponentActionsService} from 
'@app/services/component-actions.service';
+
+@Component({
+  

[32/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontawesome/fontawesome-webfont.ttf
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontawesome/fontawesome-webfont.ttf
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontawesome/fontawesome-webfont.ttf
deleted file mode 100644
index d365924..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontawesome/fontawesome-webfont.ttf
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontawesome/fontawesome-webfont.woff
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontawesome/fontawesome-webfont.woff
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontawesome/fontawesome-webfont.woff
deleted file mode 100644
index b9bd17e..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontawesome/fontawesome-webfont.woff
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-300.woff
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-300.woff
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-300.woff
deleted file mode 100644
index 99f3353..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-300.woff
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-300i.woff
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-300i.woff
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-300i.woff
deleted file mode 100644
index dd0a0ea..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-300i.woff
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-400.woff
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-400.woff
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-400.woff
deleted file mode 100644
index 55b25f8..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-400.woff
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-400i.woff
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-400i.woff
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-400i.woff
deleted file mode 100644
index cedefb8..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-400i.woff
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-600.woff
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-600.woff
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-600.woff
deleted file mode 100644
index e83bb33..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-600.woff
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-600i.woff
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-600i.woff
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-600i.woff
deleted file mode 100644
index 983bb33..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontopensans/open-sans-600i.woff
 and /dev/null differ


[12/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/utils/Utils.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/utils/Utils.js 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/utils/Utils.js
deleted file mode 100644
index 15322ef..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/utils/Utils.js
+++ /dev/null
@@ -1,1241 +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',
-'utils/Enums',
-'utils/LangSupport',
-'moment',
-'utils/Globals',
-'bootbox'
-],function(require,XAEnums,localization,moment,Globals,bootbox) {
-'use strict';
-
-
-var prevNetworkErrorTime = 0;
-var Utils = {};
-
-require(['noty'],function(){
-$.extend($.noty.defaults,{
-timeout : 5000,
-layout : "topRight",
-theme : "relax",
-closeWith: ['click','button'],
- animation   : {
- open  : 'animated flipInX',
- close : 'animated flipOutX',
- easing: 'swing',
- speed : 500
- }
-
-});
-});
-
-// ///
-// Enum utility methods
-// //
-/**Utils
- * Get enum for the enumId
- * 
- * @param {integer}
- *enumId - The enumId
- */
-Utils.getEnum = function(enumId) {
-if (!enumId || enumId.length < 1) {
-return "";
-}
-// check if the enums are loaded
-if (!XAEnums[enumId]) {
-return "";
-}
-return XAEnums[enumId];
-};
-
-/**
- * Get enum by Enum and value
- * 
- * @param {Object}
- *myEnum - The enum
- * @param {integer}
- *value - The value
- */
-Utils.enumElementByValue = function(myEnum, value) {
-var element = _.detect(myEnum, function(element) {
-return element.value == value;
-});
-return element;
-};
-
-/**
- * Get enum by Enum and name, value
- * 
- * @param {Object}
- *myEnum - The enum
- * @param {string}
- *propertyName - The name of key
- * @param {integer}
- *propertyValue - The value
- */
-Utils.enumElementByPropertyNameValue = function(myEnum, propertyName,
-propertyValue) {
-for ( var element in myEnum) {
-if (myEnum[element][propertyName] == propertyValue) {
-return myEnum[element];
-}
-}
-return null;
-};
-
-/**
- * Get enum value for given enum label
- * 
- * @param {Object}
- *myEnum - The enum
- * @param {string}
- *label - The label to search for in the Enum
- */
-Utils.enumLabelToValue = function(myEnum, label) {
-var element = _.detect(myEnum, function(element) {
-return element.label == label;
-});
-return (typeof element === "undefined") ? "--" : element.value;
-};
-
-/**
- * Get enum label for given enum value
- * 
- * @param {Object}
- *myEnum - The enum
- * @param {integer}
- *value - The value
- */
-Utils.enumValueToLabel = function(myEnum, value) {
-var element = _.detect(myEnum, function(element) {
-return element.value == value;
-});
-return (typeof element === "undefined") ? "--" : element.label;
-};
-
-/**
- * Get enum label tt string for given Enum value
- * 
- * @param {Object}
- *myEnum - The enum
- * @param {integer}
- *value - The value
- */
-Utils.enumValueToLabeltt = function(myEnum, value) {
-var element = _.detect(myEnum, function(element) {
-return element.value == value;
-});
-return (typeof element === "undefined") ? "--" : element.tt;
-};
-
-/**

[46/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/app/services/mock-api-data.service.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/services/mock-api-data.service.ts
 
b/ambari-logsearch/ambari-logsearch-web-new/src/app/services/mock-api-data.service.ts
deleted file mode 100644
index ec89d9f..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/services/mock-api-data.service.ts
+++ /dev/null
@@ -1,178 +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.
- */
-
-import {URLSearchParams, Response, ResponseOptions} from '@angular/http';
-import {InMemoryDbService, InMemoryBackendService, createErrorResponse} from 
'angular-in-memory-web-api';
-import {Observable} from 'rxjs/Observable';
-import {Subscriber} from 'rxjs/Subscriber';
-import * as moment from 'moment';
-import {mockData} from '@app/mock-data';
-
-export class mockBackendService extends InMemoryBackendService {
-  getLocation(url: string): any {
-return super.getLocation(url);
-  }
-}
-
-export class mockApiDataService implements InMemoryDbService {
-
-  private readonly filterMap = {
-'api/v1/service/logs': {
-  pathToCollection: 'logList',
-  totalCountKey: 'totalCount',
-  filters: {
-clusters: {
-  key: 'cluster',
-  isValuesList: true
-},
-mustBe: {
-  key: 'type',
-  isValuesList: true
-},
-level: {
-  key: 'level',
-  isValuesList: true
-},
-iMessage: {
-  key: 'log_message',
-  filterFunction: (value, filterValue) => 
value.toLowerCase().indexOf(filterValue.toLowerCase()) > -1
-},
-start_time: {
-  key: 'logtime',
-  filterFunction: (value, filterValue) => value >= 
moment(filterValue).valueOf()
-},
-end_time: {
-  key: 'logtime',
-  filterFunction: (value, filterValue) => value < 
moment(filterValue).valueOf()
-},
-host_name: {
-  key: 'host',
-  isValuesList: true
-}
-  }
-}
-  };
-
-  parseUrl(url: string): any {
-const urlLocation = mockBackendService.prototype.getLocation(url),
-  query = urlLocation.search && new 
URLSearchParams(urlLocation.search.substr(1), {
-  encodeKey: key => key,
-  encodeValue: value => value
-}),
-  splitUrl = urlLocation.pathname.substr(1).split('/'),
-  urlPartsCount = splitUrl.length,
-  collectionName = splitUrl[urlPartsCount - 1],
-  base = splitUrl.slice(0, urlPartsCount - 1).join('/') + '/';
-return {
-  base: base,
-  collectionName: collectionName,
-  query: query
-};
-  }
-
-  get(interceptorArgs: any): Observable {
-const query = interceptorArgs.requestInfo.query,
-  path = interceptorArgs.requestInfo.base + 
interceptorArgs.requestInfo.collectionName,
-  pathArray = path.split('/').filter(part => part !== '');
-if (query && query.paramsMap.has('static') && 
interceptorArgs.passThruBackend) {
-  return 
interceptorArgs.passThruBackend.createConnection(interceptorArgs.requestInfo.req).response;
-} else {
-  let is404 = false;
-  const allData = pathArray.reduce((currentObject, currentKey, index, 
array) => {
-if (!currentObject && index < array.length - 1) {
-  return {};
-} else if (currentObject.hasOwnProperty(currentKey)) {
-  return currentObject[currentKey];
-} else {
-  is404 = true;
-  return {};
-}
-  }, interceptorArgs.db);
-  if (is404) {
-return new Observable((subscriber: Subscriber) => 
subscriber.error(new Response(createErrorResponse(
-  interceptorArgs.requestInfo.req, 404, 'Not found'
-;
-  } else {
-let filteredData;
-const filterMapItem = this.filterMap[path];
-if (query && filterMapItem) {
-  filteredData = {};
-  const pathToCollection = filterMapItem.pathToCollection,
-collection = allData[pathToCollection];
-  let filteredCollection = 

[29/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.ttf
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.ttf
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.ttf
deleted file mode 100644
index d365924..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.ttf
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.woff
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.woff
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.woff
deleted file mode 100644
index b9bd17e..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.woff
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.woff2
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.woff2
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.woff2
deleted file mode 100644
index 3311d58..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.woff2
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/less/animated.less
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/less/animated.less
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/less/animated.less
deleted file mode 100644
index 66ad52a..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/less/animated.less
+++ /dev/null
@@ -1,34 +0,0 @@
-// Animated Icons
-// --
-
-.@{fa-css-prefix}-spin {
-  -webkit-animation: fa-spin 2s infinite linear;
-  animation: fa-spin 2s infinite linear;
-}
-
-.@{fa-css-prefix}-pulse {
-  -webkit-animation: fa-spin 1s infinite steps(8);
-  animation: fa-spin 1s infinite steps(8);
-}
-
-@-webkit-keyframes fa-spin {
-  0% {
--webkit-transform: rotate(0deg);
-transform: rotate(0deg);
-  }
-  100% {
--webkit-transform: rotate(359deg);
-transform: rotate(359deg);
-  }
-}
-
-@keyframes fa-spin {
-  0% {
--webkit-transform: rotate(0deg);
-transform: rotate(0deg);
-  }
-  100% {
--webkit-transform: rotate(359deg);
-transform: rotate(359deg);
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/less/bordered-pulled.less
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/less/bordered-pulled.less
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/less/bordered-pulled.less
deleted file mode 100644
index 0c90eb5..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/less/bordered-pulled.less
+++ /dev/null
@@ -1,16 +0,0 @@
-// Bordered & Pulled
-// -
-
-.@{fa-css-prefix}-border {
-  padding: .2em .25em .15em;
-  border: solid .08em @fa-border-color;
-  border-radius: .1em;
-}
-
-.pull-right { float: right; }
-.pull-left { float: left; }
-
-.@{fa-css-prefix} {
-  &.pull-left { margin-right: .3em; }
-  &.pull-right { margin-left: .3em; }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/less/core.less
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/less/core.less
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/less/core.less
deleted file mode 100644
index f814f1e..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/less/core.less
+++ /dev/null
@@ -1,13 +0,0 @@
-// 

[23/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/loadCSS.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/loadCSS.js 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/loadCSS.js
deleted file mode 100644
index e1f3f19..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/loadCSS.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/*!
-loadCSS: load a CSS file asynchronously.
-[c]2015 @scottjehl, Filament Group, Inc.
-Licensed MIT
-*/
-(function(w){
-   "use strict";
-   /* exported loadCSS */
-   var loadCSS = function( href, before, media ){
-   // Arguments explained:
-   // `href` [REQUIRED] is the URL for your CSS file.
-   // `before` [OPTIONAL] is the element the script should use as 
a reference for injecting our stylesheet  before
-   // By default, loadCSS attempts to inject the link 
after the last stylesheet or script in the DOM. However, you might desire a 
more specific location in your document.
-   // `media` [OPTIONAL] is the media type or query of the 
stylesheet. By default it will be 'all'
-   var doc = w.document;
-   var ss = doc.createElement( "link" );
-   var newMedia = media || "all";
-   var ref;
-   if( before ){
-   ref = before;
-   }
-   else {
-   var refs = ( doc.body || doc.getElementsByTagName( 
"head" )[ 0 ] ).childNodes;
-   ref = refs[ refs.length - 1];
-   }
-
-   var sheets = doc.styleSheets;
-   ss.rel = "stylesheet";
-   ss.href = href;
-   // temporarily set media to something inapplicable to ensure 
it'll fetch without blocking render
-   ss.media = "only x";
-
-
-   // Inject link
-   // Note: the ternary preserves the existing behavior of 
"before" argument, but we could choose to change the argument to "after" in a 
later release and standardize on ref.nextSibling for all refs
-   // Note: `insertBefore` is used instead of 
`appendChild`, for safety re: 
http://www.paulirish.com/2011/surefire-dom-element-insertion/
-   ref.parentNode.insertBefore( ss, ( before ? ref : 
ref.nextSibling ) );
-   // A method (exposed on return object for external use) that 
mimics onload by polling until document.styleSheets until it includes the new 
sheet.
-   var onloadcssdefined = function( cb ){
-   var resolvedHref = ss.href;
-   var i = sheets.length;
-   while( i-- ){
-   if( sheets[ i ].href === resolvedHref ){
-   return cb();
-   }
-   }
-   setTimeout(function() {
-   onloadcssdefined( cb );
-   });
-   };
-
-   // once loaded, set link's media back to `all` so that the 
stylesheet applies once it loads
-   if( ss.addEventListener ){
-   ss.addEventListener( "load", function(){
-   this.media = newMedia;
-   });
-   }
-   ss.onloadcssdefined = onloadcssdefined;
-   onloadcssdefined(function() {
-   if( ss.media !== newMedia ){
-   ss.media = newMedia;
-   }
-   });
-   return ss;
-   };
-   // commonjs
-   if( typeof exports !== "undefined" ){
-   exports.loadCSS = loadCSS;
-   }
-   else {
-   w.loadCSS = loadCSS;
-   }
-}( typeof global !== "undefined" ? global : this ));



[27/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/css/jquery-ui-1.11.4.css
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/css/jquery-ui-1.11.4.css
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/css/jquery-ui-1.11.4.css
deleted file mode 100644
index aa07732..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/css/jquery-ui-1.11.4.css
+++ /dev/null
@@ -1,850 +0,0 @@
-/*! jQuery UI - v1.11.4 - 2015-10-14
-* http://jqueryui.com
-* Includes: core.css, draggable.css, resizable.css, selectable.css, 
sortable.css, autocomplete.css, button.css, dialog.css, menu.css, spinner.css, 
theme.css
-* To view and modify this theme, visit 
http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif=bold=1.1em=4px=f6a828=gloss_wave=35=e78f08=ff=ff=ee=highlight_soft=100=dd=33=22=f6f6f6=glass=100=cc=1c94c4=ef8c08=fdf5ce=glass=100=fbcb09=c77405=ef8c08=ff=glass=65=fbd850=eb8f00=ef8c08=ffe45c=highlight_soft=75=fed22f=363636
 
ight=228ef1=b81900=diagonals_thick=18=cd0a0a=ff=ffd27a=66=diagonals_thick=20=50=00=flat=10=20=5px=-5px=-5px=5px
-* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
-
-/* Layout helpers
---*/
-.ui-helper-hidden {
-   display: none;
-}
-.ui-helper-hidden-accessible {
-   border: 0;
-   clip: rect(0 0 0 0);
-   height: 1px;
-   margin: -1px;
-   overflow: hidden;
-   padding: 0;
-   position: absolute;
-   width: 1px;
-}
-.ui-helper-reset {
-   margin: 0;
-   padding: 0;
-   border: 0;
-   outline: 0;
-   line-height: 1.3;
-   text-decoration: none;
-   font-size: 100%;
-   list-style: none;
-}
-.ui-helper-clearfix:before,
-.ui-helper-clearfix:after {
-   content: "";
-   display: table;
-   border-collapse: collapse;
-}
-.ui-helper-clearfix:after {
-   clear: both;
-}
-.ui-helper-clearfix {
-   min-height: 0; /* support: IE7 */
-}
-.ui-helper-zfix {
-   width: 100%;
-   height: 100%;
-   top: 0;
-   left: 0;
-   position: absolute;
-   opacity: 0;
-   filter:Alpha(Opacity=0); /* support: IE8 */
-}
-
-.ui-front {
-   z-index: 100;
-}
-
-
-/* Interaction Cues
---*/
-.ui-state-disabled {
-   cursor: default !important;
-}
-
-
-/* Icons
---*/
-
-/* states and images */
-.ui-icon {
-   display: block;
-   text-indent: -9px;
-   overflow: hidden;
-   background-repeat: no-repeat;
-}
-
-
-/* Misc visuals
---*/
-
-/* Overlays */
-.ui-widget-overlay {
-   position: fixed;
-   top: 0;
-   left: 0;
-   width: 100%;
-   height: 100%;
-}
-.ui-draggable-handle {
-   -ms-touch-action: none;
-   touch-action: none;
-}
-.ui-resizable {
-   position: relative;
-}
-.ui-resizable-handle {
-   position: absolute;
-   font-size: 0.1px;
-   display: block;
-   -ms-touch-action: none;
-   touch-action: none;
-}
-.ui-resizable-disabled .ui-resizable-handle,
-.ui-resizable-autohide .ui-resizable-handle {
-   display: none;
-}
-.ui-resizable-n {
-   cursor: n-resize;
-   height: 7px;
-   width: 100%;
-   top: -5px;
-   left: 0;
-}
-.ui-resizable-s {
-   cursor: s-resize;
-   height: 7px;
-   width: 100%;
-   bottom: -5px;
-   left: 0;
-}
-.ui-resizable-e {
-   cursor: e-resize;
-   width: 7px;
-   right: -5px;
-   top: 0;
-   height: 100%;
-}
-.ui-resizable-w {
-   cursor: w-resize;
-   width: 7px;
-   left: -5px;
-   top: 0;
-   height: 100%;
-}
-.ui-resizable-se {
-   cursor: se-resize;
-   width: 12px;
-   height: 12px;
-   right: 1px;
-   bottom: 1px;
-}
-.ui-resizable-sw {
-   cursor: sw-resize;
-   width: 9px;
-   height: 9px;
-   left: -5px;
-   bottom: -5px;
-}
-.ui-resizable-nw {
-   cursor: nw-resize;
-   width: 9px;
-   height: 9px;
-   left: -5px;
-   top: -5px;
-}
-.ui-resizable-ne {
-   cursor: ne-resize;
-   width: 9px;
-   height: 9px;
-   right: -5px;
-   top: -5px;
-}
-.ui-selectable {
-   -ms-touch-action: none;
-   touch-action: none;
-}
-.ui-selectable-helper {
-   position: absolute;
-   z-index: 100;
-   border: 1px dotted black;
-}
-.ui-sortable-handle {
-   -ms-touch-action: none;
-   touch-action: none;
-}
-.ui-autocomplete {
-   position: absolute;
-   top: 0;
-   left: 0;
-   cursor: default;
-}
-.ui-button {
-   display: inline-block;
-   position: relative;
-   padding: 0;
-   line-height: normal;
-

[28/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/scss/_icons.scss
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/scss/_icons.scss
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/scss/_icons.scss
deleted file mode 100644
index fbcfe81..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/scss/_icons.scss
+++ /dev/null
@@ -1,596 +0,0 @@
-/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
-   readers do not read off random characters that represent icons */
-
-.#{$fa-css-prefix}-glass:before { content: $fa-var-glass; }
-.#{$fa-css-prefix}-music:before { content: $fa-var-music; }
-.#{$fa-css-prefix}-search:before { content: $fa-var-search; }
-.#{$fa-css-prefix}-envelope-o:before { content: $fa-var-envelope-o; }
-.#{$fa-css-prefix}-heart:before { content: $fa-var-heart; }
-.#{$fa-css-prefix}-star:before { content: $fa-var-star; }
-.#{$fa-css-prefix}-star-o:before { content: $fa-var-star-o; }
-.#{$fa-css-prefix}-user:before { content: $fa-var-user; }
-.#{$fa-css-prefix}-film:before { content: $fa-var-film; }
-.#{$fa-css-prefix}-th-large:before { content: $fa-var-th-large; }
-.#{$fa-css-prefix}-th:before { content: $fa-var-th; }
-.#{$fa-css-prefix}-th-list:before { content: $fa-var-th-list; }
-.#{$fa-css-prefix}-check:before { content: $fa-var-check; }
-.#{$fa-css-prefix}-remove:before,
-.#{$fa-css-prefix}-close:before,
-.#{$fa-css-prefix}-times:before { content: $fa-var-times; }
-.#{$fa-css-prefix}-search-plus:before { content: $fa-var-search-plus; }
-.#{$fa-css-prefix}-search-minus:before { content: $fa-var-search-minus; }
-.#{$fa-css-prefix}-power-off:before { content: $fa-var-power-off; }
-.#{$fa-css-prefix}-signal:before { content: $fa-var-signal; }
-.#{$fa-css-prefix}-gear:before,
-.#{$fa-css-prefix}-cog:before { content: $fa-var-cog; }
-.#{$fa-css-prefix}-trash-o:before { content: $fa-var-trash-o; }
-.#{$fa-css-prefix}-home:before { content: $fa-var-home; }
-.#{$fa-css-prefix}-file-o:before { content: $fa-var-file-o; }
-.#{$fa-css-prefix}-clock-o:before { content: $fa-var-clock-o; }
-.#{$fa-css-prefix}-road:before { content: $fa-var-road; }
-.#{$fa-css-prefix}-download:before { content: $fa-var-download; }
-.#{$fa-css-prefix}-arrow-circle-o-down:before { content: 
$fa-var-arrow-circle-o-down; }
-.#{$fa-css-prefix}-arrow-circle-o-up:before { content: 
$fa-var-arrow-circle-o-up; }
-.#{$fa-css-prefix}-inbox:before { content: $fa-var-inbox; }
-.#{$fa-css-prefix}-play-circle-o:before { content: $fa-var-play-circle-o; }
-.#{$fa-css-prefix}-rotate-right:before,
-.#{$fa-css-prefix}-repeat:before { content: $fa-var-repeat; }
-.#{$fa-css-prefix}-refresh:before { content: $fa-var-refresh; }
-.#{$fa-css-prefix}-list-alt:before { content: $fa-var-list-alt; }
-.#{$fa-css-prefix}-lock:before { content: $fa-var-lock; }
-.#{$fa-css-prefix}-flag:before { content: $fa-var-flag; }
-.#{$fa-css-prefix}-headphones:before { content: $fa-var-headphones; }
-.#{$fa-css-prefix}-volume-off:before { content: $fa-var-volume-off; }
-.#{$fa-css-prefix}-volume-down:before { content: $fa-var-volume-down; }
-.#{$fa-css-prefix}-volume-up:before { content: $fa-var-volume-up; }
-.#{$fa-css-prefix}-qrcode:before { content: $fa-var-qrcode; }
-.#{$fa-css-prefix}-barcode:before { content: $fa-var-barcode; }
-.#{$fa-css-prefix}-tag:before { content: $fa-var-tag; }
-.#{$fa-css-prefix}-tags:before { content: $fa-var-tags; }
-.#{$fa-css-prefix}-book:before { content: $fa-var-book; }
-.#{$fa-css-prefix}-bookmark:before { content: $fa-var-bookmark; }
-.#{$fa-css-prefix}-print:before { content: $fa-var-print; }
-.#{$fa-css-prefix}-camera:before { content: $fa-var-camera; }
-.#{$fa-css-prefix}-font:before { content: $fa-var-font; }
-.#{$fa-css-prefix}-bold:before { content: $fa-var-bold; }
-.#{$fa-css-prefix}-italic:before { content: $fa-var-italic; }
-.#{$fa-css-prefix}-text-height:before { content: $fa-var-text-height; }
-.#{$fa-css-prefix}-text-width:before { content: $fa-var-text-width; }
-.#{$fa-css-prefix}-align-left:before { content: $fa-var-align-left; }
-.#{$fa-css-prefix}-align-center:before { content: $fa-var-align-center; }
-.#{$fa-css-prefix}-align-right:before { content: $fa-var-align-right; }
-.#{$fa-css-prefix}-align-justify:before { content: $fa-var-align-justify; }
-.#{$fa-css-prefix}-list:before { content: $fa-var-list; }
-.#{$fa-css-prefix}-dedent:before,
-.#{$fa-css-prefix}-outdent:before { content: $fa-var-outdent; }
-.#{$fa-css-prefix}-indent:before { content: $fa-var-indent; }
-.#{$fa-css-prefix}-video-camera:before { content: $fa-var-video-camera; }
-.#{$fa-css-prefix}-photo:before,
-.#{$fa-css-prefix}-image:before,
-.#{$fa-css-prefix}-picture-o:before { content: $fa-var-picture-o; }
-.#{$fa-css-prefix}-pencil:before { content: 

[18/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/daterangepicker/js/daterangepicker.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/daterangepicker/js/daterangepicker.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/daterangepicker/js/daterangepicker.js
deleted file mode 100644
index e88b45f..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/daterangepicker/js/daterangepicker.js
+++ /dev/null
@@ -1,1560 +0,0 @@
-/**
-* @version: 2.1.24
-* @author: Dan Grossman http://www.dangrossman.info/
-* @copyright: Copyright (c) 2012-2016 Dan Grossman. All rights reserved.
-* @license: Licensed under the MIT license. See 
http://www.opensource.org/licenses/mit-license.php
-* @website: https://www.improvely.com/
-*/
-// Follow the UMD template 
https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js
-(function (root, factory) {
-if (typeof define === 'function' && define.amd) {
-// AMD. Make globaly available as well
-define(['moment', 'jquery'], function (moment, jquery) {
-return (root.daterangepicker = factory(moment, jquery));
-});
-} else if (typeof module === 'object' && module.exports) {
-// Node / Browserify
-//isomorphic issue
-var jQuery = (typeof window != 'undefined') ? window.jQuery : 
undefined;
-if (!jQuery) {
-jQuery = require('jquery');
-if (!jQuery.fn) jQuery.fn = {};
-}
-module.exports = factory(require('moment'), jQuery);
-} else {
-// Browser globals
-root.daterangepicker = factory(root.moment, root.jQuery);
-}
-}(this, function(moment, $) {
-var DateRangePicker = function(element, options, cb) {
-
-//default settings for options
-this.parentEl = 'body';
-this.element = $(element);
-this.startDate = moment().startOf('day');
-this.endDate = moment().endOf('day');
-this.minDate = false;
-this.maxDate = false;
-this.dateLimit = false;
-this.autoApply = false;
-this.singleDatePicker = false;
-this.showDropdowns = false;
-this.showWeekNumbers = false;
-this.showISOWeekNumbers = false;
-this.showCustomRangeLabel = true;
-this.timePicker = false;
-this.timePicker24Hour = false;
-this.timePickerIncrement = 1;
-this.timePickerSeconds = false;
-this.linkedCalendars = true;
-this.autoUpdateInput = true;
-this.alwaysShowCalendars = false;
-
-this.opens = 'right';
-if (this.element.hasClass('pull-right'))
-this.opens = 'left';
-
-this.drops = 'down';
-if (this.element.hasClass('dropup'))
-this.drops = 'up';
-
-this.buttonClasses = 'btn btn-sm';
-this.applyClass = 'btn-success';
-this.cancelClass = 'btn-default';
-
-this.locale = {
-direction: 'ltr',
-format: 'MM/DD/',
-separator: ' - ',
-applyLabel: 'Apply',
-cancelLabel: 'Cancel',
-weekLabel: 'W',
-customRangeLabel: 'Custom Range',
-daysOfWeek: moment.weekdaysMin(),
-monthNames: moment.monthsShort(),
-firstDay: moment.localeData().firstDayOfWeek()
-};
-
-this.callback = function() { };
-
-//some state information
-this.isShowing = false;
-this.leftCalendar = {};
-this.rightCalendar = {};
-
-//custom options from user
-if (typeof options !== 'object' || options === null)
-options = {};
-
-//allow setting options with data attributes
-//data-api options will be overwritten with custom javascript options
-options = $.extend(this.element.data(), options);
-
-//html template for the picker UI
-if (typeof options.template !== 'string' && !(options.template 
instanceof $))
-options.template = '' +
-'' +
-'' +
-  '' +
-  '' +
-  '' +
-'' +
-'' +
-  '' +
-'' +
-'' +
-'' +
-'' +
-'' +
-  '' +
-  '' +
-  '' +
-'' +
-'' +
-  '' +
-'' +
-'' +
-'' +
-'' +
-'' +
-' ' +
-'' +
-'' +
-'' +
-'';
-
-this.parentEl = 

[50/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/pom.xml
--
diff --git a/ambari-logsearch/ambari-logsearch-web-new/pom.xml 
b/ambari-logsearch/ambari-logsearch-web-new/pom.xml
deleted file mode 100644
index 28e1754..000
--- a/ambari-logsearch/ambari-logsearch-web-new/pom.xml
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;>
-  
-ambari-logsearch
-org.apache.ambari
-2.0.0.0-SNAPSHOT
-  
-  4.0.0
-  ambari-logsearch-web-new
-  Ambari LogSearch Web New
-  2.0.0.0-SNAPSHOT
-  org.apache.ambari
-  Ambari Logsearch Web New
-
-  
-
/tmp/logsearch_npm_config_tmp
-v6.9.0
-v0.23.3
-  
-
-  
-
-  
-com.github.eirslett
-frontend-maven-plugin
-1.4
-
-  ${node.version}
-  ${yarn.version}
-  
${project.build.directory}/webapp-build
-  
false
-  
-  
-${logsearch.npm.config.tmp}
-  
-
-
-  
-install node and yarn
-generate-resources
-
-  install-node-and-yarn
-
-  
-  
-yarn install
-generate-resources
-
-  yarn
-
-
-  install --ignore-engines --pure-lockfile
-
-  
-  
-generate dist
-generate-resources
-
- yarn
-
-
-  build-prod
-
-  
-  
-
-  
-  
-maven-resources-plugin
-2.6
-
-  
-process-webapp-sources
-process-sources
-
-  copy-resources
-
-
-  ${basedir}/target/webapp-build
-  
-
-  ${basedir}
-  
-e2e/**
-src/**
-.*
-package.json
-protactor.conf.js
-yarn.lock
-karma.conf.js
-tsconfig.json
-tslint.json
-  
-
-  
-
-  
-  
-copy-resources
-process-resources
-
-  copy-resources
-
-
-  ${basedir}/target/classes/dist
-  
-
-  ${basedir}/target/webapp-build/dist
-  false
-
-  
-
-  
-
-  
-  
-org.apache.rat
-apache-rat-plugin
-
-  
-README.md
-*.editorconfig
-src/vendor/**
-yarn.lock
-node_modules/**
-dist/**
-**/*.json
-**/*.log
-**/*.txt
-  
-
-
-  
-test
-
-  check
-
-  
-
-  
-
-  
-
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/protractor.conf.js
--
diff --git a/ambari-logsearch/ambari-logsearch-web-new/protractor.conf.js 
b/ambari-logsearch/ambari-logsearch-web-new/protractor.conf.js
deleted file mode 100644
index 6b4a31c..000
--- a/ambari-logsearch/ambari-logsearch-web-new/protractor.conf.js
+++ /dev/null
@@ -1,48 +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.
- */
-
-// Protractor configuration file, see link for more information
-// https://github.com/angular/protractor/blob/master/lib/config.ts
-
-const { SpecReporter } = require('jasmine-spec-reporter');
-
-exports.config = {
-  allScriptsTimeout: 11000,
-  specs: [
-'./e2e/**/*.e2e-spec.ts'
-  ],
-  capabilities: {
-

[09/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/dashboard/ComponentListView.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/dashboard/ComponentListView.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/dashboard/ComponentListView.js
deleted file mode 100644
index f3bf985..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/dashboard/ComponentListView.js
+++ /dev/null
@@ -1,319 +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',
-   'backbone',
-   'utils/Globals',
-   'utils/ViewUtils',
-   'collections/VNodeList',
-   'hbs!tmpl/dashboard/ComponentListView_tmpl'
-],function(require,Backbone,Globals,ViewUtils,VNodeList,ComponentListViewTmpl){
-'use strict';
-   
-   return Backbone.Marionette.ItemView.extend(
-   /** @lends ComponentListView */
-   {
-   _viewName : 'ComponentListView',
-
-   template: ComponentListViewTmpl,
-   
-   /** ui selector cache */
-   ui: {
-   componentsList : 
"[data-id='componentContainer']",
-   content : "[data-id='content']"
-   },
-
-   /** ui events hash */
-   events: function() {
-   var events={};
-   events["click li"] = 'onComponentClick';
-   events["click .host-info a[data-host]"] 
= 'onNewTabIconClick';
-   events["mouseenter .host-info"] = 
function(e){
-   
$(e.currentTarget).children("a[data-host]").removeClass("hidden");
-   };
-   events["mouseleave .host-info"] = 
function(e){
-   
$(e.currentTarget).children("a[data-host]").addClass("hidden");
-   };
-   return events;
-   },
-   /**
-* intialize a new ComponentListView ItemView
-* @constructs
-*/
-   initialize: function(options) {
-   _.extend(this, 
_.pick(options,'vent','globalVent','params'));
-   this.searchParams = (this.params)? 
this.params :{};
-   this.initializeCollection();
-   this.bindEvents();
-   },
-   initializeCollection : function(){
-   this.componentsList = new VNodeList([],{
-   state: {
-   firstPage: 0,
-   pageSize: 9
-   }
-   });
-   this.componentsList.url = 
Globals.baseURL + "service/logs/components/levels/counts";
-   this.hostList = new VNodeList([],{
-   state: {
-   firstPage: 0,
-   pageSize: 9
-   }
-   });
-   this.hostList.url = Globals.baseURL + 
"service/logs/hosts/components";
-   },
-   /** all events binding here */
-   bindEvents : function(){
- 

[31/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/css/font-awesome.css
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/css/font-awesome.css
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/css/font-awesome.css
deleted file mode 100644
index 2dcdc22..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/css/font-awesome.css
+++ /dev/null
@@ -1,1801 +0,0 @@
-/*!
- *  Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome
- *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT 
License)
- */
-/* FONT PATH
- * -- */
-@font-face {
-  font-family: 'FontAwesome';
-  src: url('../fonts/fontawesome-webfont.eot?v=4.3.0');
-  src: url('../fonts/fontawesome-webfont.eot?#iefix=4.3.0') 
format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.3.0') 
format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.3.0') 
format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.3.0') 
format('truetype'), 
url('../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') 
format('svg');
-  font-weight: normal;
-  font-style: normal;
-}
-.fa {
-  display: inline-block;
-  font: normal normal normal 14px/1 FontAwesome;
-  font-size: inherit;
-  text-rendering: auto;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-  transform: translate(0, 0);
-}
-/* makes the font 33% larger relative to the icon container */
-.fa-lg {
-  font-size: 1.em;
-  line-height: 0.75em;
-  vertical-align: -15%;
-}
-.fa-2x {
-  font-size: 2em;
-}
-.fa-3x {
-  font-size: 3em;
-}
-.fa-4x {
-  font-size: 4em;
-}
-.fa-5x {
-  font-size: 5em;
-}
-.fa-fw {
-  width: 1.28571429em;
-  text-align: center;
-}
-.fa-ul {
-  padding-left: 0;
-  margin-left: 2.14285714em;
-  list-style-type: none;
-}
-.fa-ul > li {
-  position: relative;
-}
-.fa-li {
-  position: absolute;
-  left: -2.14285714em;
-  width: 2.14285714em;
-  top: 0.14285714em;
-  text-align: center;
-}
-.fa-li.fa-lg {
-  left: -1.85714286em;
-}
-.fa-border {
-  padding: .2em .25em .15em;
-  border: solid 0.08em #ee;
-  border-radius: .1em;
-}
-.pull-right {
-  float: right;
-}
-.pull-left {
-  float: left;
-}
-.fa.pull-left {
-  margin-right: .3em;
-}
-.fa.pull-right {
-  margin-left: .3em;
-}
-.fa-spin {
-  -webkit-animation: fa-spin 2s infinite linear;
-  animation: fa-spin 2s infinite linear;
-}
-.fa-pulse {
-  -webkit-animation: fa-spin 1s infinite steps(8);
-  animation: fa-spin 1s infinite steps(8);
-}
-@-webkit-keyframes fa-spin {
-  0% {
--webkit-transform: rotate(0deg);
-transform: rotate(0deg);
-  }
-  100% {
--webkit-transform: rotate(359deg);
-transform: rotate(359deg);
-  }
-}
-@keyframes fa-spin {
-  0% {
--webkit-transform: rotate(0deg);
-transform: rotate(0deg);
-  }
-  100% {
--webkit-transform: rotate(359deg);
-transform: rotate(359deg);
-  }
-}
-.fa-rotate-90 {
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
-  -webkit-transform: rotate(90deg);
-  -ms-transform: rotate(90deg);
-  transform: rotate(90deg);
-}
-.fa-rotate-180 {
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
-  -webkit-transform: rotate(180deg);
-  -ms-transform: rotate(180deg);
-  transform: rotate(180deg);
-}
-.fa-rotate-270 {
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
-  -webkit-transform: rotate(270deg);
-  -ms-transform: rotate(270deg);
-  transform: rotate(270deg);
-}
-.fa-flip-horizontal {
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
-  -webkit-transform: scale(-1, 1);
-  -ms-transform: scale(-1, 1);
-  transform: scale(-1, 1);
-}
-.fa-flip-vertical {
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
-  -webkit-transform: scale(1, -1);
-  -ms-transform: scale(1, -1);
-  transform: scale(1, -1);
-}
-:root .fa-rotate-90,
-:root .fa-rotate-180,
-:root .fa-rotate-270,
-:root .fa-flip-horizontal,
-:root .fa-flip-vertical {
-  filter: none;
-}
-.fa-stack {
-  position: relative;
-  display: inline-block;
-  width: 2em;
-  height: 2em;
-  line-height: 2em;
-  vertical-align: middle;
-}
-.fa-stack-1x,
-.fa-stack-2x {
-  position: absolute;
-  left: 0;
-  width: 100%;
-  text-align: center;
-}
-.fa-stack-1x {
-  line-height: inherit;
-}
-.fa-stack-2x {
-  font-size: 2em;
-}
-.fa-inverse {
-  color: #ff;
-}
-/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
-   readers do not read off random characters that represent icons */
-.fa-glass:before {
-  content: "\f000";
-}
-.fa-music:before {
-  content: "\f001";
-}
-.fa-search:before {
-  content: "\f002";
-}
-.fa-envelope-o:before {
-  content: "\f003";
-}
-.fa-heart:before {
-  content: "\f004";
-}

[10/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/common/Header.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/common/Header.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/common/Header.js
deleted file mode 100644
index 3cdca56..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/common/Header.js
+++ /dev/null
@@ -1,481 +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',
-'backbone',
-'handlebars',
-'hbs!tmpl/common/Header_tmpl',
-'utils/Utils',
-'moment',
-'utils/Globals',
-], function(require, Backbone, Handlebars, Header_tmpl, Utils, moment, 
Globals) {
-'use strict';
-
-var Header = Backbone.Marionette.Layout.extend(
-/** @lends Header */
-{
-_viewName: 'Header',
-
-template: Header_tmpl,
-
-
-/** ui selector cache */
-ui: {
-'takeATour': "[data-id='takeATour']",
-'globalFilter': "li[data-id='exclusionList']",
-'globalNotification': '.dropdown .excludeStatus',
-'timeZoneChange': "li[data-id='timeZoneChange']",
-'createFilters' : "[data-id='createFilters']",
-'editParams'  : "a[data-id='editParams']"
-},
-
-/** ui events hash */
-events: function() {
-var events = {};
-events['click ' + this.ui.takeATour] = 'takeATour';
-events['click ' + this.ui.globalFilter] = 'exclusionListClick';
-events['click ' + this.ui.timeZoneChange] = 
'timeZoneChangeClick';
-events['click ' + this.ui.createFilters] = 
'createFiltersClick';
-events['click ' + this.ui.editParams] = 'editParamsClick';
-return events;
-},
-
-/**
- * intialize a new Header Layout 
- * @constructs
- */
-initialize: function(options) {
-
-_.extend(this, _.pick(options, 'collection', 'globalVent'));
-this.collection = new Backbone.Collection();
-this.bottomToTop();
-this.topToBottom();
-this.exclusionObj = {
-logMessageCollection: this.collection,
-components: []
-}
-
-this.bindEvents();
-},
-
-/** all events binding here */
-bindEvents: function() {
-this.listenTo(this.globalVent,"currentMap:load",function(obj){
-this.currentTimezone = obj;
-},this);
-},
-/** on render callback */
-onRender: function() {
-this.loadTimeZone();
-this.setNotificationCount(this.exclusionObj.components, 
this.collection.length);
-var storeTimezone = 
Utils.localStorage.checkLocalStorage('timezone');
-var zoneName = 
moment.tz(storeTimezone.value.split(',')[0]).zoneName();
-
-if (storeTimezone.value.split(',').length) {
-if (storeTimezone.value.split(',')[1]) {
-if (storeTimezone.value.split(',')[1] != zoneName) {
-Utils.localStorage.setLocalStorage('timezone', 
storeTimezone.value.split(',')[0] + "," + zoneName);
-}
-}
-
this.ui.timeZoneChange.find('span').text(moment.tz(storeTimezone.value.split(',')[0]).zoneName());
-}
-this.currentTimezone = storeTimezone;
-this.checkParams();
-},
-onShow : function(){
-this.triggerAutoTourCheck();
-},
-loadTimeZone: function() {
-
-
-},
-checkParams : function(){
-if(window.location.search){
-var url = 

[44/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/fonts/Roboto-Regular-webfont.svg
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/fonts/Roboto-Regular-webfont.svg
 
b/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/fonts/Roboto-Regular-webfont.svg
deleted file mode 100644
index 06824bf..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/fonts/Roboto-Regular-webfont.svg
+++ /dev/null
@@ -1,7606 +0,0 @@
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd; >
-http://www.w3.org/2000/svg;>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

[42/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/vendor/js/WorldMapGenerator.min.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/vendor/js/WorldMapGenerator.min.js
 
b/ambari-logsearch/ambari-logsearch-web-new/src/vendor/js/WorldMapGenerator.min.js
deleted file mode 100644
index 0b54091..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/vendor/js/WorldMapGenerator.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * @version: 1.0.1
- * @author: Keval Bhatt 
- * @copyright: Copyright (c) 2015 Keval Bhatt. All rights reserved.
- * @license: Licensed under the MIT license. See 
http://www.opensource.org/licenses/mit-license.php
- * @website: http://kevalbhatt.github.io/WorldMapGenerator/
- */
-"use strict";!function(e,n){if("function"==typeof 
define&)define(["moment","jquery"],function(o,t){e.worldMapTime={},n(o,t,e.worldMapTime)});else{if("undefined"==typeof
 e.moment){var o=!1;console.log("Day light feature requires moment.js")}else 
if(!e.moment.tz)throw new Error("moment-timezone dependency not 
found");if("undefined"==e.jQuery&&"undefined"==e.Zepto&&"undefined"==e.ender&&"undefined"==e.$)throw
 new Error("jQuery dependnecy not found");var 
t=e.worldMapTime={};n(e.moment||o,e.jQuery||e.Zepto||e.ender||e.$,t)}}(this,function(e,n,o){function
 t(e){return this.each(function(){var 
o=n(this),t=n.extend({},a.DEFAULTS,o.data(),"object"==typeof 
e&);o.data("WorldMapGenerator",new a(o,t)),o.trigger("map:loaded")})}var 
i=function(e,o){for(var t=[],i=(a.timeZoneValue.filter(function(i){return 
i[e]===o?(t.push(n.extend(!0,{},i)),i):void 0}),0);i0){for(var r in 
n.quickLink[0])i.push(this.genrateElement("span",{"data-select":n.quickLink[0][r]},r));var
 p=this.genrateElement("div",{"cl
 ass":"quickLink"},i);s.push(p)}var 
z=this.genrateElement("svg",{"class":"timezone-map",viewBox:"0 0 "+n.width+" 
"+n.height},o,!0);if(s.length>0){var 
c=this.genrateElement("div",{"class":"Cbox"},s);this.$el.append(c)}if(this.$el.append(z),n.showHoverText){var
 
u=this.genrateElement("span",{"class":"hoverZone"});this.$el.append(u)}n.defaultCss&(n),this.bindEvent(n)},bindEvent:function(){var
 e=this;this.$el.on("mouseenter","svg polygon",function(o){var 
t=n(this).data();n('.timezone-map 
polygon[data-zonename="'+t.zonename+'"]').attr("class","active"),e.$el.find(".hoverZone").text(t.timezone+"
 ("+t.zonename+")")}),this.$el.on("mouseleave","svg 
polygon",function(o){n(".timezone-map 
polygon").attr("class",""),e.$el.find(".hoverZone").text("")}),this.$el.on("click","svg
 
polygon",function(){e.setValue(n(this).attr("data-timezone")),e.$el.trigger("map:clicked")}),this.$el.on("change","select",function(){e.setValue(n(this).val()),e.$el.trigger("map:clicked")}),this.$el.on("click"
 ,".quickLink span",function(){var 

[34/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/assets/i18n/en.json
--
diff --git a/ambari-logsearch/ambari-logsearch-web/src/assets/i18n/en.json 
b/ambari-logsearch/ambari-logsearch-web/src/assets/i18n/en.json
new file mode 100644
index 000..84c4abc
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/assets/i18n/en.json
@@ -0,0 +1,124 @@
+{
+  "common.title": "Log Search",
+
+  "modal.submit": "OK",
+  "modal.cancel": "Cancel",
+
+  "authorization.name": "Username",
+  "authorization.password": "Password",
+  "authorization.signIn": "Sign In",
+  "authorization.error": "Error! Invalid User 
credentials.Please try again.",
+
+  "topMenu.undo": "Undo",
+  "topMenu.redo": "Redo",
+  "topMenu.refresh": "Refresh",
+  "topMenu.history": "History",
+
+  "filter.all": "All",
+
+  "filter.clusters": "Clusters",
+  "filter.message": "Message:",
+  "filter.components": "Components",
+  "filter.levels": "Levels",
+  "filter.capture": "Capture",
+  "filter.excluded": "Excluded",
+  "filter.hosts": "Hosts",
+
+  "filter.timeRange.1hr": "Last 1 hour",
+  "filter.timeRange.24hr": "Last 24 hours",
+  "filter.timeRange.today": "Today",
+  "filter.timeRange.yesterday": "Yesterday",
+  "filter.timeRange.7d": "Last 7 days",
+  "filter.timeRange.30d": "Last 30 days",
+  "filter.timeRange.thisMonth": "This month",
+  "filter.timeRange.lastMonth": "Last month",
+  "filter.timeRange.custom": "Custom range",
+
+  "levels.fatal": "Fatal",
+  "levels.error": "Error",
+  "levels.warn": "Warn",
+  "levels.info": "Info",
+  "levels.debug": "Debug",
+  "levels.trace": "Trace",
+  "levels.unknown": "Unknown",
+
+  "sorting.title": "Sort By",
+  "sorting.level.asc": "Ascending Level",
+  "sorting.level.desc": "Descending Level",
+  "sorting.component.asc": "Ascending Component",
+  "sorting.component.desc": "Descending Component",
+  "sorting.time.asc": "Ascending Time",
+  "sorting.time.desc": "Descending Time",
+
+  "pagination.title": "Rows per page:",
+  "pagination.numbers": "{{startIndex}}-{{endIndex}} of {{totalCount}}",
+
+  "logs.columns": "Columns",
+  "logs.status": "Status",
+  "logs.details": "Details",
+  "logs.message": "Message",
+  "logs.bundleId": "Bundle Id",
+  "logs.caseId": "Case Id",
+  "logs.cluster": "Cluster",
+  "logs.eventCount": "Event Count",
+  "logs.file": "File",
+  "logs.host": "Host",
+  "logs.id": "Id",
+  "logs.ip": "Ip",
+  "logs.level": "Level",
+  "logs.lineNumber": "Line Number",
+  "logs.logType": "Log Type",
+  "logs.logfileLineNumber": "Logfile Line Number",
+  "logs.loggerName": "Logger Name",
+  "logs.method": "Method",
+  "logs.path": "Path",
+  "logs.rowType": "Row Type",
+  "logs.threadName": "Thread",
+  "logs.type": "Type",
+  "logs.enforcer": "Access Enforcer",
+  "logs.accessType": "Access Type",
+  "logs.action": "Action",
+  "logs.agent": "Agent",
+  "logs.agentHost": "Agent Host",
+  "logs.authType": "Auth Type",
+  "logs.clientIp": "Client Ip",
+  "logs.clientType": "Client Type",
+  "logs.dst": "DST",
+  "logs.eventTime": "Event Time",
+  "logs.logMessage": "Log Message",
+  "logs.logTime": "Log Time",
+  "logs.perm": "Perm",
+  "logs.policy": "Policy",
+  "logs.proxyUsers": "Proxy Users",
+  "logs.reason": "Reason",
+  "logs.repo": "Repo",
+  "logs.repoType": "Repo Type",
+  "logs.reqCallerId": "Req Caller Id",
+  "logs.reqContext": "Req Context",
+  "logs.reqData": "Req Data",
+  "logs.reqSelfId": "Req Self Id",
+  "logs.resType": "Res Type",
+  "logs.resource": "Resource",
+  "logs.result": "Result",
+  "logs.session": "Session",
+  "logs.text": "Text",
+  "logs.ugi": "UGI",
+  "logs.user": "User",
+  "logs.baseUrl": "Base URL",
+  "logs.command": "Command",
+  "logs.component": "Component",
+  "logs.details": "Details",
+  "logs.displayName": "Display Name",
+  "logs.os": "OS",
+  "logs.repoId": "Repo Id",
+  "logs.repoVersion": "Repo Version",
+  "logs.repositories": "Repositories",
+  "logs.requestId": "Request Id",
+  "logs.resultStatus": "Result Status",
+  "logs.roles": "Roles",
+  "logs.stackVersion": "Stack Version",
+  "logs.stack": "Stack",
+  "logs.taskId": "Task Id",
+  "logs.versionNote": "Version Note",
+  "logs.versionNumber": "Version Number"
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/environments/environment.prod.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/environments/environment.prod.ts 
b/ambari-logsearch/ambari-logsearch-web/src/environments/environment.prod.ts
new file mode 100644
index 000..690ddb1
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/environments/environment.prod.ts
@@ -0,0 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work 

[05/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/tabs/LogFileView.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/tabs/LogFileView.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/tabs/LogFileView.js
deleted file mode 100644
index c7e1cba..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/tabs/LogFileView.js
+++ /dev/null
@@ -1,864 +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',
-'backbone',
-'utils/Globals',
-'utils/Utils',
-'moment',
-'utils/ViewUtils',
-'collections/VLogList',
-'hbs!tmpl/tabs/LogFileView_tmpl',
-'views/common/JBDialog',
-'views/tabs/ExportLogFileView',
-'select2'
-], function(require, Backbone, Globals, Utils, moment, ViewUtils, VLogList, 
LogFileTmpl, JBDialog, ExportLogFileView) {
-
-'use strict';
-
-return Backbone.Marionette.Layout.extend(
-/** @lends LogFileView */
-{
-_viewName: 'LogFileView',
-
-template: LogFileTmpl,
-/** Layout sub regions */
-regions: {
-RLogFileTable: "#logFileTable",
-RLogLevel: "#r_LogLevel",
-//RVSSearch : "#r_VSSearch",
-RHistogram: "#r_Histogram",
-RTimer: "[data-id='timer']",
-RDatePicker: "#r_DatePicker",
-RLogSnapShot: "#r_LogSnapShot",
-RVisualSearchIncCol: "[data-id='r_vsSearchIncCol']",
-RVisualSearchExCol: "[data-id='r_vsSearchExCol']"
-},
-
-/** ui selector cache */
-ui: {
-searchBoxBtn: '[data-id="hierarchySearchBtn"]',
-searchBox: '[data-id="hierarchySearch"]',
-find: '[data-id="find"]',
-next: '[data-id="next"]',
-prev: '[data-id="prev"]',
-lock: '[data-id="lock"]',
-last: '[data-id="last"]',
-first: '[data-id="first"]',
-cancelFind: '[data-id="cancelFind"]',
-contextMenu: ".contextMenu",
-pageNotation: ".pageNotation",
-clearSearch: ".clearSearch"
-},
-
-/** ui events hash */
-events: function() {
-var events = {};
-events["click " + this.ui.searchBoxBtn] = 'onSearchLogClick';
-events['click #searchLog'] = 'onSearchLogClick';
-events['click [data-id="refresh-tab"]'] = 'onTabRefresh';
-events['click ' + this.ui.first] = 'onFindFirst';
-events['click ' + this.ui.prev] = 'onFindNxt';
-events['click ' + this.ui.next] = 'onFindNxt';
-events['click ' + this.ui.last] = 'onFindLast';
-events["keyup " + this.ui.find] = 'onFindKeyPress';
-events['click .clearSearch'] = 'onClearSearchClick';
-events["click " + this.ui.lock] = 'onLockToggle';
-events["click " + this.ui.cancelFind] = 'onCancelFindClick';
-events["click .contextMenu li a"] = 'onDropDownMenuClick';
-events['click [data-id="export-logs-text"]'] = 
'onExportLogClick';
-events['click .export-dropdown a'] = 'exportLogFile';
-events['change [data-id="toggleTable"]'] = 'onToggleTableView';
-events['click .quickMenu li'] = 'onQuickMenuClick';
-return events;
-},
-
-/**
- * intialize a new LogFileView Layout
- * @constructs
- */
-initialize: function(options) {
-_.extend(this, _.pick(options, 'globalVent', 'params'));
-this.logFileCollection = new VLogList([], {
-state: {
-firstPage: 0,
-pageSize: 25
-}
-});
-this.logFileCollection.url = Globals.baseURL + 

[38/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.ts
new file mode 100644
index 000..131edcd
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/accordion-panel/accordion-panel.component.ts
@@ -0,0 +1,33 @@
+/**
+ * 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.
+ */
+
+import {Component, Input, ContentChild, TemplateRef} from '@angular/core';
+
+@Component({
+  selector: 'accordion-panel',
+  templateUrl: './accordion-panel.component.html',
+  styleUrls: ['./accordion-panel.component.less']
+})
+export class AccordionPanelComponent {
+
+  @Input()
+  toggleId: string;
+
+  @ContentChild(TemplateRef)
+  template;
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.html
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.html 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.html
new file mode 100644
index 000..a0444c9
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.html
@@ -0,0 +1,34 @@
+
+
+
+  
+
+  {{'common.title' | translate}}
+  
+
+  
+
+
+
+  
+
+
+  
+
+  
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.less
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.less 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.less
new file mode 100644
index 000..d1aa7ff
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.less
@@ -0,0 +1,51 @@
+/**
+ * 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.
+ */
+
+@import 'variables';
+
+:host {
+  .full-size;
+  display: flex;
+  flex-direction: column;
+  background-color: @main-background-color; // TODO implement actual color
+  line-height: @default-line-height;
+
+  .navbar {
+margin-bottom: 0;
+border-radius: 0;
+background-color: @navbar-background-color;
+color: #fff;
+
+.container-fluid {
+  .default-flex;
+}
+
+h1 {
+  flex-basis: 70%;
+  margin-bottom: @h1-vertical-margin;
+  text-transform: uppercase;
+
+  &.full-flex-width {
+flex-basis: 100%;
+  }
+}
+
+/deep/ top-menu {
+  flex-basis: 30%;
+}
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
new file mode 100644
index 000..bc16ea4
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/components/app.component.spec.ts
@@ -0,0 

[14/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/RegionManager.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/RegionManager.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/RegionManager.js
deleted file mode 100644
index c9e3b17..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/RegionManager.js
+++ /dev/null
@@ -1,83 +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.
-*/
-
-/*
- * 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([
-   'backbone',
-   'communicator'
-],
-function( Backbone, Communicator ) {
-'use strict';
-
-   var RegionManager = Backbone.Marionette.Controller.extend({
-
-   initialize: function( options ) {
-   console.log("Initialize a Region Manager");
-
-   /* internal region manager */
-   this._regionManager = new 
Backbone.Marionette.RegionManager();
-
-   /* event API */
-   Communicator.reqres.setHandler("RM:addRegion", 
this.addRegion, this);
-   Communicator.reqres.setHandler("RM:removeRegion", 
this.removeRegion, this);
-   Communicator.reqres.setHandler("RM:getRegion", 
this.getRegion, this);
-   },
-
-   /* add region facade */
-   addRegion: function( regionName, regionId ) {
-   var region = this.getRegion( regionName );
-
-   if( region ) {
-   console.log("REGION ALREADY CREATED TO JUST 
RETURN REF");
-   return region;
-   }
-
-   return this._regionManager.addRegion( regionName, 
regionId );
-   },
-
-   /* remove region facade */
-   removeRegion: function( regionName ) {
-   this._regionManager.removeRegion( regionName );
-   },
-
-   /* get region facade */
-   getRegion: function( regionName ) {
-   return this._regionManager.get( regionName );
-   }
-   });
-
-   return new RegionManager();
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/collection_bases/VAuditLogListBase.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/collection_bases/VAuditLogListBase.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/collection_bases/VAuditLogListBase.js
deleted file mode 100644
index 53ec922..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/collection_bases/VAuditLogListBase.js
+++ /dev/null
@@ -1,73 +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
- *
- * 

[51/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old 
one (oleewere)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/02360dd5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/02360dd5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/02360dd5

Branch: refs/heads/trunk
Commit: 02360dd5d788fd2ad7b0edd2f706051c1cc690e8
Parents: 93011b2
Author: oleewere 
Authored: Fri Sep 1 16:55:25 2017 +0200
Committer: oleewere 
Committed: Tue Sep 5 21:32:02 2017 +0200

--
 .../ambari-logsearch-server/build.xml   |3 +
 .../ambari-logsearch-server/pom.xml |7 +-
 .../auth/filter/AbstractJWTFilter.java  |  193 +
 .../auth/model/JWTAuthenticationToken.java  |   47 +
 .../ambari/logsearch/conf/SecurityConfig.java   |   38 +-
 .../LogsearchLogoutSuccessHandler.java  |1 -
 .../web/filters/LogsearchJWTFilter.java |  150 +-
 .../web/model/JWTAuthenticationToken.java   |   53 -
 .../ambari-logsearch-web-new/.angular-cli.json  |   64 -
 .../ambari-logsearch-web-new/.editorconfig  |   13 -
 .../ambari-logsearch-web-new/.gitignore |   42 -
 .../ambari-logsearch-web-new/README.md  |   28 -
 .../e2e/app.e2e-spec.ts |   32 -
 .../ambari-logsearch-web-new/e2e/app.po.ts  |   29 -
 .../e2e/tsconfig.e2e.json   |   12 -
 .../ambari-logsearch-web-new/karma.conf.js  |   62 -
 .../ambari-logsearch-web-new/package.json   |   64 -
 .../ambari-logsearch-web-new/pom.xml|  171 -
 .../ambari-logsearch-web-new/protractor.conf.js |   48 -
 .../src/app/app.module.ts   |  169 -
 .../queries/audit-logs-query-params.class.ts|   50 -
 .../app/classes/queries/query-params.class.ts   |   23 -
 ...ce-logs-histogram-query-params.class.spec.ts |  203 -
 ...service-logs-histogram-query-params.class.ts |   69 -
 .../queries/service-logs-query-params.class.ts  |   31 -
 .../accordion-panel.component.html  |   25 -
 .../accordion-panel.component.less  |   42 -
 .../accordion-panel.component.spec.ts   |   42 -
 .../accordion-panel.component.ts|   33 -
 .../src/app/components/app.component.html   |   34 -
 .../src/app/components/app.component.less   |   51 -
 .../src/app/components/app.component.spec.ts|   71 -
 .../src/app/components/app.component.ts |   45 -
 .../dropdown-button.component.html  |   25 -
 .../dropdown-button.component.less  |   32 -
 .../dropdown-button.component.spec.ts   |   79 -
 .../dropdown-button.component.ts|   96 -
 .../dropdown-list/dropdown-list.component.html  |   31 -
 .../dropdown-list/dropdown-list.component.less  |   41 -
 .../dropdown-list.component.spec.ts |  130 -
 .../dropdown-list/dropdown-list.component.ts|   63 -
 .../filter-button.component.spec.ts |   78 -
 .../filter-button/filter-button.component.ts|   80 -
 .../filter-dropdown.component.spec.ts   |   92 -
 .../filter-dropdown.component.ts|   63 -
 .../filter-text-field.component.html|   21 -
 .../filter-text-field.component.less|   33 -
 .../filter-text-field.component.spec.ts |   82 -
 .../filter-text-field.component.ts  |   87 -
 .../filters-panel/filters-panel.component.html  |   46 -
 .../filters-panel/filters-panel.component.less  |   51 -
 .../filters-panel.component.spec.ts |   93 -
 .../filters-panel/filters-panel.component.ts|   44 -
 .../login-form/login-form.component.html|   33 -
 .../login-form/login-form.component.less|   22 -
 .../login-form/login-form.component.spec.ts |  122 -
 .../login-form/login-form.component.ts  |   59 -
 .../logs-container.component.html   |   22 -
 .../logs-container.component.less   |   25 -
 .../logs-container.component.spec.ts|  102 -
 .../logs-container/logs-container.component.ts  |  105 -
 .../logs-list/logs-list.component.html  |   54 -
 .../logs-list/logs-list.component.less  |  138 -
 .../logs-list/logs-list.component.spec.ts   |  102 -
 .../components/logs-list/logs-list.component.ts |   62 -
 .../main-container.component.html   |   24 -
 .../main-container.component.less   |   24 -
 .../main-container.component.spec.ts|   65 -
 .../main-container/main-container.component.ts  |   66 -
 .../menu-button/menu-button.component.html  |   28 -
 .../menu-button/menu-button.component.less  |   33 -
 .../menu-button/menu-button.component.spec.ts   |  133 -
 .../menu-button/menu-button.component.ts|   97 -
 .../app/components/modal/modal.component.html   |   40 -
 

[35/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/pipes/timezone-abbr.pipe.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/pipes/timezone-abbr.pipe.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/pipes/timezone-abbr.pipe.spec.ts
new file mode 100644
index 000..0d0c24c
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/pipes/timezone-abbr.pipe.spec.ts
@@ -0,0 +1,26 @@
+/**
+ * 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.
+ */
+
+import {TimeZoneAbbrPipe} from './timezone-abbr.pipe';
+
+describe('TimeZoneAbbrPipe', () => {
+  it('create an instance', () => {
+const pipe = new TimeZoneAbbrPipe();
+expect(pipe).toBeTruthy();
+  });
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/pipes/timezone-abbr.pipe.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/pipes/timezone-abbr.pipe.ts 
b/ambari-logsearch/ambari-logsearch-web/src/app/pipes/timezone-abbr.pipe.ts
new file mode 100644
index 000..f4aab0b
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/pipes/timezone-abbr.pipe.ts
@@ -0,0 +1,31 @@
+/**
+ * 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.
+ */
+
+import {Pipe, PipeTransform} from '@angular/core';
+import * as moment from 'moment-timezone';
+
+@Pipe({
+  name: 'timeZoneAbbr'
+})
+export class TimeZoneAbbrPipe implements PipeTransform {
+
+  transform(value: string): string {
+return moment.tz.zone(value).abbr(moment().valueOf());
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.spec.ts
new file mode 100644
index 000..ff0ee37
--- /dev/null
+++ 
b/ambari-logsearch/ambari-logsearch-web/src/app/services/component-actions.service.spec.ts
@@ -0,0 +1,43 @@
+/**
+ * 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.
+ */
+
+import {TestBed, inject} from '@angular/core/testing';
+import {StoreModule} from '@ngrx/store';
+import {AppSettingsService, appSettings} from 
'@app/services/storage/app-settings.service';
+
+import {ComponentActionsService} from './component-actions.service';
+
+describe('ComponentActionsService', () => {
+  beforeEach(() => {
+

[39/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/.angular-cli.json
--
diff --git a/ambari-logsearch/ambari-logsearch-web/.angular-cli.json 
b/ambari-logsearch/ambari-logsearch-web/.angular-cli.json
new file mode 100644
index 000..cc74739
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/.angular-cli.json
@@ -0,0 +1,64 @@
+{
+  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+  "project": {
+"name": "ambari-logsearch-web-new"
+  },
+  "apps": [
+{
+  "root": "src",
+  "outDir": "dist",
+  "assets": [
+"assets",
+"favicon.ico"
+  ],
+  "index": "index.html",
+  "main": "main.ts",
+  "polyfills": "polyfills.ts",
+  "test": "test.ts",
+  "tsconfig": "tsconfig.app.json",
+  "testTsconfig": "tsconfig.spec.json",
+  "prefix": "app",
+  "styles": [
+"styles.less",
+"../node_modules/bootstrap/dist/css/bootstrap.min.css",
+"../node_modules/font-awesome/css/font-awesome.min.css",
+"../src/vendor/css/bootstrap-logsearch.min.css"
+  ],
+  "scripts": [
+"../node_modules/jquery/dist/jquery.min.js",
+"../node_modules/bootstrap/dist/js/bootstrap.min.js",
+"../src/vendor/js/bootstrap-logsearch.min.js"
+  ],
+  "environmentSource": "environments/environment.ts",
+  "environments": {
+"dev": "environments/environment.ts",
+"prod": "environments/environment.prod.ts"
+  }
+}
+  ],
+  "e2e": {
+"protractor": {
+  "config": "./protractor.conf.js"
+}
+  },
+  "lint": [
+{
+  "project": "src/tsconfig.app.json"
+},
+{
+  "project": "src/tsconfig.spec.json"
+},
+{
+  "project": "e2e/tsconfig.e2e.json"
+}
+  ],
+  "test": {
+"karma": {
+  "config": "./karma.conf.js"
+}
+  },
+  "defaults": {
+"styleExt": "less",
+"component": {}
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/.bowerrc
--
diff --git a/ambari-logsearch/ambari-logsearch-web/.bowerrc 
b/ambari-logsearch/ambari-logsearch-web/.bowerrc
deleted file mode 100644
index 1a4d0c7..000
--- a/ambari-logsearch/ambari-logsearch-web/.bowerrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "directory": "libs"
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/.editorconfig
--
diff --git a/ambari-logsearch/ambari-logsearch-web/.editorconfig 
b/ambari-logsearch/ambari-logsearch-web/.editorconfig
new file mode 100644
index 000..6e87a00
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web/.editorconfig
@@ -0,0 +1,13 @@
+# Editor configuration, see http://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.md]
+max_line_length = off
+trim_trailing_whitespace = false

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/.gitignore
--
diff --git a/ambari-logsearch/ambari-logsearch-web/.gitignore 
b/ambari-logsearch/ambari-logsearch-web/.gitignore
index ae3c172..54bfd20 100644
--- a/ambari-logsearch/ambari-logsearch-web/.gitignore
+++ b/ambari-logsearch/ambari-logsearch-web/.gitignore
@@ -1 +1,42 @@
-/bin/
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# compiled output
+/dist
+/tmp
+/out-tsc
+
+# dependencies
+/node_modules
+
+# IDEs and editors
+/.idea
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# IDE - VSCode
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+
+# misc
+/.sass-cache
+/connect.lock
+/coverage
+/libpeerconnection.log
+npm-debug.log
+testem.log
+/typings
+
+# e2e
+/e2e/*.js
+/e2e/*.map
+
+# System Files
+.DS_Store
+Thumbs.db

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/Gruntfile.js
--
diff --git a/ambari-logsearch/ambari-logsearch-web/Gruntfile.js 
b/ambari-logsearch/ambari-logsearch-web/Gruntfile.js
deleted file mode 100644
index aaad310..000
--- a/ambari-logsearch/ambari-logsearch-web/Gruntfile.js
+++ /dev/null
@@ -1,139 +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 

[30/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.svg
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.svg
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.svg
deleted file mode 100644
index 8e63114..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/font-awesome/fonts/fontawesome-webfont.svg
+++ /dev/null
@@ -1,415 +0,0 @@
-
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd; >
-http://www.w3.org/2000/svg;>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

[49/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/app/components/filter-text-field/filter-text-field.component.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/components/filter-text-field/filter-text-field.component.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web-new/src/app/components/filter-text-field/filter-text-field.component.spec.ts
deleted file mode 100644
index 71039ed..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/components/filter-text-field/filter-text-field.component.spec.ts
+++ /dev/null
@@ -1,82 +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.
- */
-
-import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
-import {async, ComponentFixture, TestBed} from '@angular/core/testing';
-import {Http} from '@angular/http';
-import {FormsModule} from '@angular/forms';
-import {TranslateModule, TranslateLoader} from '@ngx-translate/core';
-import {TranslateHttpLoader} from '@ngx-translate/http-loader';
-import {StoreModule} from '@ngrx/store';
-import {AppSettingsService, appSettings} from 
'@app/services/storage/app-settings.service';
-import {FilteringService} from '@app/services/filtering.service';
-import {UtilsService} from '@app/services/utils.service';
-import {ComponentActionsService} from 
'@app/services/component-actions.service';
-
-import {FilterTextFieldComponent} from './filter-text-field.component';
-
-export function HttpLoaderFactory(http: Http) {
-  return new TranslateHttpLoader(http, 'assets/i18n/', '.json');
-}
-
-describe('FilterTextFieldComponent', () => {
-  let component: FilterTextFieldComponent;
-  let fixture: ComponentFixture;
-  const filtering = {
-filters: {
-  f: {}
-}
-  };
-
-  beforeEach(async(() => {
-TestBed.configureTestingModule({
-  declarations: [FilterTextFieldComponent],
-  imports: [
-FormsModule,
-TranslateModule.forRoot({
-  provide: TranslateLoader,
-  useFactory: HttpLoaderFactory,
-  deps: [Http]
-}),
-StoreModule.provideStore({
-  appSettings
-})
-  ],
-  providers: [
-AppSettingsService,
-{
-  provide: FilteringService,
-  useValue: filtering
-},
-UtilsService,
-ComponentActionsService
-  ],
-  schemas: [CUSTOM_ELEMENTS_SCHEMA]
-})
-.compileComponents();
-  }));
-
-  beforeEach(() => {
-fixture = TestBed.createComponent(FilterTextFieldComponent);
-component = fixture.componentInstance;
-fixture.detectChanges();
-  });
-
-  it('should create component', () => {
-expect(component).toBeTruthy();
-  });
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/app/components/filter-text-field/filter-text-field.component.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/components/filter-text-field/filter-text-field.component.ts
 
b/ambari-logsearch/ambari-logsearch-web-new/src/app/components/filter-text-field/filter-text-field.component.ts
deleted file mode 100644
index 2b6bfea..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/components/filter-text-field/filter-text-field.component.ts
+++ /dev/null
@@ -1,87 +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
- * 

[43/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/fonts/Roboto-Regular-webfont.ttf
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/fonts/Roboto-Regular-webfont.ttf
 
b/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/fonts/Roboto-Regular-webfont.ttf
deleted file mode 100644
index 305f0d5..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/fonts/Roboto-Regular-webfont.ttf
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/fonts/Roboto-Regular-webfont.woff
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/fonts/Roboto-Regular-webfont.woff
 
b/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/fonts/Roboto-Regular-webfont.woff
deleted file mode 100644
index ac7452a..000
Binary files 
a/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/fonts/Roboto-Regular-webfont.woff
 and /dev/null differ



[47/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/app/models/app-settings.model.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/models/app-settings.model.ts
 
b/ambari-logsearch/ambari-logsearch-web-new/src/app/models/app-settings.model.ts
deleted file mode 100644
index 11821a3..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/models/app-settings.model.ts
+++ /dev/null
@@ -1,27 +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.
- */
-
-import * as moment from 'moment-timezone';
-
-export interface AppSettings {
-  timeZone: string;
-}
-
-export const defaultSettings: AppSettings = {
-  timeZone: moment.tz.guess()
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/app/models/app-state.model.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/models/app-state.model.ts 
b/ambari-logsearch/ambari-logsearch-web-new/src/app/models/app-state.model.ts
deleted file mode 100644
index 2995002..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/models/app-state.model.ts
+++ /dev/null
@@ -1,33 +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.
- */
-
-export interface AppState {
-  isAuthorized: boolean;
-  isInitialLoading: boolean;
-  isLoginInProgress: boolean;
-  isAuditLogsSet: boolean;
-  isServiceLogsSet: boolean;
-}
-
-export const initialState: AppState = {
-  isAuthorized: false,
-  isInitialLoading: false,
-  isLoginInProgress: false,
-  isAuditLogsSet: false,
-  isServiceLogsSet: false
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/app/models/audit-log-field.model.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/models/audit-log-field.model.ts
 
b/ambari-logsearch/ambari-logsearch-web-new/src/app/models/audit-log-field.model.ts
deleted file mode 100644
index 96372a1..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/models/audit-log-field.model.ts
+++ /dev/null
@@ -1,225 +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.
- */
-
-import {LogField} from '@app/models/log-field.model';
-
-const columnsNamesMap = {
-  access: {
-displayName: 'logs.accessType',
-isDisplayed: true
-  },
-  action: {
-displayName: 'logs.action'
-  },
-  agent: {
-displayName: 'logs.agent'
-  },
-  agentHost: {
-displayName: 'logs.agentHost'
-  },
-  

[13/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/models/VGraphInfo.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/models/VGraphInfo.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/models/VGraphInfo.js
deleted file mode 100644
index 272e557..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/models/VGraphInfo.js
+++ /dev/null
@@ -1,53 +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',
-   'model_bases/VGraphInfoBase',
-   'utils/Enums'
-],function(require,VGraphInfoBase,Enums){
-   'use strict';   
-
-   var VGraphInfo = VGraphInfoBase.extend(
-   /** @lends VLog.prototype */
-   {
-   /**
-* VLogBase initialize method
-* @augments FSBaseModel
-* @constructs
-*/
-   initialize: function() {
-   this.modelName = 'VGraphInfo';
-   this.bindErrorEvents();
-   },
-
-   /** This models toString() */
-   toString : function(){
-   return this.get('name');
-   }
-
-   }, {
-   // static class members
-   });
-
-return VGraphInfo;
-   
-});
-
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/models/VGroup.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/models/VGroup.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/models/VGroup.js
deleted file mode 100644
index ffcb273..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/models/VGroup.js
+++ /dev/null
@@ -1,53 +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',
-   'model_bases/VGroupBase',
-   'utils/Enums'
-],function(require,VGroupBase,Enums){
-   'use strict';   
-
-   var VGroup = VGroupBase.extend(
-   /** @lends VGroup.prototype */
-   {
-   /**
-* VGroupBase initialize method
-* @augments BaseModel
-* @constructs
-*/
-   initialize: function() {
-   this.modelName = 'VGroup';
-   this.bindErrorEvents();
-   },
-
-   /** This models toString() */
-   toString : function(){
-   return this.get('message');
-   }
-
-   }, {
-   // static class members
-   });
-
-return VGroup;
-   
-});
-
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/models/VLog.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/models/VLog.js 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/models/VLog.js
deleted file mode 100644
index c929c3b..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/models/VLog.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache 

[45/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/bootstrap-logsearch.min.css
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/bootstrap-logsearch.min.css
 
b/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/bootstrap-logsearch.min.css
deleted file mode 100644
index 177d7df..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/vendor/css/bootstrap-logsearch.min.css
+++ /dev/null
@@ -1,18 +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.
- */
-.btn-group.open .dropdown-menu,.dropdown.open 
.dropdown-menu,.font-mixin{font-family:Roboto,sans-serif;font-style:normal;font-weight:400}.pagination-block
 .pagination-block-item a,.pagination-block .pagination-block-item 
a:focus,.pagination-block .pagination-block-item a:visited,.table.table-hover 
.action:hover,a,a:focus,a:visited{text-decoration:none}@font-face{font-family:Roboto;font-weight:400;font-style:normal;src:url(fonts/Roboto-Regular-webfont.eot);src:url(fonts/Roboto-Regular-webfont.eot?#iefix)
 format('embedded-opentype'),url(fonts/Roboto-Regular-webfont.woff) 
format('woff'),url(fonts/Roboto-Regular-webfont.ttf) 
format('truetype'),url(fonts/Roboto-Regular-webfont.svg#robotoregular) 
format('svg')}  .font-mixin{line-height:1;color:#333}  
.btn,.btn:focus{outline:0;font-family:Roboto,sans-serif;text-transform:uppercase;height:34px;font-size:14px;padding:10px
 20px;line-height:14px}  .btn .glyphicon,.btn:focus 
.glyphicon{top:-1px;float:left}  .box-shadow{box-shadow:0 0 2px 0 #139
 1c1}  .btn-default-disabled,.btn-disabled{box-shadow:none;opacity:.6}  
.btn-default-disabled{color:#FFF;background-color:#808793;border:none}  
.btn-default,.btn-default:focus{color:#666;background-color:#FFF;border:1px 
solid #CFD3D7}  
.btn-default:focus:hover,.btn-default:hover{color:#FFF;background-color:#808793}
  
.btn-default:active,.btn-default:focus:active{color:#666;background-color:#FFF;border:1px
 solid #CFD3D7;box-shadow:0 0 2px 0 #1391c1}  
.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled:active,.btn-default.disabled:hover,.btn-default:focus.disabled,.btn-default:focus.disabled.active,.btn-default:focus.disabled:active,.btn-default:focus.disabled:hover,.btn-default:focus[disabled],.btn-default:focus[disabled].active,.btn-default:focus[disabled]:active,.btn-default:focus[disabled]:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled]:active,.btn-default[disabled]:hover{opacity:.6;box-shadow:none;color:#FFF;background-color:#8
 08793;border:none}  
.btn-primary-disabled{opacity:.6;box-shadow:none;color:#D1E8D1;background-color:#3FAE2A;border:1px
 solid #3FAE2A}  
.btn-primary,.btn-primary:focus{color:#FFF;background-color:#3FAE2A;border:1px 
solid #3FAE2A}  
.btn-primary:focus:hover,.btn-primary:hover{color:#FFF;background-color:#429929;border:1px
 solid #429929}  
.btn-primary.active,.btn-primary:active,.btn-primary:focus.active,.btn-primary:focus:active{color:#FFF;background-color:#3FAE2A;border:1px
 solid #3FAE2A;box-shadow:0 0 2px 0 #1391c1}  
.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled:active,.btn-primary.disabled:hover,.btn-primary:focus.disabled,.btn-primary:focus.disabled.active,.btn-primary:focus.disabled:active,.btn-primary:focus.disabled:hover,.btn-primary:focus[disabled],.btn-primary:focus[disabled].active,.btn-primary:focus[disabled]:active,.btn-primary:focus[disabled]:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled]:active,.btn-primary[disa
 
bled]:hover{opacity:.6;box-shadow:none;color:#D1E8D1;background-color:#3FAE2A;border:1px
 solid #3FAE2A}  
.btn-secondary-disabled{opacity:.6;box-shadow:none;color:#D1E8D1;background-color:#429929;border:1px
 solid #3FAE2A}  
.btn-secondary,.btn-secondary:focus{color:#429929;background-color:#FFF;border:1px
 solid #3FAE2A}  
.btn-secondary:focus:hover,.btn-secondary:hover{color:#FFF;background-color:#429929}
  
.btn-secondary:active,.btn-secondary:focus:active{color:#429929;background-color:#FFF;box-shadow:0
 0 2px 0 #1391c1}  

[48/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/app/components/node-bar/node-bar.component.spec.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/components/node-bar/node-bar.component.spec.ts
 
b/ambari-logsearch/ambari-logsearch-web-new/src/app/components/node-bar/node-bar.component.spec.ts
deleted file mode 100644
index d47436e..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/components/node-bar/node-bar.component.spec.ts
+++ /dev/null
@@ -1,43 +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.
- */
-
-import {async, ComponentFixture, TestBed} from '@angular/core/testing';
-
-import {NodeBarComponent} from './node-bar.component';
-
-describe('NodeBarComponent', () => {
-  let component: NodeBarComponent;
-  let fixture: ComponentFixture;
-
-  beforeEach(async(() => {
-TestBed.configureTestingModule({
-  declarations: [NodeBarComponent]
-})
-  .compileComponents();
-  }));
-
-  beforeEach(() => {
-fixture = TestBed.createComponent(NodeBarComponent);
-component = fixture.componentInstance;
-fixture.detectChanges();
-  });
-
-  it('should create component', () => {
-expect(component).toBeTruthy();
-  });
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/app/components/node-bar/node-bar.component.ts
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/components/node-bar/node-bar.component.ts
 
b/ambari-logsearch/ambari-logsearch-web-new/src/app/components/node-bar/node-bar.component.ts
deleted file mode 100644
index c7b3ead..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/components/node-bar/node-bar.component.ts
+++ /dev/null
@@ -1,35 +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.
- */
-
-import {Component, Input} from '@angular/core';
-
-@Component({
-  selector: 'node-bar',
-  templateUrl: './node-bar.component.html',
-  styleUrls: ['./node-bar.component.less']
-})
-export class NodeBarComponent {
-
-  @Input()
-  data: any[] = [];
-
-  get totalCount(): number {
-return this.data.reduce((currentValue, currentItem) => currentValue + 
Number(currentItem.value), 0);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/app/components/pagination-controls/pagination-controls.component.html
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/components/pagination-controls/pagination-controls.component.html
 
b/ambari-logsearch/ambari-logsearch-web-new/src/app/components/pagination-controls/pagination-controls.component.html
deleted file mode 100644
index c227a2b..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/app/components/pagination-controls/pagination-controls.component.html
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-  
-
-
-  
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/app/components/pagination-controls/pagination-controls.component.less
--
diff --git 

[25/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/js/jquery-ui-1.11.4.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/js/jquery-ui-1.11.4.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/js/jquery-ui-1.11.4.js
deleted file mode 100644
index a1fc7e7..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/js/jquery-ui-1.11.4.js
+++ /dev/null
@@ -1,8772 +0,0 @@
-/*! jQuery UI - v1.11.4 - 2015-10-14
-* http://jqueryui.com
-* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, 
droppable.js, resizable.js, selectable.js, sortable.js, autocomplete.js, 
button.js, dialog.js, menu.js, spinner.js
-* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
-
-(function( factory ) {
-   if ( typeof define === "function" && define.amd ) {
-
-   // AMD. Register as an anonymous module.
-   define([ "jquery" ], factory );
-   } else {
-
-   // Browser globals
-   factory( jQuery );
-   }
-}(function( $ ) {
-/*!
- * jQuery UI Core 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/category/ui-core/
- */
-
-
-// $.ui might exist from components with no dependencies, e.g., $.ui.position
-$.ui = $.ui || {};
-
-$.extend( $.ui, {
-   version: "1.11.4",
-
-   keyCode: {
-   BACKSPACE: 8,
-   COMMA: 188,
-   DELETE: 46,
-   DOWN: 40,
-   END: 35,
-   ENTER: 13,
-   ESCAPE: 27,
-   HOME: 36,
-   LEFT: 37,
-   PAGE_DOWN: 34,
-   PAGE_UP: 33,
-   PERIOD: 190,
-   RIGHT: 39,
-   SPACE: 32,
-   TAB: 9,
-   UP: 38
-   }
-});
-
-// plugins
-$.fn.extend({
-   scrollParent: function( includeHidden ) {
-   var position = this.css( "position" ),
-   excludeStaticParent = position === "absolute",
-   overflowRegex = includeHidden ? /(auto|scroll|hidden)/ 
: /(auto|scroll)/,
-   scrollParent = this.parents().filter( function() {
-   var parent = $( this );
-   if ( excludeStaticParent && parent.css( 
"position" ) === "static" ) {
-   return false;
-   }
-   return overflowRegex.test( parent.css( 
"overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
-   }).eq( 0 );
-
-   return position === "fixed" || !scrollParent.length ? $( this[ 
0 ].ownerDocument || document ) : scrollParent;
-   },
-
-   uniqueId: (function() {
-   var uuid = 0;
-
-   return function() {
-   return this.each(function() {
-   if ( !this.id ) {
-   this.id = "ui-id-" + ( ++uuid );
-   }
-   });
-   };
-   })(),
-
-   removeUniqueId: function() {
-   return this.each(function() {
-   if ( /^ui-id-\d+$/.test( this.id ) ) {
-   $( this ).removeAttr( "id" );
-   }
-   });
-   }
-});
-
-// selectors
-function focusable( element, isTabIndexNotNaN ) {
-   var map, mapName, img,
-   nodeName = element.nodeName.toLowerCase();
-   if ( "area" === nodeName ) {
-   map = element.parentNode;
-   mapName = map.name;
-   if ( !element.href || !mapName || map.nodeName.toLowerCase() 
!== "map" ) {
-   return false;
-   }
-   img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
-   return !!img && visible( img );
-   }
-   return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ?
-   !element.disabled :
-   "a" === nodeName ?
-   element.href || isTabIndexNotNaN :
-   isTabIndexNotNaN) &&
-   // the element and all of its ancestors must be visible
-   visible( element );
-}
-
-function visible( element ) {
-   return $.expr.filters.visible( element ) &&
-   !$( element ).parents().addBack().filter(function() {
-   return $.css( this, "visibility" ) === "hidden";
-   }).length;
-}
-
-$.extend( $.expr[ ":" ], {
-   data: $.expr.createPseudo ?
-   $.expr.createPseudo(function( 

[20/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/sparkline/jquery.sparkline.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/sparkline/jquery.sparkline.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/sparkline/jquery.sparkline.js
deleted file mode 100644
index 43b24c0..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/sparkline/jquery.sparkline.js
+++ /dev/null
@@ -1,3054 +0,0 @@
-/**
-*
-* jquery.sparkline.js
-*
-* v2.1.2
-* (c) Splunk, Inc
-* Contact: Gareth Watts (gar...@splunk.com)
-* http://omnipotent.net/jquery.sparkline/
-*
-* Generates inline sparkline charts from data supplied either to the method
-* or inline in HTML
-*
-* Compatible with Internet Explorer 6.0+ and modern browsers equipped with the 
canvas tag
-* (Firefox 2.0+, Safari, Opera, etc)
-*
-* License: New BSD License
-*
-* Copyright (c) 2012, Splunk Inc.
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without 
modification,
-* are permitted provided that the following conditions are met:
-*
-* * Redistributions of source code must retain the above copyright notice,
-*   this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright 
notice,
-*   this list of conditions and the following disclaimer in the 
documentation
-*   and/or other materials provided with the distribution.
-* * Neither the name of Splunk Inc nor the names of its contributors may
-*   be used to endorse or promote products derived from this software 
without
-*   specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES
-* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 
NO EVENT
-* SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
INDIRECT, INCIDENTAL,
-* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
PROCUREMENT
-* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
INTERRUPTION)
-* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY,
-* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*
-* Usage:
-*  $(selector).sparkline(values, options)
-*
-* If values is undefined or set to 'html' then the data values are read from 
the specified tag:
-*   Sparkline: 1,4,6,6,8,5,3,5
-*   $('.sparkline').sparkline();
-* There must be no spaces in the enclosed data set
-*
-* Otherwise values must be an array of numbers or null values
-*Sparkline: This text replaced if the browser is 
compatible
-*$('#sparkline1').sparkline([1,4,6,6,8,5,3,5])
-*$('#sparkline2').sparkline([1,4,6,null,null,5,3,5])
-*
-* Values can also be specified in an HTML comment, or as a values attribute:
-*Sparkline: 
-*Sparkline: 
-*$('.sparkline').sparkline();
-*
-* For line charts, x values can also be specified:
-*   Sparkline: 1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5
-*$('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], 
[8.7,5], [9,3], [10,5] ])
-*
-* By default, options should be passed in as teh second argument to the 
sparkline function:
-*   $('.sparkline').sparkline([1,2,3,4], {type: 'bar'})
-*
-* Options can also be set by passing them on the tag itself.  This feature is 
disabled by default though
-* as there's a slight performance overhead:
-*   $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true})
-*   Sparkline: loading
-* Prefix all options supplied as tag attribute with "spark" (configurable by 
setting tagOptionPrefix)
-*
-* Supported options:
-*   lineColor - Color of the line used for the chart
-*   fillColor - Color used to fill in the chart - Set to '' or false for a 
transparent chart
-*   width - Width of the chart - Defaults to 3 times the number of values in 
pixels
-*   height - Height of the chart - Defaults to the height of the containing 
element
-*   chartRangeMin - Specify the minimum value to use for the Y range of the 
chart - Defaults to the minimum value supplied
-*   chartRangeMax - Specify the maximum value to use for the Y range of the 
chart - Defaults to the maximum value supplied
-*   chartRangeClip - Clip out of range values to the max/min specified by 
chartRangeMin and chartRangeMax
-*   chartRangeMinX - Specify the minimum value to use for the X range of the 
chart - Defaults to the minimum value supplied
-*   chartRangeMaxX - Specify the maximum value to use for the X range of the 
chart - Defaults to the maximum value supplied
-*   composite - If true then 

[33/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontawesome/fontawesome-webfont.svg
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontawesome/fontawesome-webfont.svg
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontawesome/fontawesome-webfont.svg
deleted file mode 100644
index 8e63114..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/fonts/fontawesome/fontawesome-webfont.svg
+++ /dev/null
@@ -1,415 +0,0 @@
-
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd; >
-http://www.w3.org/2000/svg;>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

[24/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/js/jquery-ui-1.11.4.min.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/js/jquery-ui-1.11.4.min.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/js/jquery-ui-1.11.4.min.js
deleted file mode 100644
index 8cccfe1..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/js/jquery-ui-1.11.4.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/*! jQuery UI - v1.11.4 - 2015-10-14
-* http://jqueryui.com
-* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, 
droppable.js, resizable.js, selectable.js, sortable.js, autocomplete.js, 
button.js, dialog.js, menu.js, spinner.js
-* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
-
-(function(e){"function"==typeof 
define&?define(["jquery"],e):e(jQuery)})(function(e){function 
t(t,s){var 
n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&(t)}function
 i(t){return 
e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function
 s(e){return function(){var 
t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&_trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var
 
i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this
 .parents().filter(function(){var t=e(this);return 
s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&?a:e(this[0].ownerDocument||document)},uniqueId:function(){var
 e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ 
++e)})}}(),removeUniqueId:function(){return 
this.each(function(){/^ui-id-\d+$/.test(this.id)&(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return
 
function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return
 t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var 
s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&(i,!n)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function
 s(t,i,s,a){return 
e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.
 css(t,"margin"+this))||0)}),i}var 
n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return
 void 
0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof
 
t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return
 
this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return
 function(i){return 
arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie
 
[\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return
 function(i,s){return"number"==typeof i?this.each(function(){var 
t=this;setTimeout(function(){e(t).focus(),s&
 
(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var 
e="onselectstart"in 
document.createElement("div")?"selectstart":"mousedown";return 
function(){return 
this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return
 this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return 
this.css("zIndex",t);if(this.length)for(var 
i,s,n=e(this[0]);n.length&[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return
 s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var 
n,a=e.ui[t].prototype;for(n in 
s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var
 
n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&[n][1].apply(e.element,i)}};var
 n=0,a=Array.prototype.slice;e.cleanData=function(t){return function
 (i){var 

[22/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/require-handlebars-plugin/Handlebars.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/require-handlebars-plugin/Handlebars.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/require-handlebars-plugin/Handlebars.js
deleted file mode 100644
index 2f5f321..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/require-handlebars-plugin/Handlebars.js
+++ /dev/null
@@ -1,2752 +0,0 @@
-// Begin AMD Wrapper
-define(function(){
-// End AMD Wrapper
-/*!
-
- handlebars v1.3.0
-
-Copyright (C) 2011 by Yehuda Katz
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-@license
-*/
-/* exported Handlebars */
-var Handlebars = (function() {
-// handlebars/safe-string.js
-var __module4__ = (function() {
-  "use strict";
-  var __exports__;
-  // Build out our basic SafeString type
-  function SafeString(string) {
-this.string = string;
-  }
-
-  SafeString.prototype.toString = function() {
-return "" + this.string;
-  };
-
-  __exports__ = SafeString;
-  return __exports__;
-})();
-
-// handlebars/utils.js
-var __module3__ = (function(__dependency1__) {
-  "use strict";
-  var __exports__ = {};
-  /*jshint -W004 */
-  var SafeString = __dependency1__;
-
-  var escape = {
-"&": "",
-"<": "",
-">": "",
-'"': "",
-"'": "",
-"`": ""
-  };
-
-  var badChars = /[&<>"'`]/g;
-  var possible = /[&<>"'`]/;
-
-  function escapeChar(chr) {
-return escape[chr] || "";
-  }
-
-  function extend(obj, value) {
-for(var key in value) {
-  if(Object.prototype.hasOwnProperty.call(value, key)) {
-obj[key] = value[key];
-  }
-}
-  }
-
-  __exports__.extend = extend;var toString = Object.prototype.toString;
-  __exports__.toString = toString;
-  // Sourced from lodash
-  // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
-  var isFunction = function(value) {
-return typeof value === 'function';
-  };
-  // fallback for older versions of Chrome and Safari
-  if (isFunction(/x/)) {
-isFunction = function(value) {
-  return typeof value === 'function' && toString.call(value) === '[object 
Function]';
-};
-  }
-  var isFunction;
-  __exports__.isFunction = isFunction;
-  var isArray = Array.isArray || function(value) {
-return (value && typeof value === 'object') ? toString.call(value) === 
'[object Array]' : false;
-  };
-  __exports__.isArray = isArray;
-
-  function escapeExpression(string) {
-// don't escape SafeStrings, since they're already safe
-if (string instanceof SafeString) {
-  return string.toString();
-} else if (!string && string !== 0) {
-  return "";
-}
-
-// Force a string conversion as this will be done by the append regardless 
and
-// the regex test will do this transparently behind the scenes, causing 
issues if
-// an object's to string has escaped characters in it.
-string = "" + string;
-
-if(!possible.test(string)) { return string; }
-return string.replace(badChars, escapeChar);
-  }
-
-  __exports__.escapeExpression = escapeExpression;function isEmpty(value) {
-if (!value && value !== 0) {
-  return true;
-} else if (isArray(value) && value.length === 0) {
-  return true;
-} else {
-  return false;
-}
-  }
-
-  __exports__.isEmpty = isEmpty;
-  return __exports__;
-})(__module4__);
-
-// handlebars/exception.js
-var __module5__ = (function() {
-  "use strict";
-  var __exports__;
-
-  var errorProps = ['description', 'fileName', 'lineNumber', 'message', 
'name', 'number', 'stack'];
-
-  function Exception(message, node) {
-var line;
-if (node && node.firstLine) {
-  line = node.firstLine;
-
-  message += ' - ' + line + ':' + node.firstColumn;
-}
-
-var tmp = 

[41/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web-new/src/vendor/js/bootstrap-logsearch.min.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web-new/src/vendor/js/bootstrap-logsearch.min.js
 
b/ambari-logsearch/ambari-logsearch-web-new/src/vendor/js/bootstrap-logsearch.min.js
deleted file mode 100644
index a1b68d2..000
--- 
a/ambari-logsearch/ambari-logsearch-web-new/src/vendor/js/bootstrap-logsearch.min.js
+++ /dev/null
@@ -1,19 +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.
- */
-"use strict";$(document).ready(function(){var 
n=$(this).find('[data-toggle="collapseAccordion"]');n.off("click").on("click",function(n){var
 l=$(this);return 
l.siblings(".panel-body").slideToggle(500),l.children().children(".panel-toggle").toggleClass("fa-angle-down
 fa-angle-up"),n.stopPropagation(),!1})});
-"use strict";!function(e){e.fn.navigationBar=function(n){var 
t=e.extend({},e.fn.navigationBar.defaults,n);return 
this.each(function(){function n(){var 
n=window.location.pathname+window.location.hash;o.find("li 
a").each(function(t,a){var 
i=e(a),s=i.attr("data-href")||i.attr("href");n.indexOf(s)!==-1&&["","#"].indexOf(s)===-1?i.parent().addClass("active"):i.parent().removeClass("active")})}function
 a(n){var 
a=e(n).parent(),i=t.activeClass,s=f+"."+i,l=c+"."+i;o.find(s).removeClass(i),o.find(l).removeClass(i),a.addClass(i)}var
 
i=this,s=".navigation-bar-container",o=e(this).find(s),l=e(this).find("[data-toggle="+t.navBarToggleDataAttr+"]"),r=e(this).find("[data-toggle="+t.subMenuNavToggleDataAttr+"]"),f=".side-nav-menu>li",c=".side-nav-menu>li>ul>li",d=e(this).find(".more-actions"),u=d.children(".dropdown-menu");r.each(function(n,t){return
 
e(t).parent().addClass("has-sub-menu")}),t.fitHeight&&(e(this).addClass("navigation-bar-fit-height"),e(this).find(".side-nav-menu").on("DOMMouseScroll
  mousewheel",function(n){var 
t=e(this),a=this.scrollTop,i=this.scrollHeight,s=t.innerHeight(),o=n.originalEvent.wheelDelta,l=o>0,r=function(){return
 
n.stopPropagation(),n.preventDefault(),n.returnValue=!1,!1};return!l&&-o>i-s-a?(t.scrollTop(i),r()):l&>a?(t.scrollTop(0),r()):void
 0}));var 
h=o.width();t.moveLeftContent&(t.content).css("margin-left",h),t.moveLeftFooter&(t.footer).css("margin-left",h),t.handlePopState&&(n(),e(window).bind("popstate",n)),e(f+">a").on("click",function(){a(this)}),e(c+">a").on("click",function(){a(this),e(this).parent().parent().parent().addClass(t.activeClass)}),r.off("click").on("click",function(n){if(o.hasClass("collapsed"))return!1;var
 a=e(this);return a.siblings(".sub-menu").slideToggle(600,function(){var 
e=a.parent(),n=e.find("ul");return 
n.is(":visible")?e.removeClass("collapsed"):e.addClass("collapsed")}),a.children(".toggle-icon").toggleClass(t.menuLeftClass+"
 
"+t.menuDownClass),n.stopPropagation(),!1}),e(this).find(".mainmenu-li>a").hover(f
 unction(){var 
n=e(this).siblings(".more-actions");n.length&&!o.hasClass("collapsed")&("display","inline-block")},function(){var
 
n=e(this).siblings(".more-actions");n.length&&!o.hasClass("collapsed")&()}),d.hover(function(){e(this).css("display","inline-block")}),t.fitHeight&("click",function(){var
 
n=e(this),t=e(".side-nav-header");u.css({top:n.offset().top-t.offset().top+20+"px",left:n.offset().left+"px"})}),u.on("click",function(){var
 
n=e(this).parent();setTimeout(function(){n.hide()},1e3)}),o.children(".side-nav-menu").scroll(function(){d.removeClass("open")}),l.click(function(){return
 o.toggleClass("collapsed").promise().done(function(){var 
n="ul.sub-menu",a=o.find(n),s=o.find(".side-nav-menu>li");o.hasClass("collapsed")?(a.hide(),d.hide(),s.hover(function(){e(this).find(n).show();var
 
a=e(this),i=e(".side-nav-header");t.fitHeight&(this).find(n).css({position:"fixed",top:a.offset().top-i.offset().top+"px",left:"50px"})},function(){e(this).find(n).hide()})):(a.s
 how().each(function(n,t){return 
e(t).parent().removeClass("collapsed")}),s.unbind("mouseenter 
mouseleave"),o.find(".toggle-icon").removeClass(t.menuLeftClass).addClass(t.menuDownClass),t.fitHeight&(i).find(n).css({position:"relative",top:0,left:0})),o.on("transitionend",function(){var
 

[15/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/visualsearch/visualsearch.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/visualsearch/visualsearch.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/visualsearch/visualsearch.js
deleted file mode 100644
index c8fe317..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/visualsearch/visualsearch.js
+++ /dev/null
@@ -1,1984 +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.
- */
-
-
-// This is the annotated source code for
-// [VisualSearch.js](http://documentcloud.github.com/visualsearch/),
-// a rich search box for real data.
-// 
-// The annotated source HTML is generated by
-// [Docco](http://jashkenas.github.com/docco/).
-
-/** @license VisualSearch.js 0.4.0
- *  (c) 2011 Samuel Clay, @samuelclay, DocumentCloud Inc.
- *  VisualSearch.js may be freely distributed under the MIT license.
- *  For all details and documentation:
- *  http://documentcloud.github.com/visualsearch
- */
-
-(function() {
-
-  var $ = jQuery; // Handle namespaced jQuery
-
-  // Setting up VisualSearch globals. These will eventually be made 
instance-based.
-  if (!window.VS) window.VS = {};
-  if (!VS.app)VS.app= {};
-  if (!VS.ui) VS.ui = {};
-  if (!VS.model)  VS.model  = {};
-  if (!VS.utils)  VS.utils  = {};
-
-  // Sets the version for VisualSearch to be used programatically elsewhere.
-  VS.VERSION = '0.5.0';
-
-  VS.VisualSearch = function(options) {
-var defaults = {
-  container   : '',
-  query   : '',
-  autosearch  : true,
-  unquotable  : [],
-  remainder   : 'text',
-  showFacets  : true,
-  readOnly: false,
-  callbacks   : {
-search  : $.noop,
-focus   : $.noop,
-blur: $.noop,
-facetMatches: $.noop,
-valueMatches: $.noop,
-clearSearch : $.noop,
-removedFacet: $.noop
-  }
-};
-this.options   = _.extend({}, defaults, options);
-this.options.callbacks = _.extend({}, defaults.callbacks, 
options.callbacks);
-
-VS.app.hotkeys.initialize();
-this.searchQuery   = new VS.model.SearchQuery();
-this.searchBox = new VS.ui.SearchBox({
-app: this, 
-showFacets: this.options.showFacets
-});
-
-if (options.container) {
-  var searchBox = this.searchBox.render().el;
-  $(this.options.container).html(searchBox);
-}
-this.searchBox.value(this.options.query || '');
-
-// Disable page caching for browsers that incorrectly cache the visual 
search inputs.
-// This forces the browser to re-render the page when it is retrieved in 
its history.
-$(window).bind('unload', function(e) {});
-
-// Gives the user back a reference to the `searchBox` so they
-// can use public methods.
-return this;
-  };
-
-  // Entry-point used to tie all parts of VisualSearch together. It will 
either attach
-  // itself to `options.container`, or pass back the `searchBox` so it can be 
rendered
-  // at will.
-  VS.init = function(options) {
-return new VS.VisualSearch(options);
-  };
-
-})();
-
-(function() {
-
-var $ = jQuery; // Handle namespaced jQuery
-
-// The search box is responsible for managing the many facet views and input 
views.
-VS.ui.SearchBox = Backbone.View.extend({
-
-  id  : 'search',
-
-  events : {
-'click .VS-cancel-search-box' : 'clearSearch',
-'mousedown .VS-search-box': 'maybeFocusSearch',
-'dblclick .VS-search-box' : 'highlightSearch',
-'click .VS-search-box': 'maybeTripleClick'
-  },
-
-  // Creating a new SearchBox registers handlers for re-rendering facets when 
necessary,
-  // as well as handling typing when a facet is selected.
-  initialize : function(options) {
-this.options = _.extend({}, this.options, options);
-
-this.app = this.options.app;
-this.flags = {
-  allSelected : false
-};
-this.facetViews = [];
-this.inputViews = [];
-_.bindAll(this, 

[26/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/css/jquery-ui-bootstrap.css
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/css/jquery-ui-bootstrap.css
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/css/jquery-ui-bootstrap.css
deleted file mode 100644
index 05c35ba..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/bower/jquery-ui/css/jquery-ui-bootstrap.css
+++ /dev/null
@@ -1,2549 +0,0 @@
-/*!
- * jQuery UI Bootstrap (1.0 alpha)
- * http://addyosmani.github.io/jquery-ui-bootstrap/
- *
- * Copyright 2012 - 2013, Addy Osmani
- * Dual licensed under the MIT or GPL Version 2 licenses.
- *
- * Portions copyright jQuery UI & Twitter Bootstrap
- */
-
-/** VJ - Move to Less - Start */
-
-/* Layout helpers
---*/
-.ui-helper-hidden {
-   display: none;
-}
-
-.ui-helper-hidden-accessible {
-   border: 0;
-   clip: rect(0 0 0 0);
-   height: 1px;
-   margin: -1px;
-   overflow: hidden;
-   padding: 0;
-   position: absolute;
-   width: 1px;
-}
-
-.ui-helper-reset {
-   margin: 0;
-   padding: 0;
-   border: 0;
-   outline: 0;
-   line-height: 1.3;
-   text-decoration: none;
-   font-size: 100%;
-   list-style: none;
-}
-
-.ui-helper-clearfix:before,
-.ui-helper-clearfix:after {
-   content: "";
-   display: table;
-   border-collapse: collapse;
-}
-
-.ui-helper-clearfix:after {
-   content: ".";
-   display: block;
-   height: 0;
-   clear: both;
-   visibility: hidden;
-}
-
-.ui-helper-clearfix {
-   /*display: inline-block; */
-   display: block;
-   min-height: 0; /* support: IE7 */
-}
-
-/* required comment for clearfix to work in Opera \*/
-* html .ui-helper-clearfix {
-   height:1%;
-}
-
-/* end clearfix */
-.ui-helper-zfix {
-   width: 100%;
-   height: 100%;
-   top: 0;
-   left: 0;
-   position: absolute;
-   opacity: 0;
-   filter:Alpha(Opacity=0);
-}
-.ui-front {
-   z-index: 100;
-}
-
-
-/* Interaction Cues
---*/
-.ui-state-disabled {
-   cursor: default !important;
-}
-
-
-/* Icons
---*/
-
-/* states and images */
-.ui-icon {
-   display: block;
-   text-indent: -9px;
-   overflow: hidden;
-   background-repeat: no-repeat;
-}
-
-
-/* Misc visuals
---*/
-
-/* Overlays */
-
-.ui-widget-overlay {
-   position: absolute;
-   top: 0;
-   left: 0;
-   width: 100%;
-   height: 100%;
-}
-
-
-/*
- * jQuery UI Resizable 1.10.3
- *
- * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/resizable/
- */
-
-.ui-resizable {
-   position: relative;
-}
-
-.ui-resizable-handle {
-   position: absolute;
-   font-size: 0.1px;
-   z-index: 9;
-   display: block;
-}
-
-.ui-resizable-disabled .ui-resizable-handle,
-.ui-resizable-autohide .ui-resizable-handle {
-   display: none;
-}
-
-.ui-resizable-n {
-   cursor: n-resize;
-   height: 7px;
-   width: 100%;
-   top: -5px;
-   left: 0;
-}
-
-.ui-resizable-s {
-   cursor: s-resize;
-   height: 7px;
-   width: 100%;
-   bottom: -5px;
-   left: 0;
-}
-
-.ui-resizable-e {
-   cursor: e-resize;
-   width: 7px;
-   right: -5px;
-   top: 0;
-   height: 100%;
-}
-
-.ui-resizable-w {
-   cursor: w-resize;
-   width: 7px;
-   left: -5px;
-   top: 0;
-   height: 100%;
-}
-
-.ui-resizable-se {
-   cursor: se-resize;
-   width: 12px;
-   height: 12px;
-   right: 1px;
-   bottom: 1px;
-}
-
-.ui-resizable-sw {
-   cursor: sw-resize;
-   width: 9px;
-   height: 9px;
-   left: -5px;
-   bottom: -5px;
-}
-
-.ui-resizable-nw {
-   cursor: nw-resize;
-   width: 9px;
-   height: 9px;
-   left: -5px;
-   top: -5px;
-}
-
-.ui-resizable-ne {
-   cursor: ne-resize;
-   width: 9px;
-   height: 9px;
-   right: -5px;
-   top: -5px;
-}
-
-/*
- * jQuery UI Selectable 1.10.3
- *
- * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://jqueryui.com/selectable/
- */
-
-.ui-selectable-helper {
-   position: absolute;
-   z-index: 100;
-   border: 1px dotted black;
-}
-
-
-/*
- * jQuery UI CSS Framework 1.10.3
- *
- * Copyright 2013, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * 
- *
- * To view and modify this 

[11/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/audit/AuditTabLayoutView.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/audit/AuditTabLayoutView.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/audit/AuditTabLayoutView.js
deleted file mode 100644
index 7710156..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/audit/AuditTabLayoutView.js
+++ /dev/null
@@ -1,429 +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',
-  'backbone',
-  'utils/Globals',
-  'utils/Utils',
-  'utils/ViewUtils',
-  'collections/VGroupList',
-  'collections/VAuditLogList',
-  'models/VAuditLog',
-  'hbs!tmpl/audit/AuditTabLayoutView_tmpl',
-  'moment'
-], function (require, Backbone, Globals, Utils, ViewUtils, VGroupList, 
VAuditLogList, VAuditLog, AuditTabLayoutViewTmpl, moment) {
-
-  'use strict';
-
-  return Backbone.Marionette.Layout.extend(
-{
-  _viewName: 'AuditTabLayoutView',
-
-  template: AuditTabLayoutViewTmpl,
-
-  /** Layout sub regions */
-  regions: {
-RAuditTable: "[data-id='auditTable']",
-RVisualSearch: "#r_vsSearch",
-RVisualSearchInc: "#r_vsSearchInc",
-RVisualSearchEx: "#r_vsSearchEx",
-RAuditLine: "#r_AuditLine",
-RAuditAggregated: "[data-id='auditAggregated']",
-  },
-
-  /** ui selector cache */
-  ui: {
-viewType: "input[name='viewTypeAudit']",
-excludeComponents: "#excludeComponents",
-includeComponents: "#includeComponents",
-collapseArrowClick: "a.collapse-link.chkArrow"
-  },
-
-  /** ui events hash */
-  events: function () {
-var events = {};
-events['click [data-id="refresh-tab-audit"]'] = 'onAuditTabRefresh';
-events['change ' + this.ui.viewType] = 'onViewTypeChange';
-events['click ' + this.ui.collapseArrowClick] = function (e) {
-  if ($(e.currentTarget).find('i').hasClass('fa-chevron-down')) {
-if (this.RAuditAggregated.currentView) {
-  this.RAuditAggregated.currentView.trigger("button:min:max");
-}
-  }
-};
-return events;
-  },
-  initialize: function (options) {
-_.extend(this, _.pick(options, 'globalVent'));
-this.defaultParams = ViewUtils.getDefaultParamsForHierarchy();
-delete this.defaultParams.level;
-this.vent = new Backbone.Wreqr.EventAggregator();
-this.initializeCollections();
-this.columns = [];
-this.bindEvents();
-  },
-  initializeCollections: function () {
-this.auditModel = new VAuditLog();
-this.collection = new VAuditLogList([], {
-  state: {
-firstPage: 0,
-pageSize: 25
-  }
-});
-
-this.componentsList = new VGroupList([], {
-  state: {
-firstPage: 0,
-pageSize: 9
-  }
-});
-this.componentsList.url = Globals.baseURL + "audit/logs/components";
-  },
-  bindEvents: function () {
-this.listenTo(this.componentsList, "reset", function (col, abc) {
-  this.setupSelect2Fields(col, "type", 'type', 'excludeComponents', 
'Exclude Components');
-  this.setupSelect2Fields(col, "type", 'type', 'includeComponents', 
'Include Components');
-}, this);
-this.listenTo(this.vent, "search:audit:query auditComponents:include 
auditComponents:exclude search:audit:include search:audit:exclude 
logtime:filter", function (value) {
-  _.extend(this.defaultParams, value);
-  this.fetchAuditLogs(value);
-}, this);
-this.listenTo(this.vent, "reinitialize:filter:mustBe", function 
(value) {
-  this.reinitializeFilterMustBe(value);
-}, this);
-this.listenTo(this.vent, "reinitialize:filter:mustNot", function 
(value) {
-  this.reinitializeFilterMustNot(value);
-}, this);
-
-this.listenTo(this.globalVent, "reinitialize:auditLogs", 

[17/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/timezone/WorldMapGenerator.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/timezone/WorldMapGenerator.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/timezone/WorldMapGenerator.js
deleted file mode 100644
index cfc44c7..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/timezone/WorldMapGenerator.js
+++ /dev/null
@@ -1,3474 +0,0 @@
-/**
- * @version: 1.0.1
- * @author: Keval Bhatt 
- * @copyright: Copyright (c) 2015 Keval Bhatt. All rights reserved.
- * @license: Licensed under the MIT license. See 
http://www.opensource.org/licenses/mit-license.php
- * @website: http://kevalbhatt.github.io/WorldMapGenerator/
- */
-'use strict';
-(function(root, factory) {
-
-if (typeof define === 'function' && define.amd) {
-define(['moment', 'jquery'], function(momentjs, $) {
-root.worldMapTime = {};
-factory(momentjs, $, root.worldMapTime);
-});
-
-} else {
-if ((typeof root.moment == "undefined")) {
-var moment = false;
-console.log('Day light feature requires moment.js')
-} else {
-if (!(root.moment.tz)) {
-throw new Error('moment-timezone dependency not found');
-}
-}
-if ((root.jQuery != "undefined" || root.Zepto != "undefined" || 
root.ender != "undefined" || root.$ != "undefined")) {
-var c = root.worldMapTime = {};
-factory(root.moment || moment, (root.jQuery || root.Zepto || 
root.ender || root.$), c);
-} else {
-throw new Error('jQuery dependnecy not found');
-}
-
-}
-
-}(this, function(moment, $, getTimeZoneObjct) {
-var findValue = function(key, value) {
-var referObj = [];
-var obj = WorldMapGenerator.timeZoneValue.filter(function(object) {
-if (object[key] === value) {
-referObj.push($.extend(true, {},object));
-return object;
-}
-});
-for(var i=0;i

[07/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/dialog/TimeZoneChangeView.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/dialog/TimeZoneChangeView.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/dialog/TimeZoneChangeView.js
deleted file mode 100644
index 900c232..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/dialog/TimeZoneChangeView.js
+++ /dev/null
@@ -1,101 +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',
-'backbone',
-'utils/Utils',
-'hbs!tmpl/dialog/TimeZoneChangeView_tmpl'
-],function(require,Backbone,Utils,TimeZoneChangeViewTmpl) {
-'use strict';
-
-return Backbone.Marionette.Layout.extend(
-/** @lends TimeZoneChangeView */
-{
-_viewName: 'TimeZoneChangeView',
-
-template: TimeZoneChangeViewTmpl,
-
-
-/** ui selector cache */
-ui: {
-map: "#timezone-picker"
-},
-
-/** ui events hash */
-events: function() {
-var events = {};
-return events;
-},
-
-/**
- * intialize a new TimeZoneChangeView Layout
- * @constructs
- */
-initialize: function(options) {
-_.extend(this, _.pick(options, 'currentTime'));
-this.dateUtil = Utils.dateUtil;
-this.changedTimeZone = false;
-var storeTimezone = '';
-if(!_.isUndefined(this.currentTime)){
-storeTimezone = this.currentTime;
-}
-if (storeTimezone && storeTimezone != "undefined") {
-this.selectedtimeZone = storeTimezone.value
-}
-},
-bindEvents: function() {
-var that = this;
-this.ui.map.on('map:clicked', function(e) {
-var valueArray = 
$(this).data('WorldMapGenerator').getValue();
-if (valueArray.length) {
-if (that.selectedtimeZone != valueArray[0].zonename) {
-that.selectedtimeZone = valueArray[0].timezone + 
"," + valueArray[0].zonename + "," + valueArray.length
-that.changedTimeZone = true;
-}
-}
-
-that.enabledButton()
-})
-this.ui.map.on('map:loaded', function(e) {
-var selectedtimeZone = that.selectedtimeZone.split(',');
-if (selectedtimeZone.length <= 1) {
-
$(this).data('WorldMapGenerator').setValue(that.selectedtimeZone.split(',')[0], 
'timezone');
-} else {
-if (selectedtimeZone[2] && 
parseInt(selectedtimeZone[2]) <= 1 ) {
-
$(this).data('WorldMapGenerator').setValue(that.selectedtimeZone.split(',')[0], 
'timezone');
-} else {
-
$(this).data('WorldMapGenerator').setValue(that.selectedtimeZone.split(',')[1], 
'zonename');
-}
-}
-
-that.trigger('toggle:btn', false, 'reloadBtn');
-that.trigger('toggle:btn', false, 'reloadNewBtn');
-})
-},
-onRender: function() {
-this.bindEvents();
-},
-enabledButton: function() {
-this.trigger('toggle:btn', true, 'reloadBtn');
-this.trigger('toggle:btn', true, 'reloadNewBtn');
-}
-
-});
-
-
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/filter/CreateLogfeederFilterView.js
--
diff --git 

[19/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/backgrid-columnmanager/Backgrid.ColumnManager.css
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/backgrid-columnmanager/Backgrid.ColumnManager.css
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/backgrid-columnmanager/Backgrid.ColumnManager.css
deleted file mode 100644
index 89a2446..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/backgrid-columnmanager/Backgrid.ColumnManager.css
+++ /dev/null
@@ -1,114 +0,0 @@
-#control {
-margin: 0 0 10px 0;
-}
-
-div.columnmanager-visibilitycontrol {
-margin: 0 auto;
-position: relative;
-width: 50px;
-}
-
-div.columnmanager-visibilitycontrol > button.dropdown-button {
-background-image: -moz-linear-gradient(top, #ff, #dbdbdb);
-background-image: -webkit-gradient(linear,left top,left bottom,
-color-stop(0, #ff),color-stop(1, #dbdbdb));
-filter: 
progid:DXImageTransform.Microsoft.gradient(startColorStr='#ff', 
EndColorStr='#dbdbdb');
--ms-filter: 
"progid:DXImageTransform.Microsoft.gradient(startColorStr='#ff', 
EndColorStr='#dbdbdb')";
-border: 1px solid #fff;
--moz-box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.4);
--webkit-box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.4);
-box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.4);
-text-decoration: none;
-text-shadow: #fff 0 1px 0;
-color: #597390;
-font-weight: bold;
-}
-
-div.columnmanager-visibilitycontrol > button.dropdown-button:hover {
-background-image: -moz-linear-gradient(top, #ff, #ee);
-background-image: -webkit-gradient(linear,left top,left bottom,
-color-stop(0, #ff),color-stop(1, #ee));
-filter: 
progid:DXImageTransform.Microsoft.gradient(startColorStr='#ff', 
EndColorStr='#ee');
--ms-filter: 
"progid:DXImageTransform.Microsoft.gradient(startColorStr='#ff', 
EndColorStr='#ee')";
-color: #000;
-}
-
-div.columnmanager-visibilitycontrol > button.dropdown-button:active {
-background-image: -moz-linear-gradient(top, #dbdbdb, #ff);
-background-image: -webkit-gradient(linear,left top,left bottom,
-color-stop(0, #dbdbdb),color-stop(1, #ff));
-filter: 
progid:DXImageTransform.Microsoft.gradient(startColorStr='#dbdbdb', 
EndColorStr='#ff');
--ms-filter: 
"progid:DXImageTransform.Microsoft.gradient(startColorStr='#dbdbdb', 
EndColorStr='#ff')";
-text-shadow: 0px -1px 0 rgba(255, 255, 255, 0.5);
-}
-
-div.columnmanager-dropdown-container {
-cursor: default;
-position: absolute;
-z-index: 10;
-top: 0;
-left: 0;
-background: #fff;
-border: solid 1px #bbb;
--webkit-box-shadow: #99 0 1px 3px;
--moz-box-shadow: #99 0 1px 3px;
-box-shadow: #99 0 1px 3px;
-width: 200px;
-display: none !important;
-min-height: 20px;
-max-height: 400px;
-font-size: 14px;
-line-height: 1.1em;
-font-weight: normal;
-text-align: left;
-color: #444;
-text-transform: none;
--webkit-border-radius: 3px;
--moz-border-radius: 3px;
-border-radius: 3px;
--moz-background-clip: padding;
--webkit-background-clip: padding-box;
-background-clip: padding-box;
-pointer-events: none;
-}
-
-div.columnmanager-dropdown-container.open {
-display: block !important;
-pointer-events: auto;
-}
-
-.columnmanager-dropdown-container > li {
-list-style-type:none;
-padding: 5px 0px 0px 20px;
-border-bottom: solid 1px lightgray;
-cursor: pointer;
-}
-
-.columnmanager-dropdown-container > li:hover {
-background-color: #f0f0f0;
-}
-
-.columnmanager-dropdown-container > li:last-child {
-border-bottom: none;
-}
-
-.columnmanager-dropdown-container > li > span.indicator {
-width: 20px;
-display: inline-block;
-}
-.columnmanager-dropdown-container > li.visible > span.indicator::before {
-content: "✓";
-color: blue;
-}
-
-.columnmanager-dropdown-container > li > span.column-label {
-white-space: nowrap;
-text-overflow: ellipsis;
-overflow: hidden;
-display: inline-block;
-width: 150px;
- }
-
-th.columnVisibility {
-overflow: visible;
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/backgrid-columnmanager/Backgrid.ColumnManager.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/backgrid-columnmanager/Backgrid.ColumnManager.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/libs/custom/backgrid-columnmanager/Backgrid.ColumnManager.js
deleted file mode 100644
index e65e8cd..000
--- 

[04/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/troubleshoot/TroubleShootLayoutView.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/troubleshoot/TroubleShootLayoutView.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/troubleshoot/TroubleShootLayoutView.js
deleted file mode 100644
index 8b90b33..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/troubleshoot/TroubleShootLayoutView.js
+++ /dev/null
@@ -1,553 +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(['backbone',
-'utils/Utils',
-'utils/ViewUtils',
-'utils/Globals',
-'hbs!tmpl/troubleshoot/TroubleShootLayoutView_tmpl',
-'collections/VLogList',
-'collections/VNameValueList',
-'nv'
-], function(Backbone, Utils, ViewUtils, Globals, TroubleShootLayoutView_Tmpl, 
VLogList, VNameValueList, nv) {
-'use strict';
-
-return Backbone.Marionette.Layout.extend(
-/** @lends TroubleShootLayoutView */
-{
-_viewName: 'TroubleShootLayoutView',
-
-template: TroubleShootLayoutView_Tmpl,
-
-className : "clearfix",
-
-/** ui selector cache */
-ui: {
-serviceContainer : ".services",
-componentsContainer : "[data-id='components']",
-logLevelTable : "[data-id='logLevelTable']",
-components : "[data-id='componentsSelection']",
-dependencyCont : ".dependContainer",
-loader : '[data-id="loader"]'
-},
-
-/** ui events hash */
-events: function() {
-var events = {};
-events['click .services button'] = 'onServicesChange';
-events['click [data-id="searchServiceLogs"]'] = 
'onSearchServiceLogsClick';
-events['click [data-id="searchAuditLogs"]'] = 
'onSearchAuditLogsClick';
-events['click .depLinks'] = 'onDependentServiceClick';
-events['click .expand-collapse'] = 'onExpandCollapseSections';
-return events;
-},
-regions: {
-RDateRangePicker : "[data-id='dateRange']",
-RServiceGraph : "[data-id='serviceGraph']"
-},
-
-/**
- * intialize a new TroubleShootLayoutView Layout
- * @constructs
- */
-initialize: function(options) {
-_.extend(this, _.pick(options, 'globalVent', 'params'));
-this.vent = new Backbone.Wreqr.EventAggregator();
-//this.servicesData = 
{services:{ranger:{label:"Ranger",components:[{name:"ranger_admin"}],dealsWithServices:[{name:"hdfs"},{name:"kms"}],dealsWithComponents:[{name:"security_admin"},{name:"portal"}],},ambari:{label:"Ambari",dealsWithServices:[{name:"ranger"},{name:"hive"}]},hdfs:{label:"Hdfs",components:[{name:"hdfs_namenode"},{name:"hdfs_datanode"}],dealsWithServices:[],dealsWithComponents:[],}}};
-var todayRange = Utils.dateUtil.getTodayRange();
-this.params = 
_.pick(ViewUtils.getDefaultParamsForHierarchy(),"dateRangeLabel","from","to","bundle_id","host_name","component_name","file_name");
-this.initializeCollection();
-this.bindEvents();
-},
-initializeCollection : function(){
-this.serviceLogsCollection = new VLogList([], {
-state: {
-firstPage: 0,
-pageSize: 9,
-
-}
-});
-this.serviceLogsCollection.url = Globals.baseURL + 
"service/logs/count/anygraph";
-this.serviceLogsCollection.modelAttrName = "graphData";
-
-this.topUsers = new VNameValueList([],{
-state: {
-firstPage: 0,
-pageSize: 
-}
-});
-

[06/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/tabs/ComparisonView.js
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/tabs/ComparisonView.js
 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/tabs/ComparisonView.js
deleted file mode 100644
index 7c50cbb..000
--- 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/scripts/views/tabs/ComparisonView.js
+++ /dev/null
@@ -1,242 +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',
-'backbone',
-'utils/Utils',
-'moment',
-'utils/Globals',
-'collections/VLogList',
-'hbs!tmpl/tabs/ComparisonView_tmpl',
-], function(require, Backbone, Utils, moment, Globals, VLogList, 
ComparisonViewTmpl) {
-'use strict';
-
-return Backbone.Marionette.Layout.extend(
-{
-_viewName: 'ComparisonView',
-
-template: ComparisonViewTmpl,
-
-regions: {
-RVSSearch: "#r_VSSearch",
-RLogTable: "#rLogTable",
-RDatePicker: "#r_DatePicker"
-},
-/** ui selector cache */
-ui: {
-dateRange: "#dateRange",
-selectDateRange: ".selectDateRange",
-tabTitle: "[data-id='tabTitle']"
-
-},
-
-/** ui events hash */
-events: function() {
-var events = {};
-return events;
-},
-/**
- * intialize a new ComparisonView Layout
- * @constructs
- */
-initialize: function(options) {
-_.extend(this, _.pick(options, 'globalVent', 'params', 
'datePickerPosition'));
-this.vent = new Backbone.Wreqr.EventAggregator();
-this.collection = new VLogList([], {
-state: {
-firstPage: 0,
-pageSize: 25
-}
-});
-this.dateUtil = Utils.dateUtil;
-this.collection.url = Globals.baseURL + "service/logs";
-this.bindEvents();
-this.dateRangeLabel = "Last 1 Hour"
-},
-bindEvents: function() {
-this.listenTo(this.vent, "search:include:exclude", 
function(value) {
-this.fetchCollection(value);
-}, this);
-this.listenTo(this.vent, "logtime:filter", function(value) {
-this.fetchCollection(value);
-}, this);
-},
-onRender: function() {
-if (this.params) {
-this.fetchCollection(this.params);
-if (this.params.component_name && this.params.host_name) {
-this.ui.tabTitle.html(this.params.host_name + '  ' + this.params.component_name)
-}
-} else {
-this.fetchCollection({
-"q": "*:*"
-});
-}
-this.renderVisualSearch();
-this.renderDatePicker();
-this.renderTable();
-
-},
-renderVisualSearch: function() {
-var that = this;
-require(['views/tabs/VisualSearchView'], 
function(VisualSearchView) {
-that.RVSSearch.show(new VisualSearchView({
-vent: that.vent,
-globalVent: that.globalVent,
-params: that.params,
-eventName: "search:include:exclude"
-}));
-})
-
-},
-renderDatePicker: function() {
-var that = this;
-require(['views/common/DatePickerLayout'], 
function(DatePickerLayout) {
-that.RDatePicker.show(new DatePickerLayout({
-vent: that.vent,
-globalVent: that.globalVent,
-  

[03/51] [partial] ambari git commit: AMBARI-21870. Integrate LogSearch new UI with the server and get rid of the old one (oleewere)

2017-09-05 Thread oleewere
http://git-wip-us.apache.org/repos/asf/ambari/blob/02360dd5/ambari-logsearch/ambari-logsearch-web/src/main/webapp/styles/animate.css
--
diff --git 
a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/styles/animate.css 
b/ambari-logsearch/ambari-logsearch-web/src/main/webapp/styles/animate.css
deleted file mode 100644
index 58b7900..000
--- a/ambari-logsearch/ambari-logsearch-web/src/main/webapp/styles/animate.css
+++ /dev/null
@@ -1,3272 +0,0 @@
-@charset "UTF-8";
-
-/*!
-Animate.css - http://daneden.me/animate
-Licensed under the MIT license - http://opensource.org/licenses/MIT
-
-Copyright (c) 2015 Daniel Eden
-*/
-
-.animated {
-  -webkit-animation-duration: 1s;
-  animation-duration: 1s;
-  -webkit-animation-fill-mode: both;
-  animation-fill-mode: both;
-}
-
-.animated.infinite {
-  -webkit-animation-iteration-count: infinite;
-  animation-iteration-count: infinite;
-}
-
-.animated.hinge {
-  -webkit-animation-duration: 2s;
-  animation-duration: 2s;
-}
-
-.animated.bounceIn,
-.animated.bounceOut {
-  -webkit-animation-duration: .75s;
-  animation-duration: .75s;
-}
-
-.animated.flipOutX,
-.animated.flipOutY {
-  -webkit-animation-duration: .75s;
-  animation-duration: .75s;
-}
-
-@-webkit-keyframes bounce {
-  from, 20%, 53%, 80%, to {
--webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 
1.000);
-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
--webkit-transform: translate3d(0,0,0);
-transform: translate3d(0,0,0);
-  }
-
-  40%, 43% {
--webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 
0.060);
-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
--webkit-transform: translate3d(0, -30px, 0);
-transform: translate3d(0, -30px, 0);
-  }
-
-  70% {
--webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 
0.060);
-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
--webkit-transform: translate3d(0, -15px, 0);
-transform: translate3d(0, -15px, 0);
-  }
-
-  90% {
--webkit-transform: translate3d(0,-4px,0);
-transform: translate3d(0,-4px,0);
-  }
-}
-
-@keyframes bounce {
-  from, 20%, 53%, 80%, to {
--webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 
1.000);
-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
--webkit-transform: translate3d(0,0,0);
-transform: translate3d(0,0,0);
-  }
-
-  40%, 43% {
--webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 
0.060);
-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
--webkit-transform: translate3d(0, -30px, 0);
-transform: translate3d(0, -30px, 0);
-  }
-
-  70% {
--webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 
0.060);
-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
--webkit-transform: translate3d(0, -15px, 0);
-transform: translate3d(0, -15px, 0);
-  }
-
-  90% {
--webkit-transform: translate3d(0,-4px,0);
-transform: translate3d(0,-4px,0);
-  }
-}
-
-.bounce {
-  -webkit-animation-name: bounce;
-  animation-name: bounce;
-  -webkit-transform-origin: center bottom;
-  transform-origin: center bottom;
-}
-
-@-webkit-keyframes flash {
-  from, 50%, to {
-opacity: 1;
-  }
-
-  25%, 75% {
-opacity: 0;
-  }
-}
-
-@keyframes flash {
-  from, 50%, to {
-opacity: 1;
-  }
-
-  25%, 75% {
-opacity: 0;
-  }
-}
-
-.flash {
-  -webkit-animation-name: flash;
-  animation-name: flash;
-}
-
-/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
-
-@-webkit-keyframes pulse {
-  from {
--webkit-transform: scale3d(1, 1, 1);
-transform: scale3d(1, 1, 1);
-  }
-
-  50% {
--webkit-transform: scale3d(1.05, 1.05, 1.05);
-transform: scale3d(1.05, 1.05, 1.05);
-  }
-
-  to {
--webkit-transform: scale3d(1, 1, 1);
-transform: scale3d(1, 1, 1);
-  }
-}
-
-@keyframes pulse {
-  from {
--webkit-transform: scale3d(1, 1, 1);
-transform: scale3d(1, 1, 1);
-  }
-
-  50% {
--webkit-transform: scale3d(1.05, 1.05, 1.05);
-transform: scale3d(1.05, 1.05, 1.05);
-  }
-
-  to {
--webkit-transform: scale3d(1, 1, 1);
-transform: scale3d(1, 1, 1);
-  }
-}
-
-.pulse {
-  -webkit-animation-name: pulse;
-  animation-name: pulse;
-}
-
-@-webkit-keyframes rubberBand {
-  from {
--webkit-transform: scale3d(1, 1, 1);
-transform: scale3d(1, 1, 1);
-  }
-
-  30% {
--webkit-transform: scale3d(1.25, 0.75, 1);
-transform: scale3d(1.25, 0.75, 1);
-  }
-
-  40% {
--webkit-transform: scale3d(0.75, 1.25, 1);
-transform: scale3d(0.75, 1.25, 1);
-  }
-
-  50% {
--webkit-transform: scale3d(1.15, 0.85, 1);
-transform: scale3d(1.15, 0.85, 1);
-  }
-
-  65% {
--webkit-transform: scale3d(.95, 1.05, 1);
-transform: scale3d(.95, 1.05, 1);
-  }
-
-  75% {
--webkit-transform: scale3d(1.05, .95, 

ambari git commit: AMBARI-21872. Deploys failing with MR service check failure due to missing mapreduce.tar.gz (aonishuk)

2017-09-05 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk d95e484b1 -> 93011b260


AMBARI-21872. Deploys failing with MR service check failure due to missing 
mapreduce.tar.gz (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/93011b26
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/93011b26
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/93011b26

Branch: refs/heads/trunk
Commit: 93011b2600d0e5f3d05f1b8d317239c0e34662f5
Parents: d95e484
Author: Andrew Onishuk 
Authored: Tue Sep 5 18:41:35 2017 +0300
Committer: Andrew Onishuk 
Committed: Tue Sep 5 18:41:35 2017 +0300

--
 .../libraries/functions/copy_tarball.py | 32 ++--
 1 file changed, 16 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/93011b26/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index 795160c..61b03ca 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -63,17 +63,17 @@ TARBALL_MAP = {
  
"/{0}/apps/{1}/spark2/spark2-{0}-yarn-archive.tar.gz".format(STACK_NAME_PATTERN,
 STACK_VERSION_PATTERN))
 }
 
-SERVICE_MAP = {
-  "slider": "SLIDER",
-  "tez": "TEZ_CLIENT",
-  "pig": "PIG",
-  "sqoop": "SQOOP",
-  "hive": "HIVE_CLIENT",
-  "mapreduce": "HDFS_CLIENT",
-  "hadoop_streaming": "MAPREDUCE2_CLIENT",
-  "tez_hive2": "HIVE_CLIENT",
-  "spark": "SPARK_CLIENT",
-  "spark2": "SPARK2_CLIENT"
+SERVICE_TO_CONFIG_MAP = {
+  "slider": "slider-env",
+  "tez": "tez-env",
+  "pig": "pig-env",
+  "sqoop": "sqoop-env",
+  "hive": "hive-env",
+  "mapreduce": "hadoop-env",
+  "hadoop_streaming": "mapred-env",
+  "tez_hive2": "hive-env",
+  "spark": "spark-env",
+  "spark2": "spark2-env"
 }
 
 def get_sysprep_skip_copy_tarballs_hdfs():
@@ -231,11 +231,11 @@ def copy_to_hdfs(name, user_group, owner, file_mode=0444, 
custom_source_file=Non
 return True
 
   if not skip_component_check:
-#Use components installed on the node to check if a file can be copied 
into HDFS
-local_components = default("/localComponents", [])
-component = SERVICE_MAP.get(name)
-if component not in local_components:
-  Logger.info("{0} is not installed on the host. Skip copying 
{1}".format(component, source_file))
+# Check if service is installed on the cluster to check if a file can be 
copied into HDFS
+config_name = SERVICE_TO_CONFIG_MAP.get(name)
+config = default("/configurations/"+config_name, None)
+if config is None:
+  Logger.info("{0} is not present on the cluster. Skip copying 
{1}".format(config_name, source_file))
   return False
 
   Logger.info("Source file: {0} , Dest file in HDFS: {1}".format(source_file, 
dest_file))



ambari git commit: AMBARI-21772. zeppelin proxy user settings are not configured in core-site.xml on upgraded cluster from Ambari 2.4.2 (rlevas)

2017-09-05 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 98ce22a09 -> baabe1ae2


AMBARI-21772. zeppelin proxy user settings are not configured in core-site.xml 
on upgraded cluster from Ambari 2.4.2 (rlevas)


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

Branch: refs/heads/branch-2.6
Commit: baabe1ae262b6de7c90095717013f1d95037d291
Parents: 98ce22a
Author: Robert Levas 
Authored: Tue Sep 5 11:13:12 2017 -0400
Committer: Robert Levas 
Committed: Tue Sep 5 11:13:12 2017 -0400

--
 .../server/upgrade/UpgradeCatalog260.java   | 71 
 .../ZEPPELIN/0.6.0.2.5/kerberos.json|  4 +-
 .../HDP/2.5/services/ZEPPELIN/kerberos.json |  4 +-
 .../HDP/2.6/services/ZEPPELIN/kerberos.json |  4 +-
 .../server/upgrade/UpgradeCatalog260Test.java   | 63 +
 5 files changed, 137 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/baabe1ae/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
index 5d50f29..f2eac97 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
@@ -19,12 +19,18 @@ package org.apache.ambari.server.upgrade;
 
 import java.sql.SQLException;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+
 import javax.persistence.EntityManager;
 import javax.persistence.Query;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.orm.DBAccessor;
 import org.apache.ambari.server.orm.entities.ClusterConfigEntity;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -103,6 +109,7 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
   public static final String HOST_COMPONENT_DESIRED_STATE = 
"hostcomponentdesiredstate";
   public static final String HOST_COMPONENT_STATE = "hostcomponentstate";
 
+  private static final String CORE_SITE = "core-site";
   /**
* Logger.
*/
@@ -367,6 +374,7 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
 addNewConfigurationsFromXml();
 setUnmappedForOrphanedConfigs();
 removeSupersetFromDruid();
+ensureZeppelinProxyUserConfigs();
   }
 
   /**
@@ -423,4 +431,67 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
 dbAccessor.executeQuery(hostComponentStateRemoveSQL);
 dbAccessor.executeQuery(serviceComponentDesiredStateRemoveSQL);
   }
+
+  /**
+   * If Zeppelin is installed, ensure that the proxyuser configurations are 
set in core-site.
+   * 
+   * The following configurations will be added, if core-site exists and the 
properties are not in the
+   * set of core-site properties:
+   * 
+   * "hadoop.proxyuser.{zeppelin-env/zeppelin_user}.groups": 
"*"
+   * "hadoop.proxyuser.{zeppelin-env/zeppelin_user}.hosts": 
"*"
+   * 
+   */
+  void ensureZeppelinProxyUserConfigs() throws AmbariException {
+Clusters clusters = injector.getInstance(Clusters.class);
+Map clusterMap = getCheckedClusterMap(clusters);
+
+if ((clusterMap != null) && !clusterMap.isEmpty()) {
+  for (final Cluster cluster : clusterMap.values()) {
+Config zeppelinEnvConfig = 
cluster.getDesiredConfigByType("zeppelin-env");
+
+if (zeppelinEnvConfig != null) {
+  // If zeppelin-env exists, than it is assumed that Zeppelin is 
installed
+  Map zeppelinEnvProperties = 
zeppelinEnvConfig.getProperties();
+
+  String zeppelinUser = null;
+  if (zeppelinEnvProperties != null) {
+zeppelinUser = zeppelinEnvProperties.get("zeppelin_user");
+  }
+
+  if (!StringUtils.isEmpty(zeppelinUser)) {
+// If the zeppelin user is set, see if the proxyuser configs need 
to be set
+
+Config coreSiteConfig = cluster.getDesiredConfigByType(CORE_SITE);
+if (coreSiteConfig != null) {
+  // If core-site exists, ensure the proxyuser configurations for 
Zeppelin are set.
+  // If they are not already set, set them to 

ambari git commit: AMBARI-21879. Cluster version showing as Upgrade when INSTALL_FAILED (alexantonenko)

2017-09-05 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 7b67b01cb -> d95e484b1


AMBARI-21879. Cluster version showing as Upgrade when INSTALL_FAILED 
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: d95e484b18768e61108cfc0cc690879d69334821
Parents: 7b67b01
Author: Alex Antonenko 
Authored: Tue Sep 5 17:15:33 2017 +0300
Committer: Alex Antonenko 
Committed: Tue Sep 5 17:15:33 2017 +0300

--
 .../stack_upgrade/upgrade_version_box_view.js   | 64 +++-
 .../upgrade_version_box_view_test.js| 34 ++-
 2 files changed, 42 insertions(+), 56 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d95e484b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
index 87e843b..1a2cc60 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
@@ -261,38 +261,46 @@ App.UpgradeVersionBoxView = Em.View.extend({
 
 if (Em.get(currentVersion, 'stack_name') !== 
this.get('content.stackVersionType') || isVersionHigherThanCurrent) {
   var isDisabled = this.isDisabledOnInstalled();
-  element.set('isButtonGroup', true);
-  if (status === 'OUT_OF_SYNC') {
-element.set('text', this.get('isVersionColumnView') ? 
Em.I18n.t('common.reinstall') : 
Em.I18n.t('admin.stackVersions.version.reinstall'));
-element.set('action', 'installRepoVersionConfirmation');
-element.get('buttons').pushObject({
-  text: this.get('isVersionColumnView') ? Em.I18n.t('common.upgrade') 
: Em.I18n.t('admin.stackVersions.version.performUpgrade'),
-  action: 'confirmUpgrade',
-  isDisabled: isDisabled
-});
-  } else {
-var isVersionColumnView = this.get('isVersionColumnView');
-element.set('text', isVersionColumnView ? Em.I18n.t('common.upgrade') 
: Em.I18n.t('admin.stackVersions.version.performUpgrade'));
-element.set('action', 'confirmUpgrade');
-element.get('buttons').pushObject({
-  text: isVersionColumnView ? Em.I18n.t('common.reinstall') : 
Em.I18n.t('admin.stackVersions.version.reinstall'),
-  action: 'installRepoVersionConfirmation',
-  isDisabled: isDisabled
-});
-
-element.get('buttons').pushObject({
-  text: Em.I18n.t('admin.stackVersions.version.preUpgradeCheck'),
-  action: 'showUpgradeOptions',
-  isDisabled: isDisabled
-});
+  switch (status){
+case 'OUT_OF_SYNC':
+  element.set('isButtonGroup', true);
+  element.set('text', this.get('isVersionColumnView') ? 
Em.I18n.t('common.reinstall') : 
Em.I18n.t('admin.stackVersions.version.reinstall'));
+  element.set('action', 'installRepoVersionConfirmation');
+  element.get('buttons').pushObject({
+text: this.get('isVersionColumnView') ? 
Em.I18n.t('common.upgrade') : 
Em.I18n.t('admin.stackVersions.version.performUpgrade'),
+action: 'confirmUpgrade',
+isDisabled: isDisabled
+  });
+  break;
+case 'INSTALL_FAILED':
+  element.set('isButton', true);
+  element.set('text', this.get('isVersionColumnView') ? 
Em.I18n.t('common.reinstall') : 
Em.I18n.t('admin.stackVersions.version.reinstall'));
+  element.set('action', 'installRepoVersionConfirmation');
+  break;
+default:
+  var isVersionColumnView = this.get('isVersionColumnView');
+  element.set('isButtonGroup', true);
+  element.set('text', isVersionColumnView ? 
Em.I18n.t('common.upgrade') : 
Em.I18n.t('admin.stackVersions.version.performUpgrade'));
+  element.set('action', 'confirmUpgrade');
+  element.get('buttons').pushObject({
+text: isVersionColumnView ? Em.I18n.t('common.reinstall') : 
Em.I18n.t('admin.stackVersions.version.reinstall'),
+action: 'installRepoVersionConfirmation',
+isDisabled: isDisabled
+  });
 
-if (this.get('content.isPatch')) {
   element.get('buttons').pushObject({
-text: Em.I18n.t('common.discard'),
-action: 'confirmDiscardRepoVersion',
+text: Em.I18n.t('admin.stackVersions.version.preUpgradeCheck'),
+action: 

ambari git commit: AMBARI-21879. Cluster version showing as Upgrade when INSTALL_FAILED (alexantonenko)

2017-09-05 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 a6cfc132c -> 98ce22a09


AMBARI-21879. Cluster version showing as Upgrade when INSTALL_FAILED 
(alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/98ce22a0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/98ce22a0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/98ce22a0

Branch: refs/heads/branch-2.6
Commit: 98ce22a096463c980c72d556a71960a68db35cdc
Parents: a6cfc13
Author: Alex Antonenko 
Authored: Tue Sep 5 17:14:22 2017 +0300
Committer: Alex Antonenko 
Committed: Tue Sep 5 17:14:22 2017 +0300

--
 .../stack_upgrade/upgrade_version_box_view.js   | 66 +++-
 .../upgrade_version_box_view_test.js| 34 ++
 2 files changed, 43 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/98ce22a0/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
index e36b83a..02c285e 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
@@ -256,39 +256,47 @@ App.UpgradeVersionBoxView = Em.View.extend({
 
 if (Em.get(currentVersion, 'stack_name') !== 
this.get('content.stackVersionType') || isVersionHigherThanCurrent) {
   var isDisabled = this.isDisabledOnInstalled();
-  element.set('isButtonGroup', true);
-  if (status === 'OUT_OF_SYNC') {
-element.set('text', this.get('isVersionColumnView') ? 
Em.I18n.t('common.reinstall') : 
Em.I18n.t('admin.stackVersions.version.reinstall'));
-element.set('action', 'installRepoVersionConfirmation');
-element.get('buttons').pushObject({
-  text: this.get('isVersionColumnView') ? Em.I18n.t('common.upgrade') 
: Em.I18n.t('admin.stackVersions.version.performUpgrade'),
-  action: 'confirmUpgrade',
-  isDisabled: isDisabled
-});
-  } else {
-var isVersionColumnView = this.get('isVersionColumnView');
-element.set('text', isVersionColumnView ? Em.I18n.t('common.upgrade') 
: Em.I18n.t('admin.stackVersions.version.performUpgrade'));
-element.set('action', 'confirmUpgrade');
-element.get('buttons').pushObject({
-  text: isVersionColumnView ? Em.I18n.t('common.reinstall') : 
Em.I18n.t('admin.stackVersions.version.reinstall'),
-  action: 'installRepoVersionConfirmation',
-  isDisabled: isDisabled
-});
-
-element.get('buttons').pushObject({
-  text: Em.I18n.t('admin.stackVersions.version.preUpgradeCheck'),
-  action: 'showUpgradeOptions',
-  isDisabled: isDisabled
-});
+  switch (status){
+case 'OUT_OF_SYNC':
+  element.set('isButtonGroup', true);
+  element.set('text', this.get('isVersionColumnView') ? 
Em.I18n.t('common.reinstall') : 
Em.I18n.t('admin.stackVersions.version.reinstall'));
+  element.set('action', 'installRepoVersionConfirmation');
+  element.get('buttons').pushObject({
+text: this.get('isVersionColumnView') ? 
Em.I18n.t('common.upgrade') : 
Em.I18n.t('admin.stackVersions.version.performUpgrade'),
+action: 'confirmUpgrade',
+isDisabled: isDisabled
+  });
+  break;
+case 'INSTALL_FAILED':
+  element.set('isButton', true);
+  element.set('text', this.get('isVersionColumnView') ? 
Em.I18n.t('common.reinstall') : 
Em.I18n.t('admin.stackVersions.version.reinstall'));
+  element.set('action', 'installRepoVersionConfirmation');
+  break;
+default:
+  var isVersionColumnView = this.get('isVersionColumnView');
+  element.set('isButtonGroup', true);
+  element.set('text', isVersionColumnView ? 
Em.I18n.t('common.upgrade') : 
Em.I18n.t('admin.stackVersions.version.performUpgrade'));
+  element.set('action', 'confirmUpgrade');
+  element.get('buttons').pushObject({
+text: isVersionColumnView ? Em.I18n.t('common.reinstall') : 
Em.I18n.t('admin.stackVersions.version.reinstall'),
+action: 'installRepoVersionConfirmation',
+isDisabled: isDisabled
+  });
 
-if (this.get('content.isPatch')) {
   element.get('buttons').pushObject({
-text: Em.I18n.t('common.discard'),
-action: 'confirmDiscardRepoVersion',
+text: Em.I18n.t('admin.stackVersions.version.preUpgradeCheck'),
+   

ambari git commit: AMBARI-21772. zeppelin proxy user settings are not configured in core-site.xml on upgraded cluster from Ambari 2.4.2 (rlevas)

2017-09-05 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk c774475b9 -> 7b67b01cb


AMBARI-21772. zeppelin proxy user settings are not configured in core-site.xml 
on upgraded cluster from Ambari 2.4.2 (rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7b67b01c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7b67b01c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7b67b01c

Branch: refs/heads/trunk
Commit: 7b67b01cb7d6321debf0f67e4715418c021c0d62
Parents: c774475
Author: Robert Levas 
Authored: Tue Sep 5 09:01:01 2017 -0400
Committer: Robert Levas 
Committed: Tue Sep 5 09:01:01 2017 -0400

--
 .../server/upgrade/UpgradeCatalog260.java   | 72 
 .../ZEPPELIN/0.6.0.2.5/kerberos.json|  4 +-
 .../ZEPPELIN/0.6.0.3.0/kerberos.json|  4 +-
 .../HDP/2.5/services/ZEPPELIN/kerberos.json |  4 +-
 .../HDP/2.6/services/ZEPPELIN/kerberos.json |  4 +-
 .../server/upgrade/UpgradeCatalog260Test.java   | 65 ++
 6 files changed, 141 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7b67b01c/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
index 2bd0f93..de5d5ae 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
@@ -17,9 +17,13 @@
  */
 package org.apache.ambari.server.upgrade;
 
+import static org.apache.ambari.server.view.ViewContextImpl.CORE_SITE;
+
 import java.sql.SQLException;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.persistence.EntityManager;
 import javax.persistence.Query;
@@ -27,6 +31,10 @@ import javax.persistence.Query;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.orm.DBAccessor;
 import org.apache.ambari.server.orm.entities.ClusterConfigEntity;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
+import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -368,6 +376,7 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
 addNewConfigurationsFromXml();
 setUnmappedForOrphanedConfigs();
 removeSupersetFromDruid();
+ensureZeppelinProxyUserConfigs();
   }
 
   public int getCurrentVersionID() throws AmbariException, SQLException {
@@ -413,4 +422,67 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
 dbAccessor.executeQuery(hostComponentStateRemoveSQL);
 dbAccessor.executeQuery(serviceComponentDesiredStateRemoveSQL);
   }
+
+  /**
+   * If Zeppelin is installed, ensure that the proxyuser configurations are 
set in core-site.
+   * 
+   * The following configurations will be added, if core-site exists and the 
properties are not in the
+   * set of core-site properties:
+   * 
+   * "hadoop.proxyuser.{zeppelin-env/zeppelin_user}.groups": 
"*"
+   * "hadoop.proxyuser.{zeppelin-env/zeppelin_user}.hosts": 
"*"
+   * 
+   */
+  void ensureZeppelinProxyUserConfigs() throws AmbariException {
+Clusters clusters = injector.getInstance(Clusters.class);
+Map clusterMap = getCheckedClusterMap(clusters);
+
+if ((clusterMap != null) && !clusterMap.isEmpty()) {
+  for (final Cluster cluster : clusterMap.values()) {
+Config zeppelinEnvConfig = 
cluster.getDesiredConfigByType("zeppelin-env");
+
+if (zeppelinEnvConfig != null) {
+  // If zeppelin-env exists, than it is assumed that Zeppelin is 
installed
+  Map zeppelinEnvProperties = 
zeppelinEnvConfig.getProperties();
+
+  String zeppelinUser = null;
+  if (zeppelinEnvProperties != null) {
+zeppelinUser = zeppelinEnvProperties.get("zeppelin_user");
+  }
+
+  if (!StringUtils.isEmpty(zeppelinUser)) {
+// If the zeppelin user is set, see if the proxyuser configs need 
to be set
+
+Config coreSiteConfig = cluster.getDesiredConfigByType(CORE_SITE);
+if (coreSiteConfig != null) {
+  // If core-site exists, ensure the proxyuser configurations for 
Zeppelin are set.
+  // If they are not already set, set them to their default value.
+  String proxyUserHostsName = 

ambari git commit: AMBARI-21864. DEPENDENCY_ORDERED stage execution hangs in case of circular dependencies between role commands (magyari_sandor)

2017-09-05 Thread magyari_sandor
Repository: ambari
Updated Branches:
  refs/heads/trunk af647f81c -> c774475b9


AMBARI-21864. DEPENDENCY_ORDERED stage execution hangs in case of circular 
dependencies between role commands (magyari_sandor)


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

Branch: refs/heads/trunk
Commit: c774475b9281b4b04a1135e46e576896c3992e46
Parents: af647f8
Author: Sandor Magyari 
Authored: Fri Sep 1 17:12:20 2017 +0200
Committer: Sandor Magyari 
Committed: Tue Sep 5 14:10:07 2017 +0200

--
 .../server/actionmanager/ActionScheduler.java   |  41 +++-
 .../actionmanager/TestActionScheduler.java  | 104 +++
 2 files changed, 141 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c774475b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
index 9a45d1f..00e4184 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
@@ -218,7 +218,6 @@ class ActionScheduler implements Runnable {
 
   /**
* Unit Test Constructor.
-   *
* @param sleepTimeMilliSec
* @param actionTimeoutMilliSec
* @param db
@@ -229,14 +228,17 @@ class ActionScheduler implements Runnable {
* @param unitOfWork
* @param ambariEventPublisher
* @param configuration
+   * @param entityManagerProvider
* @param hostRoleCommandDAO
* @param hostRoleCommandFactory
+   * @param roleCommandOrderProvider
*/
   protected ActionScheduler(long sleepTimeMilliSec, long 
actionTimeoutMilliSec, ActionDBAccessor db,
 ActionQueue actionQueue, Clusters fsmObject, int 
maxAttempts, HostsMap hostsMap,
 UnitOfWork unitOfWork, AmbariEventPublisher 
ambariEventPublisher,
 Configuration configuration, 
Provider entityManagerProvider,
-HostRoleCommandDAO hostRoleCommandDAO, 
HostRoleCommandFactory hostRoleCommandFactory) {
+HostRoleCommandDAO hostRoleCommandDAO, 
HostRoleCommandFactory hostRoleCommandFactory,
+RoleCommandOrderProvider roleCommandOrderProvider) 
{
 
 sleepTime = sleepTimeMilliSec;
 actionTimeout = actionTimeoutMilliSec;
@@ -252,12 +254,40 @@ class ActionScheduler implements Runnable {
 this.hostRoleCommandDAO = hostRoleCommandDAO;
 this.hostRoleCommandFactory = hostRoleCommandFactory;
 jpaPublisher = null;
+this.roleCommandOrderProvider = roleCommandOrderProvider;
 
 serverActionExecutor = new ServerActionExecutor(db, sleepTime);
 initializeCaches();
   }
 
   /**
+   * Unit Test Constructor.
+   *
+   * @param sleepTimeMilliSec
+   * @param actionTimeoutMilliSec
+   * @param db
+   * @param actionQueue
+   * @param fsmObject
+   * @param maxAttempts
+   * @param hostsMap
+   * @param unitOfWork
+   * @param ambariEventPublisher
+   * @param configuration
+   * @param hostRoleCommandDAO
+   * @param hostRoleCommandFactory
+   */
+  protected ActionScheduler(long sleepTimeMilliSec, long 
actionTimeoutMilliSec, ActionDBAccessor db,
+ActionQueue actionQueue, Clusters fsmObject, int 
maxAttempts, HostsMap hostsMap,
+UnitOfWork unitOfWork, AmbariEventPublisher 
ambariEventPublisher,
+Configuration configuration, 
Provider entityManagerProvider,
+HostRoleCommandDAO hostRoleCommandDAO, 
HostRoleCommandFactory hostRoleCommandFactory) {
+
+this(sleepTimeMilliSec, actionTimeoutMilliSec, db, actionQueue, fsmObject, 
maxAttempts, hostsMap, unitOfWork,
+ambariEventPublisher, configuration, entityManagerProvider, 
hostRoleCommandDAO, hostRoleCommandFactory,
+null);
+  }
+
+  /**
* Initializes the caches.
*/
   private void initializeCaches() {
@@ -888,8 +918,11 @@ class ActionScheduler implements Runnable {
 boolean areCommandDependenciesFinished = true;
 RoleCommandOrder rco = 
roleCommandOrderProvider.getRoleCommandOrder(stage.getClusterId());
 if (rco != null) {
-  Set roleCommandDependencies = 
rco.getDependencies().get(new
-RoleCommandPair(Role.valueOf(command.getRole()), 

ambari git commit: AMBARI-21875. Remove Revert Icon In Favor of Text Dropdown Action (alexantonenko)

2017-09-05 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 f452063a9 -> a6cfc132c


AMBARI-21875. Remove Revert Icon In Favor of Text Dropdown Action 
(alexantonenko)


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

Branch: refs/heads/branch-2.6
Commit: a6cfc132c289064b2992b3d3b5152869d8a47d49
Parents: f452063
Author: Alex Antonenko 
Authored: Tue Sep 5 13:35:41 2017 +0300
Committer: Alex Antonenko 
Committed: Tue Sep 5 13:35:41 2017 +0300

--
 ambari-web/app/styles/stack_versions.less   | 29 
 .../stack_upgrade/upgrade_version_column.hbs| 14 --
 .../upgrade_version_column_view.js  |  3 +-
 3 files changed, 37 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a6cfc132/ambari-web/app/styles/stack_versions.less
--
diff --git a/ambari-web/app/styles/stack_versions.less 
b/ambari-web/app/styles/stack_versions.less
index 8dee023..c1b2ab6 100644
--- a/ambari-web/app/styles/stack_versions.less
+++ b/ambari-web/app/styles/stack_versions.less
@@ -97,10 +97,6 @@
   a {
 cursor: pointer;
   }
-  .icon-undo {
-color: rgb(243, 178, 11);
-margin-right: 2px;
-  }
 }
   }
 }
@@ -266,6 +262,28 @@
 .hosts-section .host-link {
   font-size: 12px;
 }
+.revert-dropdown{
+  position: absolute;
+  top: 0;
+  width: 100%;
+  z-index: 1000;
+  .btn {
+position: relative;
+top: 3px;
+float: right;
+background: transparent;
+border: none;
+box-shadow: none;
+outline: none;
+.caret{
+  border-top-color: #fff;
+}
+  }
+  .dropdown-menu{
+right: 0;
+cursor: pointer;
+  }
+}
   }
   .version-column {
 min-height: 500px;
@@ -312,7 +330,8 @@
 width: 100%;
 display: inline-block;
 padding: 0;
-line-height: 30px;
+line-height: 35px;
+height: 30px;
 position: relative;
 z-index: 2;
 &:after,&:before{

http://git-wip-us.apache.org/repos/asf/ambari/blob/a6cfc132/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_version_column.hbs
--
diff --git 
a/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_version_column.hbs 
b/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_version_column.hbs
index 1909f82..1ea8de4 100644
--- 
a/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_version_column.hbs
+++ 
b/ambari-web/app/templates/main/admin/stack_upgrade/upgrade_version_column.hbs
@@ -74,6 +74,17 @@
 {{/if}}
 
 
+{{#if view.stateElement.canBeReverted}}
+  
+
+  
+
+
+{{t common.revert}}
+
+  
+{{/if}}
+
 
   {{#if view.content.isStandard}}
 {{view.content.displayNameSimple}}
@@ -85,9 +96,6 @@
   
 {{/if}}
 {{view.content.displayName}}
-{{#if view.stateElement.canBeReverted}}
-  
-{{/if}}
   {{/if}}
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a6cfc132/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
index 3bff550..a031b92 100644
--- 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
+++ 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
@@ -27,7 +27,8 @@ App.UpgradeVersionColumnView = 
App.UpgradeVersionBoxView.extend({
   didInsertElement: function () {
 App.tooltip($('.out-of-sync-badge'), {title: 
Em.I18n.t('hosts.host.stackVersions.status.out_of_sync')});
 App.tooltip($('.not-upgradable'), {title: 
Em.I18n.t('admin.stackVersions.version.service.notUpgradable')});
-App.tooltip($('.icon-trash'), {title: Em.I18n.t('common.revert.patch')});
+App.tooltip($('.icon-bug'), {title: Em.I18n.t('common.patch')});
+App.tooltip($('.icon-medkit'), {title: Em.I18n.t('common.maint')});
 if (!this.get('content.isCompatible')) {
   App.tooltip(this.$(".repo-version-tooltip"), {
 title: Em.I18n.t('admin.stackVersions.version.noCompatible.tooltip')



ambari git commit: AMBARI-18577. Installing ambari agent on Suse fails when zypper has questions (Zsombor Gegesy via adoroszlai)

2017-09-05 Thread adoroszlai
Repository: ambari
Updated Branches:
  refs/heads/trunk cf264c6c8 -> af647f81c


AMBARI-18577. Installing ambari agent on Suse fails when zypper has questions 
(Zsombor Gegesy via adoroszlai)


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

Branch: refs/heads/trunk
Commit: af647f81cb4eca5022c81fd31bdd14e7ba75185c
Parents: cf264c6
Author: Zsombor Gegesy 
Authored: Tue Sep 5 12:18:36 2017 +0200
Committer: Attila Doroszlai 
Committed: Tue Sep 5 12:18:36 2017 +0200

--
 ambari-server/src/main/python/setupAgent.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/af647f81/ambari-server/src/main/python/setupAgent.py
--
diff --git a/ambari-server/src/main/python/setupAgent.py 
b/ambari-server/src/main/python/setupAgent.py
index 9a1cae9..efc3d7c 100755
--- a/ambari-server/src/main/python/setupAgent.py
+++ b/ambari-server/src/main/python/setupAgent.py
@@ -238,7 +238,7 @@ def findNearestAgentPackageVersion(projectVersion):
   if projectVersion == "":
 projectVersion = "  "
   if OSCheck.is_suse_family():
-Command = ["bash", "-c", "zypper --no-gpg-checks -q search -s 
--match-exact ambari-agent | grep '" + projectVersion +
+Command = ["bash", "-c", "zypper --no-gpg-checks --non-interactive -q 
search -s --match-exact ambari-agent | grep '" + projectVersion +
  "' | cut -d '|' -f 4 | head -n1 | sed -e 
's/-\w[^:]*//1' "]
   elif OSCheck.is_windows_family():
 listPackagesCommand = ["cmd", "/c", "choco list ambari-agent --pre --all | 
findstr " + projectVersion + " > agentPackages.list"]
@@ -271,7 +271,7 @@ def isAgentPackageAlreadyInstalled(projectVersion):
 def getAvailableAgentPackageVersions():
   if OSCheck.is_suse_family():
 Command = ["bash", "-c",
-"zypper --no-gpg-checks -q search -s --match-exact ambari-agent | grep 
ambari-agent | sed -re 's/\s+/ /g' | cut -d '|' -f 4 | tr '\\n' ', ' | sed -s 
's/[-|~][A-Za-z0-9]*//g'"]
+"zypper --no-gpg-checks --non-interactive -q search -s --match-exact 
ambari-agent | grep ambari-agent | sed -re 's/\s+/ /g' | cut -d '|' -f 4 | tr 
'\\n' ', ' | sed -s 's/[-|~][A-Za-z0-9]*//g'"]
   elif OSCheck.is_windows_family():
 Command = ["cmd", "/c", "choco list ambari-agent --pre --all | findstr 
ambari-agent"]
   elif OSCheck.is_ubuntu_family():



[10/50] [abbrv] ambari git commit: AMBARI-21725. Web Client Doesn't Display MAINT Repos Correctly (alexantonenko)

2017-09-05 Thread lpuskas
AMBARI-21725. Web Client Doesn't Display MAINT Repos Correctly (alexantonenko)


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: a92d868b7f1e1bf4415e40db08e120f98d40a6f3
Parents: 5e399da
Author: Alex Antonenko 
Authored: Wed Aug 30 14:14:31 2017 +0300
Committer: Alex Antonenko 
Committed: Wed Aug 30 14:14:31 2017 +0300

--
 .../controllers/stackVersions/StackVersionsCreateCtrl.js |  1 +
 .../controllers/stackVersions/StackVersionsEditCtrl.js   |  1 +
 .../resources/ui/admin-web/app/scripts/services/Stack.js |  5 +++--
 .../ui/admin-web/app/views/stackVersions/list.html   |  1 +
 .../app/views/stackVersions/stackVersionPage.html|  1 +
 .../main/admin/stack_and_upgrade_controller.js   | 11 +++
 ambari-web/app/messages.js   |  2 ++
 .../app/models/stack_version/repository_version.js   |  4 
 .../common/modal_popups/install_repo_confirmation.hbs|  2 +-
 .../main/admin/stack_upgrade/upgrade_version_box.hbs |  7 +--
 .../main/admin/stack_upgrade/upgrade_version_column.hbs  |  6 +++---
 .../main/admin/stack_upgrade/upgrade_version_box_view.js |  4 
 .../app/views/main/admin/stack_upgrade/versions_view.js  |  4 ++--
 .../main/admin/stack_and_upgrade_controller_test.js  |  7 ++-
 14 files changed, 37 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a92d868b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
index b26ce28..5e914d0 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
@@ -454,6 +454,7 @@ angular.module('ambariAdminConsole')
 var stackVersion = response.updateObj.RepositoryVersions || 
response.updateObj.VersionDefinition;
 $scope.id = response.id;
 $scope.isPatch = stackVersion.type === 'PATCH';
+$scope.isMaint = stackVersion.type === 'MAINT';
 $scope.stackNameVersion = response.stackNameVersion || $t('common.NA');
 $scope.displayName = response.displayName || $t('common.NA');
 $scope.actualVersion = response.repositoryVersion || 
response.actualVersion || $t('common.NA');

http://git-wip-us.apache.org/repos/asf/ambari/blob/a92d868b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
index 9c870aa..09e3c28 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
@@ -40,6 +40,7 @@ angular.module('ambariAdminConsole')
   $scope.activeStackVersion = response;
   $scope.id = response.id;
   $scope.isPatch = stackVersion.type === 'PATCH';
+  $scope.isMaint = stackVersion.type === 'MAINT';
   $scope.stackNameVersion = response.stackNameVersion || $t('common.NA');
   $scope.displayName = response.displayName || $t('common.NA');
   $scope.version = response.version || $t('common.NA');

http://git-wip-us.apache.org/repos/asf/ambari/blob/a92d868b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
index bca7ed5..0ad6a09 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
@@ -207,6 +207,7 @@ angular.module('ambariAdminConsole')
 });
 repos = repos.map(function (stack) {
   stack.RepositoryVersions.isPatch = 

[12/50] [abbrv] ambari git commit: AMBARI-21853 - Packages Already Installed Cause Problems When Scoping By New Repo ID Schema (jonathanhurley)

2017-09-05 Thread lpuskas
AMBARI-21853 - Packages Already Installed Cause Problems When Scoping By New 
Repo ID Schema (jonathanhurley)


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 960373587b8ace28277ef15edcdda72d9b62f71f
Parents: d22a671
Author: Jonathan Hurley 
Authored: Wed Aug 30 10:14:57 2017 -0400
Committer: Jonathan Hurley 
Committed: Wed Aug 30 10:21:36 2017 -0400

--
 .../core/providers/package/yumrpm.py| 41 +++-
 .../libraries/script/script.py  |  1 +
 2 files changed, 41 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/96037358/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
 
b/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
index 8c02992..78c77ca 100644
--- 
a/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
+++ 
b/ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py
@@ -27,9 +27,12 @@ from resource_management.core.shell import 
string_cmd_from_args_list
 from resource_management.core.logger import Logger
 from resource_management.core.utils import suppress_stdout
 
+import glob
 import re
 import os
 
+import ConfigParser
+
 INSTALL_CMD = {
   True: ['/usr/bin/yum', '-y', 'install'],
   False: ['/usr/bin/yum', '-d', '0', '-e', '0', '-y', 'install'],
@@ -58,6 +61,7 @@ VERIFY_DEPENDENCY_CMD = ['/usr/bin/yum', '-d', '0', '-e', 
'0', 'check', 'depende
 LIST_ALL_SELECT_TOOL_PACKAGES_CMD = "yum list all --showduplicates|grep -v '@' 
|grep '^{pkg_name}'|awk '{print $2}'"
 SELECT_TOOL_VERSION_PATTERN = 
re.compile("(\d{1,2}\.\d{1,2}\.\d{1,2}\.\d{1,2}-*\d*).*")  # xx.xx.xx.xx(-)
 
+YUM_REPO_LOCATION = "/etc/yum.repos.d"
 
 class YumProvider(RPMBasedPackageProvider):
 
@@ -70,7 +74,9 @@ class YumProvider(RPMBasedPackageProvider):
 available_packages = []
 installed_packages = []
 available_packages_in_repos = []
-repo_ids = [repository['repoId'] for repository in repositories]
+
+repo_ids = self._build_repos_ids(repositories)
+Logger.info("Looking for matching packages in the following repositories: 
{0}".format(", ".join(repo_ids)))
 
 for repo in repo_ids:
   available_packages.extend(self._lookup_packages(
@@ -283,3 +289,36 @@ class YumProvider(RPMBasedPackageProvider):
 return REPO_UPDATE_CMD
 
 
+
+  @staticmethod
+  def _build_repos_ids(repositories):
+"""
+Gets a set of repository identifiers based on the supplied repository JSON 
structure as
+well as any matching repos defined in /etc/yum.repos.d.
+:param repositories:  the repositories defined on the command
+:return:  the list of repo IDs from both the command and any matches found 
on the system
+with the same URLs.
+"""
+repo_ids = [repository['repoId'] for repository in repositories]
+base_urls = [repository['baseUrl'] for repository in repositories if 
'baseUrl' in repository]
+mirrors = [repository['mirrorsList'] for repository in repositories if 
'mirrorsList' in repository]
+
+# for every repo file, find any which match the base URLs we're trying to 
write out
+# if there are any matches, it means the repo already exists and we should 
use it to search
+# for packages to install
+for repo_file in glob.glob(os.path.join(YUM_REPO_LOCATION, "*.repo")):
+  config_parser = ConfigParser.ConfigParser()
+  config_parser.read(repo_file)
+  sections = config_parser.sections()
+  for section in sections:
+if config_parser.has_option(section, "baseurl"):
+  base_url = config_parser.get(section, "baseurl")
+  if base_url in base_urls:
+repo_ids.append(section)
+
+if config_parser.has_option(section, "mirrorlist"):
+  mirror = config_parser.get(section, "mirrorlist")
+  if mirror in mirrors:
+repo_ids.append(section)
+
+return set(repo_ids)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/96037358/ambari-common/src/main/python/resource_management/libraries/script/script.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/script/script.py 
b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index 

[04/50] [abbrv] ambari git commit: AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(Prabhjyot Singh via gauravn7)

2017-09-05 Thread lpuskas
AMBARI-21814. On installation of new services on Ambari, Zeppelin should 
configure new interpreters.(Prabhjyot Singh via gauravn7)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4b04a325
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4b04a325
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4b04a325

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 4b04a325eea0f7fa0193a375a10bb168546aa63d
Parents: 58c6848
Author: Gaurav Nagar 
Authored: Wed Aug 30 11:37:48 2017 +0530
Committer: Gaurav Nagar 
Committed: Wed Aug 30 11:37:48 2017 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-config.xml  |  6 ++
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 19 ++-
 .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py |  4 
 .../0.6.0.3.0/configuration/zeppelin-config.xml  | 13 +
 4 files changed, 41 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4b04a325/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
index 6f16a98..03ad5f7 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
@@ -199,4 +199,10 @@
 Size in characters of the maximum text message to be received 
by websocket. Defaults to 1024000
 
   
+  
+zeppelin.interpreter.config.upgrade
+true
+If this is set to true, on every restart of Zeppelin server 
default interpreter parameters will be reset
+
+  
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4b04a325/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 7f506c5..2142bb4 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -216,7 +216,9 @@ class Master(Script):
   self.create_interpreter_json()
   self.update_zeppelin_interpreter()
 
-self.update_kerberos_properties()
+if params.zeppelin_interpreter_config_upgrade == True:
+  self.reset_interpreter_settings()
+  self.update_zeppelin_interpreter()
 
 Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh restart >> '
 + params.zeppelin_log_file, user=params.zeppelin_user)
@@ -235,6 +237,20 @@ class Master(Script):
 pid_file = ''
 check_process_status(pid_file)
 
+  def reset_interpreter_settings(self):
+import json
+import interpreter_json_template
+interpreter_json_template = 
json.loads(interpreter_json_template.template)['interpreterSettings']
+config_data = self.get_interpreter_settings()
+interpreter_settings = config_data['interpreterSettings']
+
+for setting_key in interpreter_json_template.keys():
+  if setting_key not in interpreter_settings:
+interpreter_settings[setting_key] = interpreter_json_template[
+  setting_key]
+
+self.set_interpreter_settings(config_data)
+
   def get_interpreter_settings(self):
 import params
 import json
@@ -433,6 +449,7 @@ class Master(Script):
   del interpreter_settings[setting_key]
 
 self.set_interpreter_settings(config_data)
+self.update_kerberos_properties()
 
   def create_interpreter_json(self):
 import interpreter_json_template

http://git-wip-us.apache.org/repos/asf/ambari/blob/4b04a325/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index 6912c3d..f5a2a37 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
@@ -194,6 +194,10 @@ else:
 
 zeppelin_kerberos_keytab = 

[32/50] [abbrv] ambari git commit: AMBARI-21869. Add Dismiss button on pre-upgrade dialog (alexantonenko)

2017-09-05 Thread lpuskas
AMBARI-21869. Add Dismiss button on pre-upgrade dialog (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7e222173
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7e222173
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7e222173

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 7e222173b74a8d8c5e69e9cbbd3bae05c67aca1f
Parents: 5230d93
Author: Alex Antonenko 
Authored: Mon Sep 4 11:52:17 2017 +0300
Committer: Alex Antonenko 
Committed: Mon Sep 4 11:52:17 2017 +0300

--
 .../main/admin/stack_and_upgrade_controller.js  | 31 
 .../admin/stack_and_upgrade_controller_test.js  |  6 
 2 files changed, 19 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7e222173/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js 
b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index 7a3ec20..b0df4a4 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -1063,18 +1063,21 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 return App.ModalPopup.show({
   encodeBody: false,
   primary: function() {
-return isInUpgradeWizard || 
this.get('controller.getSupportedUpgradeError')
-   ? Em.I18n.t('ok')
-   : Em.I18n.t('common.proceed')
+if ( preUpgradeShow ) return false;
+if ( isInUpgradeWizard || 
this.get('controller.getSupportedUpgradeError') ) return Em.I18n.t('ok');
+return Em.I18n.t('common.proceed');
   }.property('controller.getSupportedUpgradeError'),
   secondary: function() {
-return this.get('controller.getSupportedUpgradeError') ? null : 
Em.I18n.t('common.cancel');
+if (preUpgradeShow) return Em.I18n.t('common.dismiss');
+if (this.get('controller.getSupportedUpgradeError')) return null;
+return Em.I18n.t('common.cancel');
   }.property('controller.getSupportedUpgradeError'),
+  secondaryClass: preUpgradeShow ? 'btn-success' : '',
   classNames: ['upgrade-options-popup'],
   header: preUpgradeShow ? 
Em.I18n.t('admin.stackVersions.version.preUpgrade.header') : 
Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.header'),
   controller: this,
   showFooter: function() {
-return this.get('controller.isUpgradeTypesLoaded') && !preUpgradeShow;
+return this.get('controller.isUpgradeTypesLoaded') || preUpgradeShow;
   }.property('controller.isUpgradeTypesLoaded'),
   bodyClass: Em.View.extend({
 templateName: 
require('templates/main/admin/stack_upgrade/upgrade_options'),
@@ -1100,7 +1103,11 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 }.property().volatile(),
 isInUpgradeWizard: isInUpgradeWizard,
 showPreUpgradeChecks: App.get('supports.preUpgradeCheck') && 
!isInUpgradeWizard,
-versionText: self.getVersionText( preUpgradeShow, isInUpgradeWizard, 
version ),
+versionText: (function () {
+  if ( preUpgradeShow ) return 
Em.I18n.t('admin.stackVersions.version.preUpgrade.bodyMsg.version').format(version.get('displayName'));
+  if ( isInUpgradeWizard ) return '';
+  return 
Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.bodyMsg.version').format(version.get('displayName'));
+})(),
 selectMethod: function (event) {
   if (isInUpgradeWizard || !event.context.get('allowed') || 
event.context.get('isPrecheckFailed')) return;
   var selectedMethod = event.context;
@@ -1221,18 +1228,6 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 });
   },
 
-  getVersionText: function (preUpgradeShow, isInUpgradeWizard, version) {
-if ( preUpgradeShow ){
-  return 
Em.I18n.t('admin.stackVersions.version.preUpgrade.bodyMsg.version').format(version.get('displayName'));
-}
-else{
-  if ( isInUpgradeWizard ){
-return '';
-  }
-  return 
Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.bodyMsg.version').format(version.get('displayName'));
-}
-  },
-
   /**
* open upgrade options from upgrade wizard
*/

http://git-wip-us.apache.org/repos/asf/ambari/blob/7e222173/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
--
diff --git 

[39/50] [abbrv] ambari git commit: AMBARI-21307 Added new resource related changes to the db creation ddl-s

2017-09-05 Thread lpuskas
AMBARI-21307 Added new resource related changes to the db creation ddl-s


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: b25689a849886e420dbfe57de97ca006443341dc
Parents: 0b05182
Author: lpuskas 
Authored: Thu Jul 6 18:15:18 2017 +0200
Committer: lpuskas 
Committed: Tue Sep 5 11:39:21 2017 +0200

--
 .../AmbariConfigurationResourceProvider.java| 12 ++--
 .../server/orm/dao/AmbariConfigurationDAO.java  | 65 ++--
 .../apache/ambari/server/orm/dao/DaoUtils.java  | 13 +---
 .../main/resources/Ambari-DDL-Derby-CREATE.sql  | 21 +++
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  | 20 ++
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 20 ++
 .../resources/Ambari-DDL-Postgres-CREATE.sql| 14 ++---
 .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 20 ++
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   | 20 ++
 9 files changed, 120 insertions(+), 85 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b25689a8/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java
index 5e5af9e..e8f186d 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariConfigurationResourceProvider.java
@@ -97,14 +97,14 @@ public class AmbariConfigurationResourceProvider extends 
AbstractAuthorizedResou
 }
   }
 
-  private static Set properties = Sets.newHashSet(
+  private static Set PROPERTIES = Sets.newHashSet(
 ResourcePropertyId.ID.getPropertyId(),
 ResourcePropertyId.TYPE.getPropertyId(),
 ResourcePropertyId.VERSION.getPropertyId(),
 ResourcePropertyId.VERSION_TAG.getPropertyId(),
 ResourcePropertyId.DATA.getPropertyId());
 
-  private static Map pkPropertyMap = 
Collections.unmodifiableMap(
+  private static Map PK_PROPERTY_MAP = 
Collections.unmodifiableMap(
 new HashMap() {{
   put(Resource.Type.AmbariConfiguration, 
ResourcePropertyId.ID.getPropertyId());
 }}
@@ -117,7 +117,7 @@ public class AmbariConfigurationResourceProvider extends 
AbstractAuthorizedResou
   private Gson gson;
 
   protected AmbariConfigurationResourceProvider() {
-super(properties, pkPropertyMap);
+super(PROPERTIES, PK_PROPERTY_MAP);
 
setRequiredCreateAuthorizations(EnumSet.of(RoleAuthorization.AMBARI_MANAGE_CONFIGURATION));
 
setRequiredDeleteAuthorizations(EnumSet.of(RoleAuthorization.AMBARI_MANAGE_CONFIGURATION));
 
@@ -126,7 +126,7 @@ public class AmbariConfigurationResourceProvider extends 
AbstractAuthorizedResou
 
   @Override
   protected Set getPKPropertyIds() {
-return Sets.newHashSet("AmbariConfiguration/id");
+return Sets.newHashSet(ResourcePropertyId.ID.getPropertyId());
   }
 
   @Override
@@ -137,7 +137,7 @@ public class AmbariConfigurationResourceProvider extends 
AbstractAuthorizedResou
 AmbariConfigurationEntity ambariConfigurationEntity = 
getEntityFromRequest(request);
 
 LOGGER.info("Persisting new ambari configuration: {} ", 
ambariConfigurationEntity);
-ambariConfigurationDAO.persist(ambariConfigurationEntity);
+ambariConfigurationDAO.create(ambariConfigurationEntity);
 
 return getRequestStatus(null);
   }
@@ -170,7 +170,7 @@ public class AmbariConfigurationResourceProvider extends 
AbstractAuthorizedResou
 } else {
   LOGGER.debug("Deleting amari configuration with id: {}", idFromRequest);
   try {
-ambariConfigurationDAO.deleteById(idFromRequest);
+ambariConfigurationDAO.removeByPK(idFromRequest);
   } catch (IllegalStateException e) {
 throw new NoSuchResourceException(e.getMessage());
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/b25689a8/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AmbariConfigurationDAO.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AmbariConfigurationDAO.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AmbariConfigurationDAO.java
index 

[21/50] [abbrv] ambari git commit: AMBARI-21857. Integrate new Log Search UI with maven (oleewere)

2017-09-05 Thread lpuskas
AMBARI-21857. Integrate new Log Search UI with maven (oleewere)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/12c22edb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/12c22edb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/12c22edb

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 12c22edb569cfa1bba59dc2720c6fc25c1ea4b44
Parents: 9f1331a
Author: oleewere 
Authored: Wed Aug 30 19:57:20 2017 +0200
Committer: oleewere 
Committed: Thu Aug 31 12:21:01 2017 +0200

--
 .../ambari-logsearch-web-new/package.json   |   1 +
 .../ambari-logsearch-web-new/pom.xml| 171 +++
 2 files changed, 172 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/12c22edb/ambari-logsearch/ambari-logsearch-web-new/package.json
--
diff --git a/ambari-logsearch/ambari-logsearch-web-new/package.json 
b/ambari-logsearch/ambari-logsearch-web-new/package.json
index b4902a3..96733eb 100644
--- a/ambari-logsearch/ambari-logsearch-web-new/package.json
+++ b/ambari-logsearch/ambari-logsearch-web-new/package.json
@@ -6,6 +6,7 @@
 "ng": "ng",
 "start": "ng serve",
 "build": "ng build",
+"build-prod": "ng build -prod",
 "test": "ng test",
 "lint": "ng lint",
 "e2e": "ng e2e"

http://git-wip-us.apache.org/repos/asf/ambari/blob/12c22edb/ambari-logsearch/ambari-logsearch-web-new/pom.xml
--
diff --git a/ambari-logsearch/ambari-logsearch-web-new/pom.xml 
b/ambari-logsearch/ambari-logsearch-web-new/pom.xml
new file mode 100644
index 000..28e1754
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-web-new/pom.xml
@@ -0,0 +1,171 @@
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;>
+  
+ambari-logsearch
+org.apache.ambari
+2.0.0.0-SNAPSHOT
+  
+  4.0.0
+  ambari-logsearch-web-new
+  Ambari LogSearch Web New
+  2.0.0.0-SNAPSHOT
+  org.apache.ambari
+  Ambari Logsearch Web New
+
+  
+
/tmp/logsearch_npm_config_tmp
+v6.9.0
+v0.23.3
+  
+
+  
+
+  
+com.github.eirslett
+frontend-maven-plugin
+1.4
+
+  ${node.version}
+  ${yarn.version}
+  
${project.build.directory}/webapp-build
+  
false
+  
+  
+${logsearch.npm.config.tmp}
+  
+
+
+  
+install node and yarn
+generate-resources
+
+  install-node-and-yarn
+
+  
+  
+yarn install
+generate-resources
+
+  yarn
+
+
+  install --ignore-engines --pure-lockfile
+
+  
+  
+generate dist
+generate-resources
+
+ yarn
+
+
+  build-prod
+
+  
+  
+
+  
+  
+maven-resources-plugin
+2.6
+
+  
+process-webapp-sources
+process-sources
+
+  copy-resources
+
+
+  ${basedir}/target/webapp-build
+  
+
+  ${basedir}
+  
+e2e/**
+src/**
+.*
+package.json
+protactor.conf.js
+yarn.lock
+karma.conf.js
+tsconfig.json
+tslint.json
+  
+
+  
+
+  
+  
+copy-resources
+process-resources
+
+  copy-resources
+
+
+  ${basedir}/target/classes/dist
+  
+
+  ${basedir}/target/webapp-build/dist
+  false
+
+  
+
+  
+
+  
+  
+org.apache.rat
+apache-rat-plugin
+
+  
+README.md
+*.editorconfig
+src/vendor/**
+yarn.lock
+node_modules/**
+dist/**
+**/*.json
+**/*.log
+**/*.txt
+  
+
+
+  
+test
+
+  check
+
+  
+
+  
+
+  
+
+



[13/50] [abbrv] ambari git commit: AMBARI-21848. Ambari Replaces the Value of Undefined Service Configuration Properties with "Undefined" in Default Config Group If the Same Property is Defined in Dif

2017-09-05 Thread lpuskas
AMBARI-21848. Ambari Replaces the Value of Undefined Service Configuration 
Properties with "Undefined" in Default Config Group If the Same Property is 
Defined in Different Config Group (akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3f083249
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3f083249
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3f083249

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 3f08324907e70a4b6d09cd4d6aa0d35c9dfbb9e3
Parents: 9603735
Author: Aleksandr Kovalenko 
Authored: Wed Aug 30 16:58:53 2017 +0300
Committer: Aleksandr Kovalenko 
Committed: Wed Aug 30 18:03:40 2017 +0300

--
 ambari-web/app/mixins/common/configs/configs_saver.js |  4 ++--
 .../app/models/configs/objects/service_config.js  |  4 ++--
 .../models/configs/objects/service_config_property.js |  8 
 .../common/configs/overriddenPropertyRow_view.js  |  3 +++
 .../models/configs/objects/service_config_test.js | 14 +-
 5 files changed, 28 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3f083249/ambari-web/app/mixins/common/configs/configs_saver.js
--
diff --git a/ambari-web/app/mixins/common/configs/configs_saver.js 
b/ambari-web/app/mixins/common/configs/configs_saver.js
index dafee79..f11cdd0 100644
--- a/ambari-web/app/mixins/common/configs/configs_saver.js
+++ b/ambari-web/app/mixins/common/configs/configs_saver.js
@@ -327,9 +327,9 @@ App.ConfigsSaverMixin = Em.Mixin.create({
   return App.config.getOriginalFileName(type);
 });
 
-// save modified original configs that have no group
+// save modified original configs that have no group and are not Undefined 
label
 modifiedConfigs = this.saveSiteConfigs(modifiedConfigs.filter(function 
(config) {
-  return !config.get('group');
+  return !config.get('group') && !config.get('isUndefinedLabel');
 }));
 
 if (!Em.isArray(modifiedConfigs) || modifiedConfigs.length == 0) return 
null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f083249/ambari-web/app/models/configs/objects/service_config.js
--
diff --git a/ambari-web/app/models/configs/objects/service_config.js 
b/ambari-web/app/models/configs/objects/service_config.js
index ea24ec4..608e99e 100644
--- a/ambari-web/app/models/configs/objects/service_config.js
+++ b/ambari-web/app/models/configs/objects/service_config.js
@@ -60,12 +60,12 @@ App.ServiceConfig = Ember.Object.extend({
 
   setActiveProperties: function() {
 Em.run.once(this, 'setActivePropertiesOnce');
-  }.observes('configs.@each.isActive', 'configs.@each.isRequiredByAgent', 
'configs.@each.value'),
+  }.observes('configs.@each.isActive', 'configs.@each.isRequiredByAgent', 
'configs.@each.value', 'configs.@each.isUndefinedLabel'),
 
   setActivePropertiesOnce: function() {
 if (this.get('isDestroyed')) return false;
 var activeProperties = this.get('configs').filter(function(c) {
-  return c.get('isActive') && (c.get('isRequiredByAgent') || 
c.get('isRequired'));
+  return (c.get('isActive') || c.get('isUndefinedLabel')) && 
(c.get('isRequiredByAgent') || c.get('isRequired'));
 });
 this.set('activeProperties', activeProperties);
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f083249/ambari-web/app/models/configs/objects/service_config_property.js
--
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js 
b/ambari-web/app/models/configs/objects/service_config_property.js
index 5d306eb..f8ca8a7 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -167,6 +167,14 @@ App.ServiceConfigProperty = Em.Object.extend({
*/
   isCustomGroupConfig: false,
 
+  /**
+   * Determines if config is Undefined label, used for overrides, that do not 
have original property in default group
+   * @type {boolean}
+   */
+  isUndefinedLabel: function () {
+return this.get('displayType') === 'label' && this.get('value') === 
'Undefined';
+  }.property('displayType', 'value'),
+
   error: Em.computed.bool('errorMessage.length'),
   warn: Em.computed.bool('warnMessage.length'),
   hasValidationErrors: Em.computed.bool('validationErrors.length'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f083249/ambari-web/app/views/common/configs/overriddenPropertyRow_view.js
--
diff --git 

[14/50] [abbrv] ambari git commit: AMBARI-21076. ADDENDUM. Delete the remaining DRUID files after moving superset as an independent project. (Nishant Bangarwa via Swapan Shridhar).

2017-09-05 Thread lpuskas
AMBARI-21076. ADDENDUM. Delete the remaining DRUID files after moving superset 
as an independent project. (Nishant Bangarwa via Swapan Shridhar).


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: eef7b7308e33a9da3639611d2e4d47e52f25671c
Parents: 3f08324
Author: Nishant 
Authored: Wed Aug 30 23:43:56 2017 +0530
Committer: Swapan Shridhar 
Committed: Wed Aug 30 12:31:29 2017 -0700

--
 .../0.9.2/configuration/druid-superset-env.xml  | 130 --
 .../0.9.2/configuration/druid-superset.xml  | 178 ---
 .../DRUID/0.9.2/package/scripts/superset.py | 167 -
 .../DRUID/0.9.2/package/templates/superset.sh   |  95 --
 .../0.15.0/configuration/superset-env.xml   | 130 ++
 .../SUPERSET/0.15.0/configuration/superset.xml  | 178 +++
 .../SUPERSET/0.15.0/package/scripts/superset.py | 167 +
 .../0.15.0/package/templates/superset.sh|  95 ++
 8 files changed, 570 insertions(+), 570 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/eef7b730/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset-env.xml
 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset-env.xml
deleted file mode 100644
index 71fa3b6..000
--- 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset-env.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-  
-superset_log_dir
-/var/log/superset
-Superset log dir
-Superset log directory.
-
-  directory
-
-
-  
-  
-superset_pid_dir
-/var/run/superset
-Superset pid dir
-Superset pid directory.
-
-  directory
-
-
-  
-  
-superset_admin_user
-admin
-Superset Admin Username
-
-  Superset Username. This value cannot be modified by Ambari
-  except on initial install. Please make sure the username change in
-  Superset is reflected in Ambari.
-
-
-  db_user
-  false
-
-
-  
-  
-superset_admin_password
-
-PASSWORD
-Superset Admin Password
-
-  Superset password. This value cannot be modified by Ambari
-  except on initial install. Please make sure the password change in
-  Superset is reflected back in Ambari.
-
-
-  false
-  password
-
-
-  
-  
-superset_admin_firstname
-
-
-  
-  
-superset_admin_lastname
-
-
-  
-  
-superset_admin_email
-
-
-  
-  
-superset_user
-Superset User
-superset
-USER
-
-
-  user
-  false
-
-
-  
-  
-content
-superset-env template
-
-  # Set environment variables here.
-  
-  export LC_ALL=en_US.UTF-8
-  export LANG=en_US.UTF-8
-
-  # Superset Home Dir
-  export SUPERSET_CONFIG_DIR={{superset_config_dir}}
-
-  # Superset Log Dir
-  export SUPERSET_LOG_DIR={{superset_log_dir}}
-
-  # Superset Log Dir
-  export SUPERSET_BIN_DIR={{superset_bin_dir}}
-
-  # Superset PID Dir
-  export SUPERSET_PID_DIR={{superset_pid_dir}}
-
-  # Add superset_config.py to PYTHONPATH
-  export PYTHONPATH=$PYTHONPATH:{{superset_config_dir}}
-
-  export SUPERSET_WEBSERVER_PORT={{superset_webserver_port}}
-  export SUPERSET_WEBSERVER_ADDRESS={{superset_webserver_address}}
-  export SUPERSET_TIMEOUT={{superset_timeout}}
-  export SUPERSET_WORKERS={{superset_workers}}
-
-
-  
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/eef7b730/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset.xml
 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset.xml
deleted file mode 100644
index 2fff10a..000
--- 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-superset.xml
+++ /dev/null
@@ -1,178 +0,0 @@
-
-
-
-
-  
-ROW_LIMIT
-5000
-
-  int
-  0
-
-
-
-  
-  
-SUPERSET_WORKERS
-4
-
-  int
-  0
-
-
-
-  
-  
-SUPERSET_WEBSERVER_PORT
-9088
-
-
-  
-  
-   

[40/50] [abbrv] ambari git commit: AMBARI-21307 Groups for the test user returned to the caller

2017-09-05 Thread lpuskas
AMBARI-21307 Groups for the test user returned to the caller


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/374f0975
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/374f0975
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/374f0975

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 374f09754b7bfe50c8db7c05e49e8bf02cca3e65
Parents: 998a042
Author: lpuskas 
Authored: Tue Aug 8 15:50:29 2017 +0200
Committer: lpuskas 
Committed: Tue Sep 5 11:39:22 2017 +0200

--
 .../api/services/ldap/LdapRestService.java  | 16 +-
 .../server/ldap/AmbariLdapConfiguration.java|  2 +-
 .../apache/ambari/server/ldap/LdapModule.java   |  3 +
 .../server/ldap/service/AmbariLdapFacade.java   |  3 +-
 .../ambari/server/ldap/service/LdapFacade.java  |  3 +-
 ...efaultLdapConfigurationValidatorService.java | 25 ++---
 .../ad/DefaultLdapConnectionService.java|  2 +-
 ...ltLdapConfigurationValidatorServiceTest.java | 59 +++-
 8 files changed, 49 insertions(+), 64 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/374f0975/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java
index 33b10fa..8578204 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java
@@ -28,6 +28,8 @@
 
 package org.apache.ambari.server.api.services.ldap;
 
+import java.util.Set;
+
 import javax.inject.Inject;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.POST;
@@ -41,12 +43,16 @@ import org.apache.ambari.server.api.services.BaseService;
 import org.apache.ambari.server.api.services.Result;
 import org.apache.ambari.server.api.services.ResultImpl;
 import org.apache.ambari.server.api.services.ResultStatus;
+import org.apache.ambari.server.controller.internal.ResourceImpl;
+import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.ldap.AmbariLdapConfiguration;
 import org.apache.ambari.server.ldap.LdapConfigurationFactory;
 import org.apache.ambari.server.ldap.service.LdapFacade;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.collect.Sets;
+
 /**
  * Endpoint designated to LDAP specific operations.
  */
@@ -68,6 +74,8 @@ public class LdapRestService extends BaseService {
   @Consumes(MediaType.APPLICATION_JSON)
   public Response validateConfiguration(LdapCheckConfigurationRequest 
ldapCheckConfigurationRequest) {
 
+Set groups = Sets.newHashSet();
+
 Result result = new ResultImpl(new ResultStatus(ResultStatus.STATUS.OK));
 try {
 
@@ -86,7 +94,11 @@ public class LdapRestService extends BaseService {
 case "test-attributes":
 
   LOGGER.info("Testing LDAP attributes ");
-  
ldapFacade.checkLdapAttibutes(ldapCheckConfigurationRequest.getRequestInfo().getParameters(),
 ambariLdapConfiguration);
+  groups = 
ldapFacade.checkLdapAttibutes(ldapCheckConfigurationRequest.getRequestInfo().getParameters(),
 ambariLdapConfiguration);
+  // todo factor out the resource creation, design better the 
structure in the response
+  Resource resource = new 
ResourceImpl(Resource.Type.AmbariConfiguration);
+  resource.setProperty("groups", groups);
+  result.getResultTree().addChild(resource, "payload");
 
   break;
 case "detect-attributes":
@@ -101,7 +113,7 @@ public class LdapRestService extends BaseService {
   }
 
 } catch (Exception e) {
-  result = new ResultImpl(new 
ResultStatus(ResultStatus.STATUS.BAD_REQUEST, e));
+  result.setResultStatus(new ResultStatus(ResultStatus.STATUS.BAD_REQUEST, 
e));
 }
 
 return 
Response.status(result.getStatus().getStatusCode()).entity(getResultSerializer().serialize(result)).build();

http://git-wip-us.apache.org/repos/asf/ambari/blob/374f0975/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java
index a6ff80b..8ab587b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/ldap/AmbariLdapConfiguration.java
+++ 

[36/50] [abbrv] ambari git commit: AMBARI-21832. Reject PATCH VDFs with Services that are not Included in the Cluster (dlysnichenko)

2017-09-05 Thread lpuskas
AMBARI-21832. Reject PATCH VDFs with Services that are not Included in the 
Cluster (dlysnichenko)


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: c091ebe8afa1d83384d5607fb4ee52eb018772b0
Parents: c51540d
Author: Lisnichenko Dmitro 
Authored: Mon Sep 4 19:33:11 2017 +0300
Committer: Lisnichenko Dmitro 
Committed: Mon Sep 4 19:33:11 2017 +0300

--
 .../ClusterStackVersionResourceProvider.java| 45 +-
 ...ClusterStackVersionResourceProviderTest.java | 94 +++-
 2 files changed, 136 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c091ebe8/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
index 19f5895..3e4d4fd 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
@@ -20,6 +20,7 @@ package org.apache.ambari.server.controller.internal;
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.JDK_LOCATION;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.EnumSet;
@@ -77,6 +78,8 @@ import org.apache.ambari.server.state.RepositoryVersionState;
 import org.apache.ambari.server.state.ServiceComponentHost;
 import org.apache.ambari.server.state.ServiceOsSpecific;
 import org.apache.ambari.server.state.StackId;
+import org.apache.ambari.server.state.StackInfo;
+import org.apache.ambari.server.state.repository.AvailableService;
 import org.apache.ambari.server.state.repository.ClusterVersionSummary;
 import org.apache.ambari.server.state.repository.VersionDefinitionXml;
 import org.apache.ambari.server.state.stack.upgrade.RepositoryVersionHelper;
@@ -184,6 +187,9 @@ public class ClusterStackVersionResourceProvider extends 
AbstractControllerResou
   private static Gson gson;
 
   @Inject
+  private static Provider metaInfo;
+
+  @Inject
   private static Provider clusters;
 
   /**
@@ -558,6 +564,9 @@ public class ClusterStackVersionResourceProvider extends 
AbstractControllerResou
   // determine services for the repo
   Set serviceNames = new HashSet<>();
 
+
+  checkPatchVDFAvailableServices(cluster, repoVersionEnt, 
desiredVersionDefinition);
+
   // !!! limit the serviceNames to those that are detailed for the 
repository.
   // TODO packages don't have component granularity
   if (RepositoryType.STANDARD != repoVersionEnt.getType()) {
@@ -596,6 +605,38 @@ public class ClusterStackVersionResourceProvider extends 
AbstractControllerResou
 return req;
   }
 
+  /**
+   * Reject PATCH VDFs with Services that are not included in the Cluster
+   * @param cluster cluster instance
+   * @param repoVersionEnt repo version entity
+   * @param desiredVersionDefinition VDF
+   * @throws IllegalArgumentException thrown if VDF includes services that are 
not installed
+   * @throws AmbariException thrown if could not load stack for repo 
repoVersionEnt
+   */
+  protected void checkPatchVDFAvailableServices(Cluster cluster, 
RepositoryVersionEntity repoVersionEnt,
+  VersionDefinitionXml 
desiredVersionDefinition) throws SystemException, AmbariException {
+if (repoVersionEnt.getType() == RepositoryType.PATCH) {
+
+  Collection notPresentServices = new ArrayList<>();
+  Collection presentServices = new ArrayList<>();
+
+  presentServices.addAll(cluster.getServices().keySet());
+  final StackInfo stack;
+  stack = metaInfo.get().getStack(repoVersionEnt.getStackName(), 
repoVersionEnt.getStackVersion());
+
+  for (AvailableService availableService : 
desiredVersionDefinition.getAvailableServices(stack)) {
+String name = availableService.getName();
+if (!presentServices.contains(name)) {
+  notPresentServices.add(name);
+}
+  }
+  if (!notPresentServices.isEmpty()) {
+throw new IllegalArgumentException(String.format("%s VDF includes 
services that are not installed: %s",
+

[47/50] [abbrv] ambari git commit: AMBARI-21307 renamed package, minor corrections. Changed endpoint name

2017-09-05 Thread lpuskas
AMBARI-21307 renamed package, minor corrections. Changed endpoint name


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/30b64152
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/30b64152
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/30b64152

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 30b64152ff3215a5595a56541c7e5c3fa57d9968
Parents: 97ec65e
Author: lpuskas 
Authored: Mon Aug 14 13:21:07 2017 +0200
Committer: lpuskas 
Committed: Tue Sep 5 11:39:23 2017 +0200

--
 .../services/AmbariConfigurationService.java|   2 +-
 .../api/services/ldap/LdapRestService.java  |  15 +-
 .../server/ldap/AmbariLdapConfiguration.java|   5 +-
 .../apache/ambari/server/ldap/LdapModule.java   |   4 +-
 ...efaultLdapConfigurationValidatorService.java | 243 ---
 .../ad/DefaultLdapConnectionService.java|  63 -
 ...efaultLdapConfigurationValidatorService.java | 243 +++
 .../ads/DefaultLdapConnectionService.java   |  63 +
 ...ltLdapConfigurationValidatorServiceTest.java | 113 -
 ...ltLdapConfigurationValidatorServiceTest.java | 113 +
 10 files changed, 435 insertions(+), 429 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/30b64152/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
index 927e518..492509f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
@@ -63,7 +63,7 @@ import io.swagger.annotations.ApiResponses;
  * }
  * 
  */
-@Path("/configurations/")
+@Path("/ambariconfigs/")
 @Api(value = "Ambari Configurations", description = "Endpoint for Ambari 
configuration related operations")
 public class AmbariConfigurationService extends BaseService {
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/30b64152/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java
index 8578204..4e654dc 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapRestService.java
@@ -34,6 +34,7 @@ import javax.inject.Inject;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
@@ -70,8 +71,9 @@ public class LdapRestService extends BaseService {
 
   @POST
   @ApiIgnore // until documented
-  @Path("/action") // todo this needs to be moved under the resource
+  @Path("/validate") // todo this needs to be moved under the resource
   @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
   public Response validateConfiguration(LdapCheckConfigurationRequest 
ldapCheckConfigurationRequest) {
 
 Set groups = Sets.newHashSet();
@@ -95,10 +97,7 @@ public class LdapRestService extends BaseService {
 
   LOGGER.info("Testing LDAP attributes ");
   groups = 
ldapFacade.checkLdapAttibutes(ldapCheckConfigurationRequest.getRequestInfo().getParameters(),
 ambariLdapConfiguration);
-  // todo factor out the resource creation, design better the 
structure in the response
-  Resource resource = new 
ResourceImpl(Resource.Type.AmbariConfiguration);
-  resource.setProperty("groups", groups);
-  result.getResultTree().addChild(resource, "payload");
+  setResult(groups, result);
 
   break;
 case "detect-attributes":
@@ -119,6 +118,12 @@ public class LdapRestService extends BaseService {
 return 
Response.status(result.getStatus().getStatusCode()).entity(getResultSerializer().serialize(result)).build();
   }
 
+  private void setResult(Set groups, Result result) {
+Resource resource = new ResourceImpl(Resource.Type.AmbariConfiguration);
+resource.setProperty("groups", groups);
+result.getResultTree().addChild(resource, "payload");
+  }
+
   private void validateRequest(LdapCheckConfigurationRequest 

[42/50] [abbrv] ambari git commit: AMBARI-21307 Implemented PUT operation, added unit tests

2017-09-05 Thread lpuskas
AMBARI-21307 Implemented PUT operation, added unit tests


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/02390ab3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/02390ab3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/02390ab3

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 02390ab3de4c579c61d2256b8e295325b8ae16c6
Parents: ab16081
Author: lpuskas 
Authored: Thu Jul 13 16:20:58 2017 +0200
Committer: lpuskas 
Committed: Tue Sep 5 11:39:22 2017 +0200

--
 .../services/AmbariConfigurationService.java|  89 ---
 .../server/controller/ControllerModule.java |   2 +
 .../controller/ResourceProviderFactory.java |  23 +-
 .../AbstractControllerResourceProvider.java |   2 +
 .../AmbariConfigurationResourceProvider.java|  88 +--
 .../internal/DefaultProviderModule.java |   2 -
 .../server/orm/dao/AmbariConfigurationDAO.java  |   4 +
 ...AmbariConfigurationResourceProviderTest.java | 231 +++
 8 files changed, 363 insertions(+), 78 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/02390ab3/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
index 0c159b9..0632361 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
@@ -56,16 +56,10 @@ import io.swagger.annotations.ApiResponses;
  *"data": [
  *{
  * "authentication.ldap.primaryUrl": "localhost:33389"
- *},
- *{
- *"authentication.ldap.secondaryUrl": "localhost:333"
- * },
- * {
+   "authentication.ldap.secondaryUrl": "localhost:333"
  * "authentication.ldap.baseDn": "dc=ambari,dc=apache,dc=org"
- * }
- * // ..
- * ]
- * }
+  * // ..
+ * ]
  * }
  * 
  */
@@ -74,7 +68,7 @@ import io.swagger.annotations.ApiResponses;
 public class AmbariConfigurationService extends BaseService {
 
   private static final String AMBARI_CONFIGURATION_REQUEST_TYPE =
-  
"org.apache.ambari.server.api.services.AmbariConfigurationRequestSwagger";
+"org.apache.ambari.server.api.services.AmbariConfigurationRequestSwagger";
 
   /**
* Creates an ambari configuration resource.
@@ -87,9 +81,9 @@ public class AmbariConfigurationService extends BaseService {
   @POST
   @Produces(MediaType.TEXT_PLAIN)
   @ApiOperation(value = "Creates an ambari configuration resource",
-  nickname = "AmbariConfigurationService#createAmbariConfiguration")
+nickname = "AmbariConfigurationService#createAmbariConfiguration")
   @ApiImplicitParams({
-  @ApiImplicitParam(dataType = AMBARI_CONFIGURATION_REQUEST_TYPE, 
paramType = PARAM_TYPE_BODY)
+@ApiImplicitParam(dataType = AMBARI_CONFIGURATION_REQUEST_TYPE, paramType 
= PARAM_TYPE_BODY)
   })
   @ApiResponses({
 @ApiResponse(code = HttpStatus.SC_CREATED, message = 
MSG_SUCCESSFUL_OPERATION),
@@ -108,24 +102,24 @@ public class AmbariConfigurationService extends 
BaseService {
   @GET
   @Produces(MediaType.TEXT_PLAIN)
   @ApiOperation(value = "Retrieve all ambari configuration resources",
-  nickname = "AmbariConfigurationService#getAmbariConfigurations",
-  notes = "Returns all Ambari configurations.",
-  response = AmbariConfigurationResponseSwagger.class,
-  responseContainer = RESPONSE_CONTAINER_LIST)
+nickname = "AmbariConfigurationService#getAmbariConfigurations",
+notes = "Returns all Ambari configurations.",
+response = AmbariConfigurationResponseSwagger.class,
+responseContainer = RESPONSE_CONTAINER_LIST)
   @ApiImplicitParams({
-  @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION,
-  defaultValue = "AmbariConfiguration/data, AmbariConfiguration/id, 
AmbariConfiguration/type",
-  dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
-  @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION,
-  defaultValue = "AmbariConfiguration/id",
-  dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
-  @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = 
QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = 
DATA_TYPE_INT, paramType = 

[26/50] [abbrv] ambari git commit: AMBARI-21862. Unable to remove override from config group (akovalenko)

2017-09-05 Thread lpuskas
AMBARI-21862. Unable to remove override from config group (akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3fd40043
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3fd40043
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3fd40043

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 3fd40043f1b68e9b29d046cfc8b3285d4ef7ee35
Parents: 638fc70
Author: Aleksandr Kovalenko 
Authored: Thu Aug 31 16:39:17 2017 +0300
Committer: Aleksandr Kovalenko 
Committed: Thu Aug 31 18:05:20 2017 +0300

--
 .../app/mixins/common/configs/configs_saver.js  | 12 +++--
 .../mixins/common/configs/configs_saver_test.js | 55 ++--
 2 files changed, 58 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3fd40043/ambari-web/app/mixins/common/configs/configs_saver.js
--
diff --git a/ambari-web/app/mixins/common/configs/configs_saver.js 
b/ambari-web/app/mixins/common/configs/configs_saver.js
index f11cdd0..6e7af4a 100644
--- a/ambari-web/app/mixins/common/configs/configs_saver.js
+++ b/ambari-web/app/mixins/common/configs/configs_saver.js
@@ -135,7 +135,7 @@ App.ConfigsSaverMixin = Em.Mixin.create({
   if (configGroup && !configGroup.get('isDefault')) {
 var overriddenConfigs = this.getConfigsForGroup(configs, 
configGroup.get('name'));
 
-if (Em.isArray(overriddenConfigs) && 
this.isOverriddenConfigsModified(overriddenConfigs)) {
+if (Em.isArray(overriddenConfigs) && 
this.isOverriddenConfigsModified(overriddenConfigs, configGroup)) {
   var successCallback = this.get('content.serviceName') === 
serviceName ? 'putConfigGroupChangesSuccess' : null;
   this.saveGroup(overriddenConfigs, configGroup, 
this.get('serviceConfigVersionNote'), successCallback);
 }
@@ -147,10 +147,14 @@ App.ConfigsSaverMixin = Em.Mixin.create({
* @param {Array} overriddenConfigs
* @returns {boolean}
*/
-  isOverriddenConfigsModified: function(overriddenConfigs) {
-return overriddenConfigs.some(function(config) {
-  return config.get('savedValue') !== config.get('value');
+  isOverriddenConfigsModified: function(overriddenConfigs, group) {
+var hasChangedConfigs = overriddenConfigs.some(function(config) {
+  return config.get('savedValue') !== config.get('value') || 
config.get('savedIsFinal') !== config.get('isFinal');
 });
+var overriddenConfigsNames = overriddenConfigs.mapProperty('name');
+return hasChangedConfigs || group.get('properties').some(function 
(property) {
+return !overriddenConfigsNames.contains(Em.get(property, 'name'));
+  });
   },
 
   saveConfigsForDefaultGroup: function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3fd40043/ambari-web/test/mixins/common/configs/configs_saver_test.js
--
diff --git a/ambari-web/test/mixins/common/configs/configs_saver_test.js 
b/ambari-web/test/mixins/common/configs/configs_saver_test.js
index e8e03ea..9099e54 100644
--- a/ambari-web/test/mixins/common/configs/configs_saver_test.js
+++ b/ambari-web/test/mixins/common/configs/configs_saver_test.js
@@ -1196,18 +1196,63 @@ describe('App.ConfigsSaverMixin', function() {
 it('no configs modified', function() {
   expect(mixin.isOverriddenConfigsModified([
 Em.Object.create({
+ name: '1',
   savedValue: '1',
-  value: '1'
+  value: '1',
+  isFinal: false,
+  savedIsFinal: false
 })
-  ])).to.be.false;
+  ], Em.Object.create({
+properties: [
+  {name: '1'}
+]
+  }))).to.be.false;
 });
-it('one config modified', function() {
+it('config value modified', function() {
   expect(mixin.isOverriddenConfigsModified([
 Em.Object.create({
+  name: '2',
   savedValue: '1',
-  value: '2'
+  value: '2',
+  isFinal: false,
+  savedIsFinal: false
+})
+  ], Em.Object.create({
+properties: [
+  {name: '2'}
+]
+  }))).to.be.true;
+});
+it('config isFinal modified', function() {
+  expect(mixin.isOverriddenConfigsModified([
+Em.Object.create({
+  name: '2',
+  savedValue: '2',
+  value: '2',
+  isFinal: true,
+  savedIsFinal: false
 })
-  ])).to.be.true;
+  ], Em.Object.create({
+properties: [
+  {name: '2'}
+]
+  }))).to.be.true;
+});
+it('one config removed', function() {
+  expect(mixin.isOverriddenConfigsModified([
+Em.Object.create({
+  name: '3',

[24/50] [abbrv] ambari git commit: AMBARI-21778. Patch Confirmation Message Incorrectly Lists All Hosts (alexantonenko)

2017-09-05 Thread lpuskas
AMBARI-21778. Patch Confirmation Message Incorrectly Lists All Hosts 
(alexantonenko)


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: ff23a2e325cdf42c9736be29ded262831f1c2a68
Parents: a66c01d
Author: Alex Antonenko 
Authored: Thu Aug 31 16:25:09 2017 +0300
Committer: Alex Antonenko 
Committed: Thu Aug 31 16:25:09 2017 +0300

--
 ambari-web/app/messages.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ff23a2e3/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 0982562..c4e4492 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1731,7 +1731,7 @@ Em.I18n.translations = {
   'admin.stackVersions.editRepositories.info': 'Provide Base URLs for the 
Operating Systems you are configuring.',
   'admin.stackVersions.editRepositories.validation.warning': 'Some of the 
repositories failed validation. Make changes to the base url or skip validation 
if you are sure that urls are correct',
   'admin.stackVersions.version.install.confirm': 'You are about to install 
packages for version {0} on all hosts.',
-  'admin.stackVersions.version.install.patch.confirm': 'You are about to 
install packages for version {0} on all hosts for the 
following services:',
+  'admin.stackVersions.version.install.patch.confirm': 'You are about to 
install packages for version {0} on hosts which contain the 
following services:',
   'admin.stackVersions.version.linkTooltip': 'Click to Edit Repositories',
   'admin.stackVersions.version.hostsTooltip': 'Click to List Hosts',
   'admin.stackVersions.version.emptyHostsTooltip': 'No Hosts to List',



[20/50] [abbrv] ambari git commit: AMBARI-21839 METRICS_MONITOR start is failing due to "ImportError: cannot import name _common" (dsen)

2017-09-05 Thread lpuskas
AMBARI-21839 METRICS_MONITOR start is failing due to "ImportError: cannot 
import name _common" (dsen)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9f1331a7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9f1331a7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9f1331a7

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 9f1331a7dfc8d7f38ea1cc872afb68ccf84dbc48
Parents: 2fc7453
Author: Dmytro Sen 
Authored: Thu Aug 31 12:31:43 2017 +0300
Committer: Dmytro Sen 
Committed: Thu Aug 31 12:31:43 2017 +0300

--
 .../conf/unix/ambari-metrics-monitor | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9f1331a7/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
--
diff --git 
a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
 
b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
index 9bbb271..4980b8e 100644
--- 
a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
+++ 
b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
@@ -98,23 +98,26 @@ else
   exit 1
 fi
 
+# Set log directory path
+if [[ -n "${AMS_MONITOR_LOG_DIR}" ]]; then
+  OUTFILE=${AMS_MONITOR_LOG_DIR}/ambari-metrics-monitor.out
+fi
+
 #TODO decide if rebuild on each start (pretty quickly) to tolerate major node 
changes (like kernel update)
 #build psutil
 if [ ! "$(ls -A ${RESOURCE_MONITORING_DIR}/psutil/build)" ]; then
   echo "Building psutil..."
   dir=$(pwd)
   cd "${RESOURCE_MONITORING_DIR}/psutil"
-  ${PYTHON} "setup.py" "build"
+  # build psutil and redirect output to log file
+  echo "--Building psutil--" 
>> ${OUTFILE}
+  ${PYTHON} "setup.py" "build" >> ${OUTFILE}
+  echo "--Finished building psutil-" 
>> ${OUTFILE}
   cd "${dir}"
 else
   echo "psutil build directory is not empty, continuing..."
 fi
 
-# Set log directory path
-if [[ -n "${AMS_MONITOR_LOG_DIR}" ]]; then
-  OUTFILE=${AMS_MONITOR_LOG_DIR}/ambari-metrics-monitor.out
-fi
-
 # Set pid directory path
 if [[ -n "${AMS_MONITOR_PID_DIR}" ]]; then
   PIDFILE=${AMS_MONITOR_PID_DIR}/ambari-metrics-monitor.pid



[05/50] [abbrv] ambari git commit: AMBARI-21841. Green Version Bubbles Are Selected Multiple Times For Patched Services (alexantonenko)

2017-09-05 Thread lpuskas
AMBARI-21841. Green Version Bubbles Are Selected Multiple Times For Patched 
Services (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/138caea7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/138caea7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/138caea7

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 138caea7bed0e35cb2ad1d83ef53d2b982210171
Parents: 4b04a32
Author: Alex Antonenko 
Authored: Wed Aug 30 12:19:25 2017 +0300
Committer: Alex Antonenko 
Committed: Wed Aug 30 12:19:25 2017 +0300

--
 ambari-web/app/assets/test/tests.js |   1 +
 .../models/stack_version/repository_version.js  |   7 +-
 .../upgrade_version_column_view.js  |  30 +++--
 .../upgrade_version_column_view_test.js | 125 +++
 4 files changed, 150 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/138caea7/ambari-web/app/assets/test/tests.js
--
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index 432479d..03b4657 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -280,6 +280,7 @@ var files = [
   'test/views/main/alerts/add_alert_definition/step3_view_test',
   
'test/views/main/alerts/manage_alert_groups/select_definitions_popup_body_view_test',
   'test/views/main/admin/stack_upgrade/upgrade_version_box_view_test',
+  'test/views/main/admin/stack_upgrade/upgrade_version_column_view_test',
   'test/views/main/admin/stack_upgrade/upgrade_group_view_test',
   'test/views/main/admin/stack_upgrade/upgrade_task_view_test',
   'test/views/main/admin/stack_upgrade/upgrade_wizard_view_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/138caea7/ambari-web/app/models/stack_version/repository_version.js
--
diff --git a/ambari-web/app/models/stack_version/repository_version.js 
b/ambari-web/app/models/stack_version/repository_version.js
index 3cb22b0..b99bb6f 100644
--- a/ambari-web/app/models/stack_version/repository_version.js
+++ b/ambari-web/app/models/stack_version/repository_version.js
@@ -118,7 +118,12 @@ App.RepositoryVersion = DS.Model.extend({
   /**
* @type {boolean}
*/
-  isVisible: true
+  isVisible: true,
+
+  /**
+   * @type {boolean}
+   */
+  isCurrent: Em.computed.equal('status', 'CURRENT')
 });
 
 App.RepositoryVersion.FIXTURES = [];

http://git-wip-us.apache.org/repos/asf/ambari/blob/138caea7/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
index 0c4408d..11ac1cb 100644
--- 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
+++ 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
@@ -48,6 +48,7 @@ App.UpgradeVersionColumnView = 
App.UpgradeVersionBoxView.extend({
 var originalServices = this.get('content.stackServices');
 // sort the services in the order the same as service menu
 return App.Service.find().map(function (service) {
+
   var stackService = originalServices.findProperty('name', 
service.get('serviceName'));
   return Em.Object.create({
 displayName: service.get('displayName'),
@@ -102,19 +103,24 @@ App.UpgradeVersionColumnView = 
App.UpgradeVersionBoxView.extend({
* @returns {boolean}
*/
   isStackServiceAvailable: function(stackService) {
-var appliedPatchVersions = 
App.RepositoryVersion.find().filterProperty('isPatch').filterProperty('status', 
'CURRENT');
-var appliedPatchServices = [];
-appliedPatchVersions.forEach(function(version) {
-  var availableServices = 
version.get('stackServices').toArray().filterProperty('isAvailable').mapProperty('name');
-  appliedPatchServices = 
appliedPatchServices.concat(availableServices).uniq();
-});
-if (stackService) {
-  if (this.get('content.isStandard') && 
appliedPatchServices.contains(stackService.get('name'))) {
-return false;
-  }
-  return stackService.get('isAvailable');
+if (!stackService) {
+  return false;
+}
+if ( this.get('content.isCurrent') ){
+  // if version is current, check whether this service is available and 
the version itself is the newest version of all versions that contain the same 
service
+  var serviceWithHigherVersion =  
App.RepositoryVersion.find().filterProperty('isCurrent').find(function ( 

[22/50] [abbrv] ambari git commit: AMBARI-21852 Add Host wizard breaks on large clusters when persisting data in localStorage. (atkach)

2017-09-05 Thread lpuskas
AMBARI-21852 Add Host wizard breaks on large clusters when persisting data in 
localStorage. (atkach)


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: d1d6df9030efa316fa6ccc227ed3148899a7760c
Parents: 12c22ed
Author: Andrii Tkach 
Authored: Thu Aug 31 13:25:57 2017 +0300
Committer: Andrii Tkach 
Committed: Thu Aug 31 14:09:28 2017 +0300

--
 ambari-web/app/controllers/installer.js| 12 +++-
 ambari-web/app/controllers/wizard.js   |  6 +-
 ambari-web/app/mixins/wizard/wizardHostsLoading.js |  2 +-
 ambari-web/app/utils/ajax/ajax.js  |  2 +-
 ambari-web/app/utils/db.js |  8 
 ambari-web/app/views/main/service/reassign_view.js |  2 +-
 ambari-web/test/controllers/wizard_test.js |  4 ++--
 .../resourceManager/wizard_view_test.js| 11 ++-
 .../test/views/main/service/reassign_view_test.js  | 13 +++--
 9 files changed, 22 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d1d6df90/ambari-web/app/controllers/installer.js
--
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index d149379..b17cc1f 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -83,7 +83,9 @@ App.InstallerController = 
App.WizardController.extend(App.Persist, {
 'recommendations',
 'recommendationsHostGroups',
 'recommendationsConfigs',
-'componentsFromConfigs'
+'componentsFromConfigs',
+'operatingSystems',
+'repositories'
   ],
 
   init: function () {
@@ -127,14 +129,6 @@ App.InstallerController = 
App.WizardController.extend(App.Persist, {
   },
 
   /**
-   * Load confirmed hosts.
-   * Will be used at Assign Masters(step5) step
-   */
-  loadConfirmedHosts: function () {
-this.set('content.hosts', this.getDBProperty('hosts') || {});
-  },
-
-  /**
* Load services data. Will be used at Select services(step4) 
step
*/
   loadServices: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1d6df90/ambari-web/app/controllers/wizard.js
--
diff --git a/ambari-web/app/controllers/wizard.js 
b/ambari-web/app/controllers/wizard.js
index d709d7e..573bd8d 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -1252,11 +1252,7 @@ App.WizardController = 
Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
* Will be used at Assign Masters(step5) step
*/
   loadConfirmedHosts: function () {
-var hosts = App.db.getHosts();
-
-if (hosts) {
-  this.set('content.hosts', hosts);
-}
+this.set('content.hosts', this.getDBProperty('hosts') || {});
   },
 
   loadHosts: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1d6df90/ambari-web/app/mixins/wizard/wizardHostsLoading.js
--
diff --git a/ambari-web/app/mixins/wizard/wizardHostsLoading.js 
b/ambari-web/app/mixins/wizard/wizardHostsLoading.js
index 950b51e..db3c7aa 100644
--- a/ambari-web/app/mixins/wizard/wizardHostsLoading.js
+++ b/ambari-web/app/mixins/wizard/wizardHostsLoading.js
@@ -59,7 +59,7 @@ App.WizardHostsLoading = Em.Mixin.create({
 isInstalled: true
   };
 });
-App.db.setHosts(hosts);
+this.get('controller').setDBProperty('hosts', hosts);
 this.set('controller.content.hosts', hosts);
 this.set('isLoaded', true);
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1d6df90/ambari-web/app/utils/ajax/ajax.js
--
diff --git a/ambari-web/app/utils/ajax/ajax.js 
b/ambari-web/app/utils/ajax/ajax.js
index 260417c..941f5a1 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -2623,7 +2623,7 @@ var urls = {
 'mock': ''
   },
   'hosts.confirmed': {
-'real': 
'/clusters/{clusterName}/hosts?fields=Hosts/cpu_count,Hosts/disk_info,Hosts/total_mem,Hosts/os_type,Hosts/os_arch,Hosts/ip,Hosts/maintenance_state,host_components/HostRoles/state_response=true',
+'real': 
'/clusters/{clusterName}/hosts?fields=host_components/HostRoles/state_response=true',
 'mock': '/data/hosts/HDP2/hosts.json'
   },
   'hosts.with_searchTerm': {


[31/50] [abbrv] ambari git commit: AMBARI-21809. Pre-configure services during stack upgrade if Kerberos is enabled to reduce number of core service restarts when services are added (rlevas)

2017-09-05 Thread lpuskas
AMBARI-21809. Pre-configure services during stack upgrade if Kerberos is 
enabled to reduce number of core service restarts when services are added 
(rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5230d935
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5230d935
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5230d935

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 5230d93545c30ab06d49f9cbac25974b1462f914
Parents: e20c064
Author: Robert Levas 
Authored: Fri Sep 1 12:31:23 2017 -0400
Committer: Robert Levas 
Committed: Fri Sep 1 12:31:23 2017 -0400

--
 .../controller/DeleteIdentityHandler.java   |   2 +-
 .../server/controller/KerberosHelper.java   |  65 +-
 .../server/controller/KerberosHelperImpl.java   | 142 ++--
 .../PrepareDisableKerberosServerAction.java |  33 +-
 .../PrepareEnableKerberosServerAction.java  |   3 +-
 .../PrepareKerberosIdentitiesServerAction.java  |   5 +-
 .../upgrades/PreconfigureKerberosAction.java| 573 +++
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml |  12 +
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml |  12 +
 .../PreconfigureKerberosActionTest.java | 596 +++
 .../PreconfigureActionTest_cluster_config.json  | 110 +++
 ...ureActionTest_kerberos_descriptor_stack.json | 713 ++
 ..._kerberos_descriptor_stack_preconfigure.json | 730 +++
 13 files changed, 2920 insertions(+), 76 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5230d935/ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java
index 978b329..a7b9d80 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java
@@ -246,7 +246,7 @@ class DeleteIdentityHandler {
  * The service configuration is needed because principal names may contain 
placeholder variables which are replaced based on the service configuration.
  */
 private Map> 
calculateConfig(KerberosDescriptor kerberosDescriptor, Set 
serviceNames) throws AmbariException {
-  Map> actualConfig = 
getKerberosHelper().calculateConfigurations(getCluster(), null, 
kerberosDescriptor.getProperties());
+  Map> actualConfig = 
getKerberosHelper().calculateConfigurations(getCluster(), null, 
kerberosDescriptor, false, false);
   extendWithDeletedConfigOfService(actualConfig, serviceNames);
   return actualConfig;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5230d935/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
index 9bdb377..bb360b5 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
@@ -36,6 +36,7 @@ import 
org.apache.ambari.server.serveraction.kerberos.KerberosOperationException
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.SecurityType;
 import org.apache.ambari.server.state.ServiceComponentHost;
+import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.kerberos.KerberosConfigurationDescriptor;
 import org.apache.ambari.server.state.kerberos.KerberosDescriptor;
 import org.apache.ambari.server.state.kerberos.KerberosIdentityDescriptor;
@@ -510,6 +511,30 @@ public interface KerberosHelper {
   throws AmbariException;
 
   /**
+   * Gets the Kerberos descriptor for the requested stack.
+   * 
+   * One of the following Kerberos descriptors will be returned:
+   * 
+   * {@link KerberosDescriptorType#STACK}
+   * A Kerberos descriptor built using data from the current stack 
definition, only
+   * {@link KerberosDescriptorType#USER}
+   * A Kerberos descriptor built using user-specified data stored as an 
artifact of the cluster, only
+   * {@link KerberosDescriptorType#COMPOSITE}
+   * A Kerberos descriptor built using data from the current stack 
definition with user-specified data stored as an artifact of the 

[07/50] [abbrv] ambari git commit: AMBARI-21847 Refactor stack version column view. (atkach)

2017-09-05 Thread lpuskas
AMBARI-21847 Refactor stack version column view. (atkach)


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 4238781810d8c8236626b204a39353f1f33e8e49
Parents: 418be51
Author: Andrii Tkach 
Authored: Tue Aug 29 22:04:57 2017 +0300
Committer: Andrii Tkach 
Committed: Wed Aug 30 12:46:50 2017 +0300

--
 .../stack_upgrade/upgrade_version_box_view.js   | 187 --
 .../upgrade_version_box_view_test.js| 241 +++
 2 files changed, 354 insertions(+), 74 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/42387818/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
index ec3b4c9..84612ab 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
@@ -161,15 +161,11 @@ App.UpgradeVersionBoxView = Em.View.extend({
* TODO remove isUpgrading condition when transition of version 
states in API fixed
*/
   stateElement: function () {
-var currentVersion = this.get('controller.currentVersion');
 var statePropertiesMap = this.get('statePropertiesMap');
-var requestInProgressRepoId = 
this.get('controller.requestInProgressRepoId');
 var status = this.get('content.status');
 var element = Em.Object.create({
   status: status,
-  isInstalling: function () {
-return this.get('status') === 'INSTALLING';
-  }.property('status'),
+  isInstalling: Em.computed.equal('status', 'INSTALLING'),
   buttons: [],
   isDisabled: false
 });
@@ -182,79 +178,16 @@ App.UpgradeVersionBoxView = Em.View.extend({
   element.setProperties(statePropertiesMap[status]);
 }
 else if (status === 'NOT_REQUIRED') {
-  var isDisabledOnInit = this.isDisabledOnInit();
-  requestInProgressRepoId && requestInProgressRepoId == 
this.get('content.id') ? element.setProperties(statePropertiesMap['LOADING']) : 
element.setProperties(statePropertiesMap[status]);
-  element.set('isDisabled', isDisabledOnInit);
-  element.set('isButtonGroup', true);
-  element.set('isButton', false);
-  element.get('buttons').pushObject({
-text: Em.I18n.t('common.discard'),
-action: 'confirmDiscardRepoVersion',
-isDisabled: isDisabledOnInit
-  });
+  this.processNotRequiredState(element);
 }
-else if ((status === 'INSTALLED' && !this.get('isUpgrading')) ||
- (['INSTALL_FAILED', 'OUT_OF_SYNC'].contains(status))) {
-  if (stringUtils.compareVersions(this.get('content.repositoryVersion'), 
Em.get(currentVersion, 'repository_version')) === 1) {
-var isDisabled = this.isDisabledOnInstalled();
-element.set('isButtonGroup', true);
-if (status === 'OUT_OF_SYNC') {
-  element.set('text', this.get('isVersionColumnView') ? 
Em.I18n.t('common.reinstall') : 
Em.I18n.t('admin.stackVersions.version.reinstall'));
-  element.set('action', 'installRepoVersionConfirmation');
-  element.get('buttons').pushObject({
-text: this.get('isVersionColumnView') ? 
Em.I18n.t('common.upgrade') : 
Em.I18n.t('admin.stackVersions.version.performUpgrade'),
-action: 'confirmUpgrade',
-isDisabled: isDisabled
-  });
-} else {
-  element.set('text', this.get('isVersionColumnView') ? 
Em.I18n.t('common.upgrade') : 
Em.I18n.t('admin.stackVersions.version.performUpgrade'));
-  element.set('action', 'confirmUpgrade');
-  element.get('buttons').pushObject({
-text: this.get('isVersionColumnView') ? 
Em.I18n.t('common.reinstall') : 
Em.I18n.t('admin.stackVersions.version.reinstall'),
-action: 'installRepoVersionConfirmation',
-isDisabled: isDisabled
-  });
-  if (this.get('content.isPatch')) {
-element.get('buttons').pushObject({
-  text: Em.I18n.t('common.discard'),
-  action: 'confirmDiscardRepoVersion',
-  isDisabled: isDisabled
-});
-  }
-}
-element.set('isDisabled', isDisabled);
-  }
-  else {
-element.setProperties(statePropertiesMap['INSTALLED']);
-  }
+else if ((status === 'INSTALLED' && !this.get('isUpgrading')) || 
(['INSTALL_FAILED', 

[19/50] [abbrv] ambari git commit: AMBARI-21851. Allow Hidden Repos To Become Visible So They Can Be Made Visible Permanently (alexantonenko)

2017-09-05 Thread lpuskas
AMBARI-21851. Allow Hidden Repos To Become Visible So They Can Be Made Visible 
Permanently (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2fc74535
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2fc74535
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2fc74535

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 2fc74535d79e4f677233f6caf12166bc7f837c2a
Parents: 7758a51
Author: Alex Antonenko 
Authored: Thu Aug 31 11:56:35 2017 +0300
Committer: Alex Antonenko 
Committed: Thu Aug 31 11:56:35 2017 +0300

--
 .../stackVersions/StackVersionsListCtrl.js| 18 ++
 .../ui/admin-web/app/scripts/i18n.config.js   |  1 +
 .../admin-web/app/views/stackVersions/list.html   |  2 ++
 3 files changed, 21 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2fc74535/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js
index 8d75e79..03088d5 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js
@@ -192,4 +192,22 @@ angular.module('ambariAdminConsole')
 || (filter.cluster.current && filter.cluster.current.value)
 || (filter.stack.current && filter.stack.current.value));
 }, true);
+
+$scope.toggleVisibility = function (repo) {
+  repo.isProccessing = true;
+  var payload = {
+RepositoryVersions:{
+  hidden: repo.hidden
+}
+  }
+  Stack.updateRepo(repo.stack_name, repo.stack_version, repo.id, 
payload).then( null, function () {
+repo.hidden = !repo.hidden;
+  }).finally( function () {
+delete repo.isProccessing;
+  });
+}
+
+$scope.isHideCheckBoxEnabled = function ( repo ) {
+  return !repo.isProccessing && ( !repo.cluster || repo.isPatch && ( 
repo.status === 'installed' || repo.status === 'install_failed') );
+}
   }]);

http://git-wip-us.apache.org/repos/asf/ambari/blob/2fc74535/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
index 239b149..1711543 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
@@ -159,6 +159,7 @@ angular.module('ambariAdminConsole')
 'common.alerts.cannotUpdateAdminStatus': 'Cannot update User Admin status',
 'common.alerts.checkFailed': 'CHECK FAILED',
 'common.alerts.onlySimpleChars': 'Must contain only simple characters.',
+'common.hidden' : 'Hidden',
 
 'main.title': 'Welcome to Apache Ambari',
 'main.noClusterDescription': 'Provision a cluster, manage who can access 
the cluster, and customize views for Ambari users.',

http://git-wip-us.apache.org/repos/asf/ambari/blob/2fc74535/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
index 70212c0..bf19a62 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
@@ -59,6 +59,7 @@
   >
   
   
+  {{'common.hidden' | 
translate}}
 
 
 
@@ -106,6 +107,7 @@
   
 
   
+  
 
 
   



[29/50] [abbrv] ambari git commit: AMBARI-21809. Pre-configure services during stack upgrade if Kerberos is enabled to reduce number of core service restarts when services are added (rlevas)

2017-09-05 Thread lpuskas
http://git-wip-us.apache.org/repos/asf/ambari/blob/5230d935/ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json
--
diff --git 
a/ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json
 
b/ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json
new file mode 100644
index 000..70fc3ed
--- /dev/null
+++ 
b/ambari-server/src/test/resources/PreconfigureActionTest_kerberos_descriptor_stack_preconfigure.json
@@ -0,0 +1,730 @@
+{
+  "identities": [
+{
+  "keytab": {
+"configuration": "cluster-env/smokeuser_keytab",
+"file": "${keytab_dir}/smokeuser.headless.keytab",
+"group": {
+  "access": "r",
+  "name": "${cluster-env/user_group}"
+},
+"owner": {
+  "access": "r",
+  "name": "${cluster-env/smokeuser}"
+}
+  },
+  "name": "smokeuser",
+  "principal": {
+"configuration": "cluster-env/smokeuser_principal_name",
+"local_username": "${cluster-env/smokeuser}",
+"type": "user",
+"value": "${cluster-env/smokeuser}${principal_suffix}@${realm}"
+  }
+},
+{
+  "keytab": {
+"file": "${keytab_dir}/spnego.service.keytab",
+"group": {
+  "access": "r",
+  "name": "${cluster-env/user_group}"
+},
+"owner": {
+  "access": "r",
+  "name": "root"
+}
+  },
+  "name": "spnego",
+  "principal": {
+"configuration": null,
+"local_username": null,
+"type": "service",
+"value": "HTTP/_HOST@${realm}"
+  }
+}
+  ],
+  "services": [
+{
+  "components": [
+{
+  "identities": [
+{
+  "keytab": {
+"file": "${keytab_dir}/ambari.server.keytab",
+"group": {},
+"owner": {
+  "access": "r"
+}
+  },
+  "name": "ambari-server",
+  "principal": {
+"configuration": "cluster-env/ambari_principal_name",
+"local_username": null,
+"type": "user",
+"value": "ambari-server${principal_suffix}@${realm}"
+  }
+},
+{
+  "name": "ambari-server_spnego",
+  "reference": "/spnego"
+}
+  ],
+  "name": "AMBARI_SERVER"
+}
+  ],
+  "name": "AMBARI"
+},
+{
+  "auth_to_local_properties": [
+"core-site/hadoop.security.auth_to_local"
+  ],
+  "components": [
+{
+  "configurations": [
+{
+  "hdfs-site": {
+"dfs.datanode.address": "0.0.0.0:1019",
+"dfs.datanode.http.address": "0.0.0.0:1022"
+  }
+}
+  ],
+  "identities": [
+{
+  "keytab": {
+"configuration": "hdfs-site/dfs.datanode.keytab.file",
+"file": "${keytab_dir}/dn.service.keytab",
+"group": {
+  "access": "",
+  "name": "${cluster-env/user_group}"
+},
+"owner": {
+  "access": "r",
+  "name": "${hadoop-env/hdfs_user}"
+}
+  },
+  "name": "datanode_dn",
+  "principal": {
+"configuration": "hdfs-site/dfs.datanode.kerberos.principal",
+"local_username": "${hadoop-env/hdfs_user}",
+"type": "service",
+"value": "dn/_HOST@${realm}"
+  }
+}
+  ],
+  "name": "DATANODE"
+},
+{
+  "identities": [
+{
+  "name": "/HDFS/NAMENODE/hdfs"
+}
+  ],
+  "name": "HDFS_CLIENT"
+},
+{
+  "identities": [
+{
+  "name": "/spnego",
+  "principal": {
+"configuration": 
"hdfs-site/dfs.journalnode.kerberos.internal.spnego.principal",
+"local_username": null,
+"type": null,
+"value": "HTTP/_HOST@${realm}"
+  }
+},
+{
+  "keytab": {
+"configuration": "hdfs-site/dfs.journalnode.keytab.file",
+"file": "${keytab_dir}/jn.service.keytab",
+"group": {
+  "access": "",
+  "name": "${cluster-env/user_group}"
+},
+"owner": {
+  "access": "r",
+  "name": "${hadoop-env/hdfs_user}"
+}
+  },
+  "name": "journalnode_jn",
+  "principal": {
+"configuration": 

[23/50] [abbrv] ambari git commit: AMBARI-21860. Stacks and Versions is displaying unsorted (alexantonenko)

2017-09-05 Thread lpuskas
AMBARI-21860. Stacks and Versions is displaying unsorted (alexantonenko)


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: a66c01d3d0873598851fa8016788525fcbb53c16
Parents: d1d6df9
Author: Alex Antonenko 
Authored: Thu Aug 31 15:20:59 2017 +0300
Committer: Alex Antonenko 
Committed: Thu Aug 31 15:20:59 2017 +0300

--
 .../app/templates/main/admin/stack_upgrade/versions.hbs  | 2 +-
 .../app/views/main/admin/stack_upgrade/versions_view.js  | 8 +---
 2 files changed, 2 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a66c01d3/ambari-web/app/templates/main/admin/stack_upgrade/versions.hbs
--
diff --git a/ambari-web/app/templates/main/admin/stack_upgrade/versions.hbs 
b/ambari-web/app/templates/main/admin/stack_upgrade/versions.hbs
index acb6e78..edcb37c 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/versions.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/versions.hbs
@@ -58,7 +58,7 @@
   
 {{#if isLoaded}}
   
-{{#each version in view.repoVersionsDisplay}}
+{{#each version in view.repoVersions}}
   {{#if version.isVisible}}
 {{view App.UpgradeVersionColumnView contentBinding="version"}}
   {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a66c01d3/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js
--
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js
index eadd265..3899bb1 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js
@@ -126,13 +126,7 @@ App.MainAdminStackVersionsView = Em.View.extend({
* @type {Em.Array}
*/
   repoVersions: App.RepositoryVersion.find(),
-
-  repoVersionsDisplay: function () {
-return this.get('repoVersions').toArray().sort(function (a, b) {
-  return (a.get('repositoryVersion') > b.get('repositoryVersion')) ? 1 : 
((b.get('repositoryVersion') > a.get('repositoryVersion')) ? -1 : 0);
-});
-  }.property('repoVersions'),
-
+  
   /**
* @type {Em.Array}
*/



[34/50] [abbrv] ambari git commit: AMBARI-21874. Change Patch/Maint Bubbles To Type Columns (alexantonenko)

2017-09-05 Thread lpuskas
AMBARI-21874. Change Patch/Maint Bubbles To Type Columns (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/18a16cbe
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/18a16cbe
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/18a16cbe

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 18a16cbe476a7cad89fdd2605e114d8919a175ea
Parents: a679281
Author: Alex Antonenko 
Authored: Mon Sep 4 13:55:48 2017 +0300
Committer: Alex Antonenko 
Committed: Mon Sep 4 13:55:48 2017 +0300

--
 .../controllers/stackVersions/StackVersionsListCtrl.js|  2 ++
 .../resources/ui/admin-web/app/scripts/services/Stack.js  |  4 
 .../ui/admin-web/app/views/stackVersions/list.html| 10 --
 3 files changed, 14 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/18a16cbe/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js
index 03088d5..003d472 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsListCtrl.js
@@ -28,6 +28,7 @@ angular.module('ambariAdminConsole')
 $scope.filter = {
   name: '',
   version: '',
+  type: '',
   cluster: {
 options: [],
 current: null
@@ -189,6 +190,7 @@ angular.module('ambariAdminConsole')
 $scope.$watch('filter', function (filter) {
   $scope.isNotEmptyFilter = Boolean(filter.name
 || filter.version
+|| filter.type
 || (filter.cluster.current && filter.cluster.current.value)
 || (filter.stack.current && filter.stack.current.value));
 }, true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/18a16cbe/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
index 0ad6a09..8003dd1 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
@@ -178,6 +178,7 @@ angular.module('ambariAdminConsole')
 allRepos: function (filter, pagination) {
   var versionFilter = filter.version;
   var nameFilter = filter.name;
+  var typeFilter = filter.type;
   var stackFilter = filter.stack && filter.stack.current && 
filter.stack.current.value;
   var url = 
'/stacks?fields=versions/repository_versions/RepositoryVersions';
   if (versionFilter) {
@@ -186,6 +187,9 @@ angular.module('ambariAdminConsole')
   if (nameFilter) {
 url += 
'/repository_versions/RepositoryVersions/display_name.matches(.*' + 
nameFilter + '.*)';
   }
+  if (typeFilter){
+url += 
'/repository_versions/RepositoryVersions/type.matches(.*' + 
typeFilter.toUpperCase() + '.*)';
+  }
   if (stackFilter) {
 var stack = filter.stack.current.value.split('-'),
   stackNameFilter = stack[0],

http://git-wip-us.apache.org/repos/asf/ambari/blob/18a16cbe/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
index bf19a62..3e788f8 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/list.html
@@ -46,6 +46,11 @@
 {{'common.controls.close' | translate}}
   
   
+{{'common.type' | translate}}
+
+{{'common.controls.close' | translate}}
+  
+  
 {{'common.version' | translate}}
 
 {{'common.controls.close' | translate}}
@@ -70,10 +75,11 @@
   
 
   {{repo.display_name}}
-  {{'versions.patch' | translate}}
-  {{'versions.maint' | translate}}
 
   
+  
+{{repo.type}}
+  
   
 {{repo.repository_version}}
   



[25/50] [abbrv] ambari git commit: AMBARI-21859. Pre-upgrade check option well before starting upgrade process (alexantonenko)

2017-09-05 Thread lpuskas
AMBARI-21859. Pre-upgrade check option well before starting upgrade process 
(alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/638fc708
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/638fc708
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/638fc708

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 638fc708c81a61db3fc5a870c7c55b0e3d8232b3
Parents: ff23a2e
Author: Alex Antonenko 
Authored: Thu Aug 31 16:59:51 2017 +0300
Committer: Alex Antonenko 
Committed: Thu Aug 31 16:59:51 2017 +0300

--
 .../main/admin/stack_and_upgrade_controller.js  | 20 +---
 ambari-web/app/messages.js  |  4 
 ambari-web/app/styles/stack_versions.less   |  6 +
 .../admin/stack_upgrade/upgrade_options.hbs | 19 ---
 .../stack_upgrade/upgrade_version_box_view.js   | 12 --
 .../admin/stack_and_upgrade_controller_test.js  | 15 +++-
 .../upgrade_version_box_view_test.js| 25 
 7 files changed, 87 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/638fc708/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js 
b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index 8e9ce86..5c96251 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -986,7 +986,6 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
   if (method.get('allowed')) {
 this.runPreUpgradeCheckOnly({
   id: version.get('id'),
-  value: version.get('repositoryVersion'),
   label: version.get('displayName'),
   type: method.get('type')
 });
@@ -1026,13 +1025,17 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 return configs;
   },
 
+  showUpgradeOptions: function ( version ) {
+this.upgradeOptions(false, version, true);
+  },
+
   /**
* Open upgrade options window: upgrade type and failures tolerance
* @param {boolean} isInUpgradeWizard
* @param {object} version
* @return App.ModalPopup
*/
-  upgradeOptions: function (isInUpgradeWizard, version) {
+  upgradeOptions: function (isInUpgradeWizard, version, preUpgradeShow) {
 var self = this,
   upgradeMethods = this.get('upgradeMethods'),
   runningCheckRequests = this.get('runningCheckRequests');
@@ -1068,10 +1071,10 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 return this.get('controller.getSupportedUpgradeError') ? null : 
Em.I18n.t('common.cancel');
   }.property('controller.getSupportedUpgradeError'),
   classNames: ['upgrade-options-popup'],
-  header: 
Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.header'),
+  header: preUpgradeShow ? 
Em.I18n.t('admin.stackVersions.version.preUpgrade.header') : 
Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.header'),
   controller: this,
   showFooter: function() {
-return this.get('controller.isUpgradeTypesLoaded');
+return this.get('controller.isUpgradeTypesLoaded') && !preUpgradeShow;
   }.property('controller.isUpgradeTypesLoaded'),
   bodyClass: Em.View.extend({
 templateName: 
require('templates/main/admin/stack_upgrade/upgrade_options'),
@@ -1097,7 +1100,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 }.property().volatile(),
 isInUpgradeWizard: isInUpgradeWizard,
 showPreUpgradeChecks: App.get('supports.preUpgradeCheck') && 
!isInUpgradeWizard,
-versionText: isInUpgradeWizard ? '' : 
Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.bodyMsg.version').format(version.get('displayName')),
+versionText: preUpgradeShow ? 
Em.I18n.t('admin.stackVersions.version.preUpgrade.bodyMsg.version').format(version.get('displayName'))
 : isInUpgradeWizard ? '' : 
Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.bodyMsg.version').format(version.get('displayName')),
 selectMethod: function (event) {
   if (isInUpgradeWizard || !event.context.get('allowed') || 
event.context.get('isPrecheckFailed')) return;
   var selectedMethod = event.context;
@@ -1117,7 +1120,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 },
 rerunCheck: function (event) {
   self.runPreUpgradeCheckOnly({
-

[11/50] [abbrv] ambari git commit: Merge remote-tracking branch 'origin/trunk' into trunk

2017-09-05 Thread lpuskas
Merge remote-tracking branch 'origin/trunk' into trunk


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: d22a671170fa3da68ca284db46c9f9c37321bfed
Parents: 4510578 a92d868
Author: ababiichuk 
Authored: Wed Aug 30 15:16:46 2017 +0300
Committer: ababiichuk 
Committed: Wed Aug 30 15:16:46 2017 +0300

--
 .../controllers/stackVersions/StackVersionsCreateCtrl.js |  1 +
 .../controllers/stackVersions/StackVersionsEditCtrl.js   |  1 +
 .../resources/ui/admin-web/app/scripts/services/Stack.js |  5 +++--
 .../ui/admin-web/app/views/stackVersions/list.html   |  1 +
 .../app/views/stackVersions/stackVersionPage.html|  1 +
 .../main/admin/stack_and_upgrade_controller.js   | 11 +++
 ambari-web/app/messages.js   |  2 ++
 .../app/models/stack_version/repository_version.js   |  4 
 .../common/modal_popups/install_repo_confirmation.hbs|  2 +-
 .../main/admin/stack_upgrade/upgrade_version_box.hbs |  7 +--
 .../main/admin/stack_upgrade/upgrade_version_column.hbs  |  6 +++---
 .../main/admin/stack_upgrade/upgrade_version_box_view.js |  4 
 .../app/views/main/admin/stack_upgrade/versions_view.js  |  4 ++--
 .../main/admin/stack_and_upgrade_controller_test.js  |  7 ++-
 14 files changed, 37 insertions(+), 19 deletions(-)
--




[02/50] [abbrv] ambari git commit: AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(Prabhjyot Singh via gauravn7)

2017-09-05 Thread lpuskas
AMBARI-21814. On installation of new services on Ambari, Zeppelin should 
configure new interpreters.(Prabhjyot Singh via gauravn7)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6b052390
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6b052390
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6b052390

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 6b052390c3398c6f7fa1a706c3802ce7adf28cb9
Parents: ae80b6e
Author: Gaurav Nagar 
Authored: Wed Aug 30 11:23:31 2017 +0530
Committer: Gaurav Nagar 
Committed: Wed Aug 30 11:23:31 2017 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-config.xml   |  6 ++
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py  | 18 +-
 .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py  |  4 
 .../0.6.0.3.0/configuration/zeppelin-config.xml   | 13 +
 4 files changed, 40 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6b052390/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
index 6f16a98..03ad5f7 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
@@ -199,4 +199,10 @@
 Size in characters of the maximum text message to be received 
by websocket. Defaults to 1024000
 
   
+  
+zeppelin.interpreter.config.upgrade
+true
+If this is set to true, on every restart of Zeppelin server 
default interpreter parameters will be reset
+
+  
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b052390/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 7f506c5..62ed825 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -214,8 +214,8 @@ class Master(Script):
 if not glob.glob(params.conf_dir + "/interpreter.json") and \
   not os.path.exists(params.conf_dir + "/interpreter.json"):
   self.create_interpreter_json()
-  self.update_zeppelin_interpreter()
 
+self.update_zeppelin_interpreter()
 self.update_kerberos_properties()
 
 Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh restart >> '
@@ -235,6 +235,20 @@ class Master(Script):
 pid_file = ''
 check_process_status(pid_file)
 
+  def reset_interpreter_settings(self):
+import json
+import interpreter_json_template
+interpreter_json_template = 
json.loads(interpreter_json_template.template)['interpreterSettings']
+config_data = self.get_interpreter_settings()
+interpreter_settings = config_data['interpreterSettings']
+
+for setting_key in interpreter_json_template.keys():
+  if setting_key not in interpreter_settings:
+interpreter_settings[setting_key] = interpreter_json_template[
+  setting_key]
+
+self.set_interpreter_settings(config_data)
+
   def get_interpreter_settings(self):
 import params
 import json
@@ -313,6 +327,8 @@ class Master(Script):
 
   def update_zeppelin_interpreter(self):
 import params
+if params.zeppelin_interpreter_config_upgrade == True:
+  self.reset_interpreter_settings()
 config_data = self.get_interpreter_settings()
 interpreter_settings = config_data['interpreterSettings']
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b052390/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index 6912c3d..f5a2a37 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
@@ -194,6 +194,10 @@ else:
 
 

[06/50] [abbrv] ambari git commit: AMBARI-21703. UI must consume API to show whether a service will be upgraded (alexantonenko)

2017-09-05 Thread lpuskas
AMBARI-21703. UI must consume API to show whether a service will be upgraded 
(alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/418be516
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/418be516
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/418be516

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 418be516334aaebf0d83f8c074fef9fec4a2c2e3
Parents: 138caea
Author: Alex Antonenko 
Authored: Wed Aug 30 12:30:03 2017 +0300
Committer: Alex Antonenko 
Committed: Wed Aug 30 12:30:03 2017 +0300

--
 ambari-web/app/mappers/repository_version_mapper.js  | 3 ++-
 ambari-web/app/mappers/stack_version_mapper.js   | 5 -
 ambari-web/app/messages.js   | 2 ++
 ambari-web/app/models/stack_version/service_simple.js| 1 +
 ambari-web/app/styles/stack_versions.less| 8 
 .../main/admin/stack_upgrade/upgrade_version_column.hbs  | 3 +++
 ambari-web/app/utils/ajax/ajax.js| 2 +-
 .../main/admin/stack_upgrade/upgrade_version_column_view.js  | 5 -
 8 files changed, 25 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/418be516/ambari-web/app/mappers/repository_version_mapper.js
--
diff --git a/ambari-web/app/mappers/repository_version_mapper.js 
b/ambari-web/app/mappers/repository_version_mapper.js
index 8b2014b..746fc53 100644
--- a/ambari-web/app/mappers/repository_version_mapper.js
+++ b/ambari-web/app/mappers/repository_version_mapper.js
@@ -122,7 +122,8 @@ App.repoVersionMapper = App.QuickDataMapper.create({
 name: service.name,
 display_name: service.display_name,
 latest_version: service.versions[0] ? service.versions[0] : '',
-is_available: 
item[repoVersionsKey].services.someProperty('name', service.name)
+is_available: 
item[repoVersionsKey].services.someProperty('name', service.name),
+is_upgradable: json.stackServices[service.name] && 
json.stackServices[service.name].upgrade
   };
   resultService.push(serviceObj);
 }, this);

http://git-wip-us.apache.org/repos/asf/ambari/blob/418be516/ambari-web/app/mappers/stack_version_mapper.js
--
diff --git a/ambari-web/app/mappers/stack_version_mapper.js 
b/ambari-web/app/mappers/stack_version_mapper.js
index 62187b0..2b091a0 100644
--- a/ambari-web/app/mappers/stack_version_mapper.js
+++ b/ambari-web/app/mappers/stack_version_mapper.js
@@ -77,7 +77,10 @@ App.stackVersionMapper = App.QuickDataMapper.create({
 
 if (item.repository_versions && item.repository_versions[0]) {
   item.repository_versions[0].RepositoryVersions.stackVersionId = 
item.ClusterStackVersions.id;
-  App.repoVersionMapper.map({"items": item.repository_versions }, 
true, true);
+  App.repoVersionMapper.map({
+"items": item.repository_versions,
+"stackServices": 
item.ClusterStackVersions.repository_summary.services
+  }, true, true);
 }
 resultStack.push(this.parseIt(stack, this.get('modelStack')));
   }, this);

http://git-wip-us.apache.org/repos/asf/ambari/blob/418be516/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 28569c9..17a791e 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1757,6 +1757,8 @@ Em.I18n.translations = {
   'admin.stackDowngrade.state.paused.fail.header': "Pause Downgrade failed",
   'admin.stackDowngrade.state.paused.fail.body': "Downgrade could not be 
paused. Try again later.",
 
+  'admin.stackVersions.version.service.notUpgradable': "Update available, but 
already installed.",
+
   'admin.stackVersions.version.upgrade.upgradeOptions.header': "Upgrade 
Options",
   'admin.stackVersions.version.upgrade.upgradeOptions.bodyMsg.version': "You 
are about to perform an upgrade to {0}.",
   'admin.stackVersions.version.upgrade.upgradeOptions.bodyMsg.method': "Choose 
the upgrade method:",

http://git-wip-us.apache.org/repos/asf/ambari/blob/418be516/ambari-web/app/models/stack_version/service_simple.js
--
diff --git a/ambari-web/app/models/stack_version/service_simple.js 
b/ambari-web/app/models/stack_version/service_simple.js
index ffb32bf..a31c829 100644
--- a/ambari-web/app/models/stack_version/service_simple.js
+++ 

[41/50] [abbrv] ambari git commit: Added swagger annotations to the new endpoint

2017-09-05 Thread lpuskas
Added swagger annotations to the new endpoint


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: ab16081337ec701a53334bfadd5d28f60803ce5c
Parents: b25689a
Author: Balázs Bence Sári 
Authored: Thu Jul 6 18:36:18 2017 +0200
Committer: lpuskas 
Committed: Tue Sep 5 11:39:22 2017 +0200

--
 .../AmbariConfigurationRequestSwagger.java  | 48 +++
 .../AmbariConfigurationResponseSwagger.java | 40 +
 .../services/AmbariConfigurationService.java| 62 +---
 3 files changed, 143 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ab160813/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
new file mode 100644
index 000..d6714f9
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationRequestSwagger.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed 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.
+ */
+package org.apache.ambari.server.api.services;
+
+import java.util.Map;
+
+import org.apache.ambari.server.controller.ApiModel;
+import org.apache.ambari.server.orm.entities.ConfigurationBaseEntity;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Request data model for {@link 
org.apache.ambari.server.api.services.AmbariConfigurationService}
+ */
+public interface AmbariConfigurationRequestSwagger extends ApiModel {
+
+  @ApiModelProperty(name = "AmbariConfiguration")
+  AmbariConfigurationRequestInfo getAmbariConfiguration();
+
+  interface AmbariConfigurationRequestInfo {
+@ApiModelProperty
+Long getId();
+
+@ApiModelProperty
+Map getData();
+
+@ApiModelProperty
+String getType();
+
+@ApiModelProperty
+Long getVersion();
+
+@ApiModelProperty(name = "version_tag")
+String getVersionTag();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab160813/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationResponseSwagger.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationResponseSwagger.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationResponseSwagger.java
new file mode 100644
index 000..c55ac1d
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationResponseSwagger.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed 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.
+ */
+package org.apache.ambari.server.api.services;
+
+import java.util.Map;
+
+import org.apache.ambari.server.controller.ApiModel;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response data model for {@link 
org.apache.ambari.server.api.services.AmbariConfigurationService}
+ */
+public interface AmbariConfigurationResponseSwagger extends ApiModel {
+
+  @ApiModelProperty(name = "AmbariConfiguration")
+  AmbariConfigurationResponseInfo getAmbariConfigurationResponse();
+
+  interface AmbariConfigurationResponseInfo {
+@ApiModelProperty
+Long getId();
+
+@ApiModelProperty
+Map getData();
+
+

[35/50] [abbrv] ambari git commit: AMBARI-21687. User can't add node via Ambari UI when being part of both "cluster user" and "cluster admin" roles (echekanskiy)

2017-09-05 Thread lpuskas
AMBARI-21687. User can't add node via Ambari UI when being part of both 
"cluster user" and "cluster admin" roles (echekanskiy)


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: c51540dee89d90bb488c2b1a1269ae7d40d5d509
Parents: 18a16cb
Author: Eugene Chekanskiy 
Authored: Mon Sep 4 14:53:51 2017 +0300
Committer: Eugene Chekanskiy 
Committed: Mon Sep 4 14:53:51 2017 +0300

--
 .../server/controller/internal/RequestResourceProvider.java  | 8 +++-
 .../controller/internal/RequestResourceProviderTest.java | 2 --
 2 files changed, 7 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c51540de/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
index 355e572..81f283c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
@@ -251,7 +251,13 @@ public class RequestResourceProvider extends 
AbstractControllerResourceProvider
 ? null
 : actionDefinition.getPermissions();
 
-if (!AuthorizationHelper.isAuthorized(resourceType, resourceId, 
permissions)) {
+// here goes ResourceType handling for some specific custom actions
+ResourceType customActionResourceType = resourceType;
+if (actionName.contains("check_host")) { // check_host custom 
action
+  customActionResourceType = ResourceType.CLUSTER;
+}
+
+if (!AuthorizationHelper.isAuthorized(customActionResourceType, 
resourceId, permissions)) {
   throw new AuthorizationException(String.format("The 
authenticated user is not authorized to execute the action %s.", actionName));
 }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/c51540de/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
index b2e9472..c0695b1 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
@@ -1358,13 +1358,11 @@ public class RequestResourceProviderTest {
 EnumSet.of(RoleAuthorization.HOST_ADD_DELETE_HOSTS));
   }
 
-  @Test(expected = AuthorizationException.class)
   public void 
testCreateResourcesCheckHostForNonClusterAsClusterAdministrator() throws 
Exception {
 
testCreateResources(TestAuthenticationFactory.createClusterAdministrator(), 
null, null, "check_host",
 EnumSet.of(RoleAuthorization.HOST_ADD_DELETE_HOSTS));
   }
 
-  @Test(expected = AuthorizationException.class)
   public void testCreateResourcesCheckHostForNonClusterAsClusterOperator() 
throws Exception {
 testCreateResources(TestAuthenticationFactory.createClusterOperator(), 
null, null, "check_host",
 EnumSet.of(RoleAuthorization.HOST_ADD_DELETE_HOSTS));



[48/50] [abbrv] ambari git commit: AMBARI-21307 LDAP config rest service implementation extends the ambari config rest implementaiton

2017-09-05 Thread lpuskas
AMBARI-21307 LDAP config rest  service implementation extends the ambari config 
rest implementaiton


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: abc3ce97f02fd97f06d0c55b506eac829dc9
Parents: 30b6415
Author: lpuskas 
Authored: Mon Aug 21 15:53:45 2017 +0200
Committer: lpuskas 
Committed: Tue Sep 5 11:39:23 2017 +0200

--
 .../services/ldap/LdapConfigurationService.java | 208 +++
 .../api/services/ldap/LdapRestService.java  | 149 -
 2 files changed, 208 insertions(+), 149 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/abc3/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java
new file mode 100644
index 000..52244bc
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/LdapConfigurationService.java
@@ -0,0 +1,208 @@
+/*
+ * Licensed 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.
+ */
+
+/*
+ * Licensed 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.
+ */
+
+package org.apache.ambari.server.api.services.ldap;
+
+import java.util.Set;
+
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.ambari.annotations.ApiIgnore;
+import org.apache.ambari.server.StaticallyInject;
+import org.apache.ambari.server.api.services.AmbariConfigurationService;
+import org.apache.ambari.server.api.services.Result;
+import org.apache.ambari.server.api.services.ResultImpl;
+import org.apache.ambari.server.api.services.ResultStatus;
+import org.apache.ambari.server.controller.internal.ResourceImpl;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.ldap.AmbariLdapConfiguration;
+import org.apache.ambari.server.ldap.LdapConfigurationFactory;
+import org.apache.ambari.server.ldap.service.LdapFacade;
+import org.apache.ambari.server.security.authorization.AuthorizationException;
+import org.apache.ambari.server.security.authorization.AuthorizationHelper;
+import org.apache.ambari.server.security.authorization.ResourceType;
+import org.apache.ambari.server.security.authorization.RoleAuthorization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.security.core.Authentication;
+
+import com.google.common.collect.Sets;
+
+/**
+ * Endpoint designated to LDAP specific operations.
+ */
+@StaticallyInject
+@Path("/ldapconfigs/")
+public class LdapConfigurationService extends AmbariConfigurationService {
+
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(LdapConfigurationService.class);
+
+  @Inject
+  private static LdapFacade ldapFacade;
+
+  @Inject
+  private static LdapConfigurationFactory ldapConfigurationFactory;
+
+  /**
+   * Actions supported by this endpoint
+   */
+  private enum LdapAction {
+TEST_CONNECTION("test-connection"),
+TEST_ATTRIBUTES("test-attributes"),
+DETECT_ATTRIBUTES("detect-attributes");
+
+private String actionStr;
+
+LdapAction(String actionStr) {
+  this.actionStr = actionStr;
+}
+
+public static LdapAction fromAction(String action) {
+  for 

[33/50] [abbrv] ambari git commit: AMBARI-21835.Support for Zeppelin notebook storage in HDFS(Prabhjyot Singh via Venkata Sairam)

2017-09-05 Thread lpuskas
AMBARI-21835.Support for Zeppelin notebook storage in HDFS(Prabhjyot Singh via 
Venkata Sairam)


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: a679281f7abe6768e0896e32df7c298b59877064
Parents: 7e22217
Author: Venkata Sairam 
Authored: Mon Sep 4 14:44:25 2017 +0530
Committer: Venkata Sairam 
Committed: Mon Sep 4 14:45:22 2017 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-config.xml |  2 +-
 .../0.6.0.2.5/package/scripts/master.py | 59 +---
 .../0.6.0.2.5/package/scripts/params.py |  2 +
 .../0.6.0.3.0/configuration/zeppelin-config.xml |  2 +-
 4 files changed, 55 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a679281f/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
index 03ad5f7..bd6ad76 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
@@ -77,7 +77,7 @@
   
   
 zeppelin.notebook.storage
-org.apache.zeppelin.notebook.repo.VFSNotebookRepo
+org.apache.zeppelin.notebook.repo.HdfsNotebookRepo
 notebook persistence layer implementation. If S3 is used, set 
this to
 org.apache.zeppelin.notebook.repo.S3NotebookRepo instead. If S3 is 
used to store the
 notebooks, it is necessary to use the following folder structure

http://git-wip-us.apache.org/repos/asf/ambari/blob/a679281f/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 2142bb4..ba73d10 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -20,25 +20,25 @@ limitations under the License.
 
 import glob
 import os
-from resource_management.core.base import Fail
+
+from resource_management.core import shell, sudo
+from resource_management.core.logger import Logger
 from resource_management.core.resources import Directory
 from resource_management.core.resources.system import Execute, File
 from resource_management.core.source import InlineTemplate
-from resource_management.core import sudo
-from resource_management.core.logger import Logger
-from resource_management.core.source import StaticFile
 from resource_management.libraries import XmlConfig
+from resource_management.libraries.functions import StackFeature
+from resource_management.libraries.functions import get_kinit_path
+from resource_management.libraries.functions import stack_select
 from resource_management.libraries.functions.check_process_status import 
check_process_status
+from resource_management.libraries.functions.default import default
 from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions import stack_select
-from resource_management.libraries.functions import StackFeature
-from resource_management.libraries.functions.decorator import retry
 from resource_management.libraries.functions.stack_features import 
check_stack_feature
 from resource_management.libraries.functions.version import 
format_stack_version
 from resource_management.libraries.script.script import Script
 
-class Master(Script):
 
+class Master(Script):
   def install(self, env):
 import params
 env.set_params(params)
@@ -185,6 +185,45 @@ class Master(Script):
 group=params.zeppelin_group,
 mode=0644)
 
+  def check_and_copy_notebook_in_hdfs(self, params):
+if 
params.config['configurations']['zeppelin-config']['zeppelin.notebook.dir'].startswith("/"):
+  notebook_directory = 
params.config['configurations']['zeppelin-config']['zeppelin.notebook.dir']
+else:
+  notebook_directory = "/user/" + format("{zeppelin_user}") + "/" + \
+ 

[37/50] [abbrv] ambari git commit: AMBARI-21873 support for handling ldap ambari admin group mappings during ldap sync

2017-09-05 Thread lpuskas
AMBARI-21873 support for handling ldap ambari admin group mappings during ldap 
sync


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: cf264c6c86e1275c6af8daafb13f1ace862af41d
Parents: c091ebe
Author: lpuskas 
Authored: Mon Sep 4 15:39:39 2017 +0200
Committer: lpuskas 
Committed: Tue Sep 5 11:14:53 2017 +0200

--
 .../server/security/authorization/Users.java| 62 
 1 file changed, 50 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cf264c6c/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
index 7d8c683..91cefe9 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
@@ -61,6 +61,8 @@ import 
org.springframework.security.core.context.SecurityContext;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.crypto.password.PasswordEncoder;
 
+import com.google.common.base.Strings;
+import com.google.common.collect.Sets;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
 import com.google.inject.persist.Transactional;
@@ -190,7 +192,7 @@ public class Users {
   currentUserEntity = userDAO.findLdapUserByName(currentUserName);
   try {
 ldapAuthenticationProvider.authenticate(
-new UsernamePasswordAuthenticationToken(currentUserName, 
currentUserPassword));
+  new UsernamePasswordAuthenticationToken(currentUserName, 
currentUserPassword));
 isLdapUser = true;
   } catch (InvalidUsernamePasswordCombinationException ex) {
 throw new AmbariException(ex.getMessage());
@@ -213,7 +215,7 @@ public class Users {
   }
 
   if ((isLdapUser && isCurrentUserAdmin) || 
(StringUtils.isNotEmpty(currentUserPassword) &&
-  passwordEncoder.matches(currentUserPassword, 
currentUserEntity.getUserPassword( {
+passwordEncoder.matches(currentUserPassword, 
currentUserEntity.getUserPassword( {
 userEntity.setUserPassword(passwordEncoder.encode(newPassword));
 userDAO.merge(userEntity);
   } else {
@@ -300,7 +302,7 @@ public class Users {
* @throws AmbariException if user already exists
*/
   public synchronized void createUser(String userName, String password, 
UserType userType, Boolean active, Boolean
-  admin) throws AmbariException {
+admin) throws AmbariException {
 // if user type is not provided, assume LOCAL since the default
 // value of user_type in the users table is LOCAL
 if (userType == null) {
@@ -310,7 +312,7 @@ public class Users {
 User existingUser = getAnyUser(userName);
 if (existingUser != null) {
   throw new AmbariException("User " + existingUser.getUserName() + " 
already exists with type "
-  + existingUser.getUserType());
++ existingUser.getUserType());
 }
 
 PrincipalTypeEntity principalTypeEntity = 
principalTypeDAO.findById(PrincipalTypeEntity.USER_PRINCIPAL_TYPE);
@@ -355,7 +357,7 @@ public class Users {
 if (userEntity != null) {
   if (!isUserCanBeRemoved(userEntity)) {
 throw new AmbariException("Could not remove user " + 
userEntity.getUserName() +
-". System should have at least one administrator.");
+  ". System should have at least one administrator.");
   }
   userDAO.remove(userEntity);
 } else {
@@ -403,7 +405,7 @@ public class Users {
   users.add(new User(memberEntity.getUser()));
 } else {
   LOG.error("Wrong state, not found user for member '{}' (group: 
'{}')",
-  memberEntity.getMemberId(), 
memberEntity.getGroup().getGroupName());
+memberEntity.getMemberId(), 
memberEntity.getGroup().getGroupName());
 }
   }
   return users;
@@ -512,7 +514,7 @@ public class Users {
 ResourceTypeEntity resourceTypeEntity = new ResourceTypeEntity();
 resourceTypeEntity.setId(resourceType.getId());
 resourceTypeEntity.setName(resourceType.name());
-
privilege.setPermission(permissionDAO.findPermissionByNameAndType(permissionName,resourceTypeEntity));
+

[45/50] [abbrv] ambari git commit: AMBARI-21545 Stack Advisor support for LDAP configuration (benyoka)

2017-09-05 Thread lpuskas
AMBARI-21545 Stack Advisor support for LDAP configuration (benyoka)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/97ec65e3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/97ec65e3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/97ec65e3

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 97ec65e30f62f6d46f5b3fe6e3abd80914eb3f4d
Parents: 374f097
Author: Balazs Bence Sari 
Authored: Tue Aug 8 20:17:14 2017 +0200
Committer: lpuskas 
Committed: Tue Sep 5 11:39:23 2017 +0200

--
 .../services/AmbariConfigurationService.java|   4 +-
 .../stackadvisor/StackAdvisorRequest.java   |  12 ++
 .../commands/StackAdvisorCommand.java   |  54 +
 .../commands/StackAdvisorCommandTest.java   | 212 +++
 .../StackAdvisorResourceProviderTest.java   |  97 -
 5 files changed, 324 insertions(+), 55 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/97ec65e3/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
index 0632361..927e518 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariConfigurationService.java
@@ -56,9 +56,9 @@ import io.swagger.annotations.ApiResponses;
  *"data": [
  *{
  * "authentication.ldap.primaryUrl": "localhost:33389"
-   "authentication.ldap.secondaryUrl": "localhost:333"
+ * "authentication.ldap.secondaryUrl": "localhost:333"
  * "authentication.ldap.baseDn": "dc=ambari,dc=apache,dc=org"
-  * // ..
+ * // ..
  * ]
  * }
  * 

http://git-wip-us.apache.org/repos/asf/ambari/blob/97ec65e3/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
index 3a2b488..cd26c56 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRequest.java
@@ -31,6 +31,8 @@ import 
org.apache.ambari.server.api.services.stackadvisor.recommendations.Recomm
 import org.apache.ambari.server.state.ChangedConfigInfo;
 import org.apache.commons.lang.StringUtils;
 
+import com.google.common.base.Preconditions;
+
 /**
  * Stack advisor request.
  */
@@ -48,6 +50,7 @@ public class StackAdvisorRequest {
   private List changedConfigurations = new LinkedList<>();
   private Set configGroups;
   private Map userContext = new HashMap<>();
+  private Map ldapConfig = new HashMap<>();
 
   public String getStackName() {
 return stackName;
@@ -93,6 +96,8 @@ public class StackAdvisorRequest {
 return configurations;
   }
 
+  public Map getLdapConfig() { return ldapConfig; }
+
   public List getChangedConfigurations() {
 return changedConfigurations;
   }
@@ -189,6 +194,13 @@ public class StackAdvisorRequest {
   return this;
 }
 
+public StackAdvisorRequestBuilder withLdapConfig(Map 
ldapConfig) {
+  Preconditions.checkNotNull(ldapConfig);
+  this.instance.ldapConfig = ldapConfig;
+  return this;
+}
+
+
 public StackAdvisorRequest build() {
   return this.instance;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/97ec65e3/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
index 356754d..2dc45de 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
+++ 

[03/50] [abbrv] ambari git commit: Revert "AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(Prabhjyot Singh via gauravn7)"

2017-09-05 Thread lpuskas
Revert "AMBARI-21814. On installation of new services on Ambari, Zeppelin 
should configure new interpreters.(Prabhjyot Singh via gauravn7)"

This reverts commit 6b052390c3398c6f7fa1a706c3802ce7adf28cb9.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/58c6848a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/58c6848a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/58c6848a

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 58c6848a78e0ce59e79d4f6924c8ceb925ccee91
Parents: 6b05239
Author: Gaurav Nagar 
Authored: Wed Aug 30 11:36:57 2017 +0530
Committer: Gaurav Nagar 
Committed: Wed Aug 30 11:36:57 2017 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-config.xml   |  6 --
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py  | 18 +-
 .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py  |  4 
 .../0.6.0.3.0/configuration/zeppelin-config.xml   | 13 -
 4 files changed, 1 insertion(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/58c6848a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
index 03ad5f7..6f16a98 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
@@ -199,10 +199,4 @@
 Size in characters of the maximum text message to be received 
by websocket. Defaults to 1024000
 
   
-  
-zeppelin.interpreter.config.upgrade
-true
-If this is set to true, on every restart of Zeppelin server 
default interpreter parameters will be reset
-
-  
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/58c6848a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 62ed825..7f506c5 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -214,8 +214,8 @@ class Master(Script):
 if not glob.glob(params.conf_dir + "/interpreter.json") and \
   not os.path.exists(params.conf_dir + "/interpreter.json"):
   self.create_interpreter_json()
+  self.update_zeppelin_interpreter()
 
-self.update_zeppelin_interpreter()
 self.update_kerberos_properties()
 
 Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh restart >> '
@@ -235,20 +235,6 @@ class Master(Script):
 pid_file = ''
 check_process_status(pid_file)
 
-  def reset_interpreter_settings(self):
-import json
-import interpreter_json_template
-interpreter_json_template = 
json.loads(interpreter_json_template.template)['interpreterSettings']
-config_data = self.get_interpreter_settings()
-interpreter_settings = config_data['interpreterSettings']
-
-for setting_key in interpreter_json_template.keys():
-  if setting_key not in interpreter_settings:
-interpreter_settings[setting_key] = interpreter_json_template[
-  setting_key]
-
-self.set_interpreter_settings(config_data)
-
   def get_interpreter_settings(self):
 import params
 import json
@@ -327,8 +313,6 @@ class Master(Script):
 
   def update_zeppelin_interpreter(self):
 import params
-if params.zeppelin_interpreter_config_upgrade == True:
-  self.reset_interpreter_settings()
 config_data = self.get_interpreter_settings()
 interpreter_settings = config_data['interpreterSettings']
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/58c6848a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index f5a2a37..6912c3d 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ 

[18/50] [abbrv] ambari git commit: AMBARI-21786. Add Forking properties to druid MM nodes. (Slim Bouguerra via Swapan Shridhar).

2017-09-05 Thread lpuskas
AMBARI-21786. Add Forking properties to druid MM nodes. (Slim Bouguerra via 
Swapan Shridhar).


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7758a514
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7758a514
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7758a514

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 7758a5147e641f9e0f7aff0938cdc30361026e0f
Parents: 528ad8f
Author: Swapan Shridhar 
Authored: Wed Aug 30 13:16:47 2017 -0700
Committer: Swapan Shridhar 
Committed: Wed Aug 30 13:16:47 2017 -0700

--
 .../0.9.2/configuration/druid-middlemanager.xml   | 18 ++
 1 file changed, 18 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7758a514/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-middlemanager.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-middlemanager.xml
 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-middlemanager.xml
index 921d16d..08280ad 100644
--- 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-middlemanager.xml
+++ 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-middlemanager.xml
@@ -101,4 +101,22 @@
 
 
   
+  
+druid.indexer.fork.property.hadoop.mapreduce.reduce.java.opts
+-Duser.timezone=UTC -Dfile.encoding=UTF-8
+
+  Default java properties from Reducer containers
+
+
+  
+
+  
+druid.indexer.fork.property.hadoop.mapreduce.map.java.opts
+-Duser.timezone=UTC -Dfile.encoding=UTF-8
+
+  Default java properties from Map containers
+
+
+  
+
 



[16/50] [abbrv] ambari git commit: AMBARI-21641. Add task keytab files for DRUID, reuquired when using HIVE in kerberized setting. (Slim Bouguerra via Swapan Shridhar).

2017-09-05 Thread lpuskas
AMBARI-21641. Add task keytab files for DRUID, reuquired  when using HIVE in 
kerberized setting. (Slim Bouguerra via Swapan Shridhar).


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: ec0f3f7c0616cbd09cef7014b39b4178034f02b6
Parents: d4ba964
Author: Swapan Shridhar 
Authored: Wed Aug 30 12:49:38 2017 -0700
Committer: Swapan Shridhar 
Committed: Wed Aug 30 12:49:38 2017 -0700

--
 .../stacks/HDP/2.6/services/YARN/kerberos.json  | 23 
 1 file changed, 23 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ec0f3f7c/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/kerberos.json 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/kerberos.json
index b1501b8..4b9472b 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/kerberos.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/kerberos.json
@@ -103,6 +103,29 @@
   }
 },
 {
+  "name": "llap_task_hive",
+  "principal": {
+"value": "hive/_HOST@${realm}",
+"type" : "service",
+"configuration": 
"hive-interactive-site/hive.llap.task.principal"
+  },
+  "keytab": {
+"file": "${keytab_dir}/hive.llap.task.keytab",
+"owner": {
+  "name": "${yarn-env/yarn_user}",
+  "access": "r"
+},
+"group": {
+  "name": "${cluster-env/user_group}",
+  "access": "r"
+},
+"configuration": 
"hive-interactive-site/hive.llap.task.keytab.file"
+  },
+  "when" : {
+"contains" : ["services", "HIVE"]
+  }
+},
+{
   "name": "llap_zk_hive",
   "principal": {
 "value": "hive/_HOST@${realm}",



[46/50] [abbrv] ambari git commit: AMBARI-21307 refactoring - renamed, moved classes, variables

2017-09-05 Thread lpuskas
AMBARI-21307 refactoring - renamed, moved classes, variables


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: a0ee0a8a38ced1df5357a27eba7d7cc8a24fc735
Parents: abc3fff
Author: lpuskas 
Authored: Tue Aug 22 10:03:24 2017 +0200
Committer: lpuskas 
Committed: Tue Sep 5 11:39:23 2017 +0200

--
 .../api/services/ldap/AmbariConfiguration.java  |  87 +++
 .../services/ldap/AmbariConfigurationDTO.java   |  67 -
 .../ldap/LdapCheckConfigurationRequest.java |  47 
 .../api/services/ldap/LdapConfigOperation.java  |  43 
 .../services/ldap/LdapConfigurationRequest.java |  49 
 .../services/ldap/LdapConfigurationService.java |  53 +---
 .../api/services/ldap/LdapOperationRequest.java |  18 --
 .../server/ldap/LdapConfigurationService.java   |  60 +
 .../ldap/LdapConfigurationValidatorService.java |  60 -
 .../apache/ambari/server/ldap/LdapModule.java   |   4 +-
 .../server/ldap/service/AmbariLdapFacade.java   |  10 +-
 .../ads/DefaultLdapConfigurationService.java| 243 +++
 ...efaultLdapConfigurationValidatorService.java | 243 ---
 .../api/services/ldap/LDAPServiceTest.java  |   6 +-
 .../DefaultLdapConfigurationServiceTest.java| 113 +
 ...ltLdapConfigurationValidatorServiceTest.java | 113 -
 16 files changed, 618 insertions(+), 598 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a0ee0a8a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfiguration.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfiguration.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfiguration.java
new file mode 100644
index 000..b5cc921
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfiguration.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed 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.
+ */
+
+package org.apache.ambari.server.api.services.ldap;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Domain POJO representing generic ambari configuration data.
+ */
+public class AmbariConfiguration {
+
+  /**
+   * The type of the configuration,  eg.: ldap-configuration
+   */
+  private String type;
+
+  /**
+   * Version tag
+   */
+  private String versionTag;
+
+  /**
+   * Version number
+   */
+  private Integer version;
+
+  /**
+   * Created timestamp
+   */
+  private long createdTs;
+
+  private Set> data = Collections.emptySet();
+
+  public String getType() {
+return type;
+  }
+
+  public void setType(String type) {
+this.type = type;
+  }
+
+  public Set> getData() {
+return data;
+  }
+
+  public void setData(Set> data) {
+this.data = data;
+  }
+
+  public String getVersionTag() {
+return versionTag;
+  }
+
+  public void setVersionTag(String versionTag) {
+this.versionTag = versionTag;
+  }
+
+  public Integer getVersion() {
+return version;
+  }
+
+  public void setVersion(Integer version) {
+this.version = version;
+  }
+
+  public long getCreatedTs() {
+return createdTs;
+  }
+
+  public void setCreatedTs(long createdTs) {
+this.createdTs = createdTs;
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0ee0a8a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfigurationDTO.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfigurationDTO.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfigurationDTO.java
deleted file mode 100644
index 1b134fe..000
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ldap/AmbariConfigurationDTO.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed under the Apache 

[09/50] [abbrv] ambari git commit: Merge branch 'branch-feature-logsearch-ui' into trunk

2017-09-05 Thread lpuskas
Merge branch 'branch-feature-logsearch-ui' into trunk


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 45105787b118df2549ab1a99fea38776401ce173
Parents: 5e399da 5f1b985
Author: ababiichuk 
Authored: Wed Aug 30 14:13:23 2017 +0300
Committer: ababiichuk 
Committed: Wed Aug 30 14:13:23 2017 +0300

--
 .../ambari-logsearch-web-new/.angular-cli.json  |   64 +
 .../ambari-logsearch-web-new/.editorconfig  |   13 +
 .../ambari-logsearch-web-new/.gitignore |   42 +
 .../ambari-logsearch-web-new/README.md  |   28 +
 .../e2e/app.e2e-spec.ts |   32 +
 .../ambari-logsearch-web-new/e2e/app.po.ts  |   29 +
 .../e2e/tsconfig.e2e.json   |   12 +
 .../ambari-logsearch-web-new/karma.conf.js  |   62 +
 .../ambari-logsearch-web-new/package.json   |   63 +
 .../ambari-logsearch-web-new/protractor.conf.js |   48 +
 .../src/app/app.module.ts   |  169 +
 .../queries/audit-logs-query-params.class.ts|   50 +
 .../app/classes/queries/query-params.class.ts   |   23 +
 ...ce-logs-histogram-query-params.class.spec.ts |  203 +
 ...service-logs-histogram-query-params.class.ts |   69 +
 .../queries/service-logs-query-params.class.ts  |   31 +
 .../accordion-panel.component.html  |   25 +
 .../accordion-panel.component.less  |   42 +
 .../accordion-panel.component.spec.ts   |   42 +
 .../accordion-panel.component.ts|   33 +
 .../src/app/components/app.component.html   |   34 +
 .../src/app/components/app.component.less   |   51 +
 .../src/app/components/app.component.spec.ts|   71 +
 .../src/app/components/app.component.ts |   45 +
 .../dropdown-button.component.html  |   25 +
 .../dropdown-button.component.less  |   32 +
 .../dropdown-button.component.spec.ts   |   79 +
 .../dropdown-button.component.ts|   96 +
 .../dropdown-list/dropdown-list.component.html  |   31 +
 .../dropdown-list/dropdown-list.component.less  |   41 +
 .../dropdown-list.component.spec.ts |  130 +
 .../dropdown-list/dropdown-list.component.ts|   63 +
 .../filter-button.component.spec.ts |   78 +
 .../filter-button/filter-button.component.ts|   80 +
 .../filter-dropdown.component.spec.ts   |   92 +
 .../filter-dropdown.component.ts|   63 +
 .../filter-text-field.component.html|   21 +
 .../filter-text-field.component.less|   33 +
 .../filter-text-field.component.spec.ts |   82 +
 .../filter-text-field.component.ts  |   87 +
 .../filters-panel/filters-panel.component.html  |   46 +
 .../filters-panel/filters-panel.component.less  |   51 +
 .../filters-panel.component.spec.ts |   93 +
 .../filters-panel/filters-panel.component.ts|   44 +
 .../login-form/login-form.component.html|   33 +
 .../login-form/login-form.component.less|   22 +
 .../login-form/login-form.component.spec.ts |  122 +
 .../login-form/login-form.component.ts  |   59 +
 .../logs-container.component.html   |   22 +
 .../logs-container.component.less   |   25 +
 .../logs-container.component.spec.ts|  102 +
 .../logs-container/logs-container.component.ts  |  105 +
 .../logs-list/logs-list.component.html  |   54 +
 .../logs-list/logs-list.component.less  |  138 +
 .../logs-list/logs-list.component.spec.ts   |  102 +
 .../components/logs-list/logs-list.component.ts |   62 +
 .../main-container.component.html   |   24 +
 .../main-container.component.less   |   24 +
 .../main-container.component.spec.ts|   65 +
 .../main-container/main-container.component.ts  |   66 +
 .../menu-button/menu-button.component.html  |   28 +
 .../menu-button/menu-button.component.less  |   33 +
 .../menu-button/menu-button.component.spec.ts   |  133 +
 .../menu-button/menu-button.component.ts|   97 +
 .../app/components/modal/modal.component.html   |   40 +
 .../components/modal/modal.component.spec.ts|   57 +
 .../src/app/components/modal/modal.component.ts |  122 +
 .../components/node-bar/node-bar.component.html |   19 +
 .../components/node-bar/node-bar.component.less |   39 +
 .../node-bar/node-bar.component.spec.ts |   43 +
 .../components/node-bar/node-bar.component.ts   |   35 +
 .../pagination-controls.component.html  |   23 +
 .../pagination-controls.component.less  |   23 +
 .../pagination-controls.component.spec.ts   |   43 +
 

[30/50] [abbrv] ambari git commit: AMBARI-21809. Pre-configure services during stack upgrade if Kerberos is enabled to reduce number of core service restarts when services are added (rlevas)

2017-09-05 Thread lpuskas
http://git-wip-us.apache.org/repos/asf/ambari/blob/5230d935/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
new file mode 100644
index 000..a7bf33c
--- /dev/null
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
@@ -0,0 +1,596 @@
+/*
+ * 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.
+ */
+
+package org.apache.ambari.server.serveraction.upgrades;
+
+import static 
org.apache.ambari.server.serveraction.upgrades.PreconfigureKerberosAction.UPGRADE_DIRECTION_KEY;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.anyString;
+import static org.easymock.EasyMock.capture;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.getCurrentArguments;
+import static org.easymock.EasyMock.newCapture;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import javax.persistence.EntityManager;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.actionmanager.ActionManager;
+import org.apache.ambari.server.actionmanager.HostRoleCommandFactory;
+import org.apache.ambari.server.actionmanager.HostRoleCommandFactoryImpl;
+import org.apache.ambari.server.actionmanager.RequestFactory;
+import org.apache.ambari.server.actionmanager.StageFactory;
+import org.apache.ambari.server.agent.ExecutionCommand;
+import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorHelper;
+import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRequest;
+import 
org.apache.ambari.server.api.services.stackadvisor.recommendations.RecommendationResponse;
+import org.apache.ambari.server.audit.AuditLogger;
+import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper;
+import org.apache.ambari.server.controller.AmbariManagementController;
+import org.apache.ambari.server.controller.KerberosHelper;
+import org.apache.ambari.server.controller.KerberosHelperImpl;
+import org.apache.ambari.server.metadata.CachedRoleCommandOrderProvider;
+import org.apache.ambari.server.metadata.RoleCommandOrderProvider;
+import org.apache.ambari.server.orm.DBAccessor;
+import org.apache.ambari.server.orm.dao.ArtifactDAO;
+import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
+import org.apache.ambari.server.orm.dao.KerberosPrincipalDAO;
+import org.apache.ambari.server.orm.entities.RepositoryVersionEntity;
+import org.apache.ambari.server.orm.entities.UpgradeEntity;
+import org.apache.ambari.server.security.encryption.CredentialStoreService;
+import org.apache.ambari.server.stack.StackManagerFactory;
+import org.apache.ambari.server.stageplanner.RoleGraphFactory;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.ComponentInfo;
+import org.apache.ambari.server.state.Config;
+import org.apache.ambari.server.state.ConfigFactory;
+import org.apache.ambari.server.state.ConfigHelper;
+import org.apache.ambari.server.state.Host;
+import org.apache.ambari.server.state.HostComponentAdminState;
+import org.apache.ambari.server.state.PropertyInfo;
+import 

[15/50] [abbrv] ambari git commit: AMBARI-21836. Fix Upgrade failure because of missing table after AMBARI-21076 checkin.

2017-09-05 Thread lpuskas
AMBARI-21836. Fix Upgrade failure because of missing table after AMBARI-21076 
checkin.


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: d4ba96481c76487bc1fdd7fbde8392bc97c3226d
Parents: eef7b73
Author: Nishant 
Authored: Tue Aug 29 11:48:37 2017 +0530
Committer: Swapan Shridhar 
Committed: Wed Aug 30 12:38:46 2017 -0700

--
 .../java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java | 4 
 .../org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java  | 2 --
 2 files changed, 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d4ba9648/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
index b4e7a02..2bd0f93 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
@@ -386,9 +386,6 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
   }
 
   private void removeComponent(String componentName, String configPrefix) 
throws SQLException {
-String supersetConfigMappingRemoveSQL = String.format(
-"DELETE FROM %s WHERE type_name like '%s%%'",
-CLUSTER_CONFIG_MAPPING_TABLE, configPrefix);
 
 String serviceConfigMappingRemoveSQL = String.format(
 "DELETE FROM %s WHERE config_id IN (SELECT config_id from %s where 
type_name like '%s%%')",
@@ -410,7 +407,6 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
 "DELETE FROM %s WHERE component_name = '%s'",
 SERVICE_COMPONENT_DESIRED_STATE, componentName);
 
-dbAccessor.executeQuery(supersetConfigMappingRemoveSQL);
 dbAccessor.executeQuery(serviceConfigMappingRemoveSQL);
 dbAccessor.executeQuery(supersetConfigRemoveSQL);
 dbAccessor.executeQuery(hostComponentDesiredStateRemoveSQL);

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4ba9648/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
index b6c323e..d8e8171 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
@@ -487,8 +487,6 @@ public class UpgradeCatalog260Test {
 
expect(statement.executeQuery(anyObject(String.class))).andReturn(resultSet).anyTimes();
 
expect(configuration.getDatabaseType()).andReturn(Configuration.DatabaseType.POSTGRES).anyTimes();
 
-dbAccessor.executeQuery("DELETE FROM clusterconfigmapping WHERE type_name 
like 'druid-superset%'");
-expectLastCall().once();
 dbAccessor.executeQuery("DELETE FROM serviceconfigmapping WHERE config_id 
IN (SELECT config_id from clusterconfig where type_name like 
'druid-superset%')");
 expectLastCall().once();
 dbAccessor.executeQuery("DELETE FROM clusterconfig WHERE type_name like 
'druid-superset%'");



[01/50] [abbrv] ambari git commit: AMBARI-21787. By Default Zeppelin notes should be visible only to Owner (note creator). (Prabhjyot Singh via gauravn7) [Forced Update!]

2017-09-05 Thread lpuskas
Repository: ambari
Updated Branches:
  refs/heads/feature-branch-AMBARI-21307 f5f29b312 -> 44aeca5d2 (forced update)


AMBARI-21787. By Default Zeppelin notes should be visible only to Owner (note 
creator). (Prabhjyot Singh via gauravn7)


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: ae80b6e7c6027ed90e27c94922e4faa9ed0dca9e
Parents: 1c506ff
Author: Gaurav Nagar 
Authored: Wed Aug 30 11:21:01 2017 +0530
Committer: Gaurav Nagar 
Committed: Wed Aug 30 11:21:01 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml  |  8 +++-
 .../ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml  | 10 --
 2 files changed, 15 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ae80b6e7/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
index 13d726b..6f16a98 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
@@ -183,11 +183,17 @@
   
   
 zeppelin.anonymous.allowed
-true
+false
 Anonymous user allowed by default
 
   
   
+zeppelin.notebook.public
+false
+Make notebook public by default when created, private 
otherwise
+
+  
+  
 zeppelin.websocket.max.text.message.size
 1024000
 Size in characters of the maximum text message to be received 
by websocket. Defaults to 1024000

http://git-wip-us.apache.org/repos/asf/ambari/blob/ae80b6e7/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml
index c0ce711..662b70c 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml
@@ -176,9 +176,15 @@
   
   
 zeppelin.anonymous.allowed
-true
+false
 Anonymous user allowed by default
-
+
+  
+  
+zeppelin.notebook.public
+false
+Make notebook public by default when created, private 
otherwise
+
   
   
 zeppelin.websocket.max.text.message.size



  1   2   >