ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbhowm...@apache.org
Subject ambari git commit: AMBARI-19817. Hive View 2.0: Introduce service checks. (dipayanb)
Date Thu, 02 Feb 2017 06:37:56 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 3f41dbc80 -> d1c9c9174


AMBARI-19817. Hive View 2.0: Introduce service checks. (dipayanb)


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

Branch: refs/heads/branch-2.5
Commit: d1c9c9174a86958ddbc0eb4d89d39d43c3928d58
Parents: 3f41dbc
Author: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Authored: Thu Feb 2 12:07:37 2017 +0530
Committer: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Committed: Thu Feb 2 12:07:37 2017 +0530

----------------------------------------------------------------------
 .../resources/ui/app/adapters/application.js    |  16 +++
 .../resources/ui/app/adapters/service-check.js  |  42 +++++++
 .../ui/app/components/service-check-entry.js    |  50 ++++++++
 .../ui/app/components/top-application-bar.js    |   1 +
 .../ui/app/configs/service-check-status.js      |  19 +++
 .../resources/ui/app/controllers/application.js |  25 ++++
 .../ui/app/controllers/service-check.js         |  66 +++++++++++
 .../hive20/src/main/resources/ui/app/router.js  |   2 +
 .../main/resources/ui/app/routes/application.js |   9 ++
 .../resources/ui/app/routes/service-check.js    |  28 +++++
 .../resources/ui/app/services/service-check.js  | 117 +++++++++++++++++++
 .../resources/ui/app/templates/application.hbs  |  13 ++-
 .../components/service-check-entry.hbs          |  47 ++++++++
 .../components/top-application-bar.hbs          |  12 +-
 .../ui/app/templates/service-check.hbs          |  42 +++++++
 15 files changed, 480 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/adapters/application.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/adapters/application.js b/contrib/views/hive20/src/main/resources/ui/app/adapters/application.js
index c0189cc..1cdab9e 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/adapters/application.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/adapters/application.js
@@ -57,7 +57,23 @@ export default DS.RESTAdapter.extend({
       // basic authorization. This is for default admin/admin username/password combination.
       headers['Authorization'] = 'Basic YWRtaW46YWRtaW4=';
       //headers['Authorization'] = 'Basic aGl2ZTpoaXZl';
+      //headers['Authorization'] = 'Basic ZGlwYXlhbjpkaXBheWFu';
     }
      return headers;
   }),
+
+  parseErrorResponse(responseText) {
+    let json = this._super(responseText);
+    let error = {};
+    error.message = json.message;
+    error.trace = json.trace;
+    error.status = json.status;
+
+    delete json.trace;
+    delete json.status;
+    delete json.message;
+
+    json.errors = error;
+    return json;
+  }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/adapters/service-check.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/adapters/service-check.js b/contrib/views/hive20/src/main/resources/ui/app/adapters/service-check.js
new file mode 100644
index 0000000..22bf1b6
--- /dev/null
+++ b/contrib/views/hive20/src/main/resources/ui/app/adapters/service-check.js
@@ -0,0 +1,42 @@
+/**
+ * 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 ApplicationAdapter from './application';
+
+export default ApplicationAdapter.extend({
+
+  doHdfsSeriveCheck() {
+    let url = this.buildURL() + '/hive/hdfsStatus';
+    return this.ajax(url, 'GET');
+  },
+
+  doUserHomeCheck() {
+    let url = this.buildURL() + '/hive/userhomeStatus';
+    return this.ajax(url, 'GET');
+  },
+
+  doAtsCheck() {
+    let url = this.buildURL() + '/hive/atsStatus';
+    return this.ajax(url, 'GET');
+  },
+
+  doHiveCheck() {
+    let url = this.buildURL() + '/connection/connect';
+    return this.ajax(url, 'GET');
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/components/service-check-entry.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/service-check-entry.js
b/contrib/views/hive20/src/main/resources/ui/app/components/service-check-entry.js
new file mode 100644
index 0000000..7849f69
--- /dev/null
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/service-check-entry.js
@@ -0,0 +1,50 @@
+/**
+ * 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 Ember from 'ember';
+import STATUS from '../configs/service-check-status';
+
+export default Ember.Component.extend({
+  classNames: ['col-md-12', 'alert'],
+  classNameBindings: ['alertType'],
+
+  errorExpanded: false,
+
+  alertType: Ember.computed('status', function() {
+    const status = this.get('status');
+    return status === STATUS.notStarted ? 'alert-info' :
+      status === STATUS.started ? 'alert-info' :
+        status === STATUS.completed ? 'alert-success' :
+          status === STATUS.errored ? 'alert-danger' : '';
+  }),
+
+  iconName: Ember.computed('status', function() {
+    const status = this.get('status');
+    let iconName = status === STATUS.notStarted ? 'stop' :
+      status === STATUS.started ? 'location-arrow' :
+      status === STATUS.completed ? 'check' :
+      status === STATUS.errored ? 'times' : '';
+    return iconName;
+  }),
+
+  actions: {
+    toggleError() {
+      this.toggleProperty('errorExpanded');
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/components/top-application-bar.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/top-application-bar.js
b/contrib/views/hive20/src/main/resources/ui/app/components/top-application-bar.js
index 8828275..bef9b51 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/top-application-bar.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/top-application-bar.js
@@ -19,4 +19,5 @@
 import Ember from 'ember';
 
 export default Ember.Component.extend({
+  service: false
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/configs/service-check-status.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/configs/service-check-status.js
b/contrib/views/hive20/src/main/resources/ui/app/configs/service-check-status.js
new file mode 100644
index 0000000..2810e80
--- /dev/null
+++ b/contrib/views/hive20/src/main/resources/ui/app/configs/service-check-status.js
@@ -0,0 +1,19 @@
+/**
+ * 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 default { notStarted: 'NOT_STARTED', started: 'STARTED', completed: 'COMPLETED', errored:
'ERRORED'};

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/controllers/application.js b/contrib/views/hive20/src/main/resources/ui/app/controllers/application.js
new file mode 100644
index 0000000..54df442
--- /dev/null
+++ b/contrib/views/hive20/src/main/resources/ui/app/controllers/application.js
@@ -0,0 +1,25 @@
+/**
+ * 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 Ember from 'ember';
+
+export default Ember.Controller.extend({
+  serviceCheck: Ember.inject.service(),
+
+  serviceCheckCompleted: Ember.computed.alias('serviceCheck.transitionToApplication')
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/controllers/service-check.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/controllers/service-check.js b/contrib/views/hive20/src/main/resources/ui/app/controllers/service-check.js
new file mode 100644
index 0000000..8a621db
--- /dev/null
+++ b/contrib/views/hive20/src/main/resources/ui/app/controllers/service-check.js
@@ -0,0 +1,66 @@
+/**
+ * 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 Ember from 'ember';
+
+export default Ember.Controller.extend({
+  serviceCheck: Ember.inject.service(),
+  hdfsError: null,
+  userHomeError: null,
+  atsError: null,
+  hiveError: null,
+
+  progressStyle: Ember.computed('serviceCheck.percentCompleted', function() {
+    let percentCompleted = this.get('serviceCheck.percentCompleted');
+    return `width: ${percentCompleted}%;`;
+  }),
+
+  hasError: Ember.computed('hdfsError', 'userHomeError', 'atsError', 'hiveError', function()
{
+    return !(Ember.isEmpty(this.get('hdfsError'))
+      && Ember.isEmpty(this.get('userHomeError'))
+      && Ember.isEmpty(this.get('atsError'))
+      && Ember.isEmpty(this.get('hiveError')));
+  }),
+
+  transitioner: Ember.observer('serviceCheck.transitionToApplication', function() {
+    if(this.get('serviceCheck.transitionToApplication')) {
+      this.transitionToRoute('application');
+    }
+  }),
+
+  init() {
+    this._super(...arguments);
+    this.get('serviceCheck').check().then((data) => {
+      if(data.userHomePromise.state === 'rejected') {
+        this.set('userHomeError', data.userHomePromise.reason.errors);
+      }
+
+      if(data.hdfsPromise.state === 'rejected') {
+        this.set('userHomeError', data.hdfsPromise.reason.errors);
+      }
+
+      if(data.atsPromise.state === 'rejected') {
+        this.set('atsError', data.atsError.reason.errors);
+      }
+
+      if(data.hivePromise.state === 'rejected') {
+        this.set('atsError', data.hiveError.reason.errors);
+      }
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/router.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/router.js b/contrib/views/hive20/src/main/resources/ui/app/router.js
index b9db38d..bc9bfa5 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/router.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/router.js
@@ -25,6 +25,8 @@ const Router = Ember.Router.extend({
 });
 
 Router.map(function() {
+  this.route('service-check');
+
   this.route('jobs');
   this.route('udfs');
   this.route('settings');

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/routes/application.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/application.js b/contrib/views/hive20/src/main/resources/ui/app/routes/application.js
index aa77897..697f727 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/application.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/application.js
@@ -21,12 +21,21 @@ import tabs from '../configs/top-level-tabs';
 
 export default Ember.Route.extend({
   keepAlive: Ember.inject.service('keep-alive'),
+  serviceCheck: Ember.inject.service(),
   init: function () {
     this._super(...arguments);
     this.get('keepAlive').initialize();
   },
+
+  beforeModel() {
+    if (!this.get('serviceCheck.checkCompleted')) {
+      this.transitionTo('service-check');
+    }
+  },
+
   setupController: function (controller, model) {
     this._super(controller, model);
     controller.set('tabs', tabs);
   }
+
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/routes/service-check.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/service-check.js b/contrib/views/hive20/src/main/resources/ui/app/routes/service-check.js
new file mode 100644
index 0000000..83111cd
--- /dev/null
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/service-check.js
@@ -0,0 +1,28 @@
+/**
+ * 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 Ember from 'ember';
+
+export default Ember.Route.extend({
+  serviceCheck: Ember.inject.service(),
+  beforeModel() {
+    if (this.get('serviceCheck.checkCompleted')) {
+      this.transitionTo('application');
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/services/service-check.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/services/service-check.js b/contrib/views/hive20/src/main/resources/ui/app/services/service-check.js
new file mode 100644
index 0000000..608cafe
--- /dev/null
+++ b/contrib/views/hive20/src/main/resources/ui/app/services/service-check.js
@@ -0,0 +1,117 @@
+/**
+ * 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 Ember from 'ember';
+import STATUS from '../configs/service-check-status';
+
+export default Ember.Service.extend({
+
+  store: Ember.inject.service(),
+
+  transitionToApplication: false,
+
+  hdfsCheckStatus: STATUS.notStarted,
+  atsCheckStatus: STATUS.notStarted,
+  userHomeCheckStatus: STATUS.notStarted,
+  hiveCheckStatus: STATUS.notStarted,
+  percentCompleted: Ember.computed('hdfsCheckStatus', 'atsCheckStatus', 'userHomeCheckStatus',
'hiveCheckStatus', function () {
+    let percent = 0;
+    percent += this.get('hdfsCheckStatus') === STATUS.completed ? 25 : 0;
+    percent += this.get('atsCheckStatus') === STATUS.completed ? 25 : 0;
+    percent += this.get('userHomeCheckStatus') === STATUS.completed ? 25 : 0;
+    percent += this.get('hiveCheckStatus') === STATUS.completed ? 25 : 0;
+    return percent;
+  }),
+
+  checkCompleted: Ember.computed('percentCompleted', function () {
+    return this.get('percentCompleted') === 100;
+  }),
+
+  transitioner: Ember.observer('checkCompleted', function() {
+    if(this.get('checkCompleted')) {
+      Ember.run.later(() => {
+        this.set('transitionToApplication', true);
+      }, 2000);
+    }
+  }),
+
+  check() {
+    let promises = {
+      hdfsPromise: this._doHdfsCheck(),
+      atsPromise: this._doAtsCheck(),
+      userHomePromise: this._doUserHomeCheck(),
+       hivePromise: this._doHiveCheck()
+    };
+    return Ember.RSVP.hashSettled(promises);
+  },
+
+  _getServiceCheckAdapter: function () {
+    return this.get('store').adapterFor('service-check');
+  },
+
+  _doHdfsCheck() {
+    return this._doCheck( 'hdfsCheckStatus',
+      (adapter) => adapter.doHdfsSeriveCheck(),
+      this._identity(), this._identity());
+  },
+
+  _doAtsCheck() {
+    return this._doCheck( 'atsCheckStatus',
+      (adapter) => adapter.doAtsCheck(),
+      this._identity(), this._identity());
+  },
+
+  _doUserHomeCheck() {
+    return this._doCheck( 'userHomeCheckStatus',
+      (adapter) => adapter.doUserHomeCheck(),
+      this._identity(), this._identity());
+  },
+
+  _doHiveCheck() {
+    return this._doCheck( 'hiveCheckStatus',
+      (adapter) => adapter.doHiveCheck(),
+      this._identity(),
+      (err) => {
+        // TODO: things to take care of related to LDAP
+        return err;
+      }
+    );
+  },
+
+  _doCheck(statusVar, checkFn, successFn, errorFn) {
+    return new Ember.RSVP.Promise((resolve, reject) => {
+      this.set(statusVar, STATUS.started);
+      checkFn(this._getServiceCheckAdapter()).then((data) => {
+        this.set(statusVar, STATUS.completed);
+        let finalData = (typeof successFn === 'function') ? successFn(data) : data;
+        resolve(finalData);
+      }).catch((err) => {
+        this.set(statusVar, STATUS.errored);
+        let finalData = (typeof errorFn === 'function') ? errorFn(err) : err;
+        reject(finalData);
+      })
+    });
+
+  },
+
+  _identity() {
+    return (data) => data;
+  }
+
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/application.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/application.hbs
index 7d6259c..ea532df 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/application.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/application.hbs
@@ -24,10 +24,15 @@
   </div>
   <div class="row">
     <div class="col-md-12">
-      {{top-application-bar}}
-      {{#tabs-pane tabs=tabs as |tab|}}
-        {{tabs-item tab=tab tabs=tabs}}
-      {{/tabs-pane}}
+      {{#if serviceCheckCompleted}}
+        {{top-application-bar}}
+        {{#tabs-pane tabs=tabs as |tab|}}
+          {{tabs-item tab=tab tabs=tabs}}
+        {{/tabs-pane}}
+      {{else}}
+        {{top-application-bar service=true}}
+      {{/if}}
+
     </div>
   </div>
   <div class="row">

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/templates/components/service-check-entry.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/service-check-entry.hbs
b/contrib/views/hive20/src/main/resources/ui/app/templates/components/service-check-entry.hbs
new file mode 100644
index 0000000..56e496e
--- /dev/null
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/service-check-entry.hbs
@@ -0,0 +1,47 @@
+{{!
+* 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.
+}}
+
+<p>
+  {{#fa-stack size="lg" as |s|}}
+    {{s.stack-2x "circle-thin"}}
+    {{s.stack-1x iconName}}
+  {{/fa-stack}}
+  <strong>{{label}}</strong>
+</p>
+
+
+{{#if error}}
+  <p>
+    <strong>Message: </strong>{{error.message}}
+    <a href="#" class="btn btn-sm btn-warning"{{action "toggleError"}}>
+      {{#if errorExpanded}}
+        {{fa-icon 'chevron-up'}} Show less
+      {{else}}
+        {{fa-icon 'chevron-down'}} Show more
+      {{/if}}
+    </a>
+  </p>
+
+
+  {{#if errorExpanded}}
+    <p>
+      <pre>{{error.trace}}</pre>
+    </p>
+  {{/if}}
+{{/if}}
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/templates/components/top-application-bar.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/top-application-bar.hbs
b/contrib/views/hive20/src/main/resources/ui/app/templates/components/top-application-bar.hbs
index 6f451e9..2d85558 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/top-application-bar.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/top-application-bar.hbs
@@ -17,9 +17,11 @@
 }}
 
 <h3 class="clearfix">
-  <strong>HIVE</strong>
-  <span class="pull-right">
-    {{#link-to 'queries.new' class="btn btn-sm btn-success"}}{{fa-icon "plus"}} NEW JOB{{/link-to}}
-    {{#link-to 'databases.newtable' class="btn btn-sm btn-success"}}{{fa-icon "plus"}} NEW
TABLE{{/link-to}}
-  </span>
+  <strong>HIVE {{#if service}}<small>SERVICE CHECKS</small>{{/if}}</strong>
+  {{#if (not service)}}
+    <span class="pull-right">
+      {{#link-to 'queries.new' class="btn btn-sm btn-success"}}{{fa-icon "plus"}} NEW JOB{{/link-to}}
+        {{#link-to 'databases.newtable' class="btn btn-sm btn-success"}}{{fa-icon "plus"}}
NEW TABLE{{/link-to}}
+    </span>
+  {{/if}}
 </h3>

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1c9c917/contrib/views/hive20/src/main/resources/ui/app/templates/service-check.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/service-check.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/service-check.hbs
new file mode 100644
index 0000000..8233c93
--- /dev/null
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/service-check.hbs
@@ -0,0 +1,42 @@
+{{!
+* 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.
+}}
+
+<div class="col-md-offset-2 col-md-8">
+  <div class="progress">
+    <div class="progress-bar {{if hasError 'progress-bar-danger'}} {{if serviceCheck.checkCompleted
'progress-bar-success'}}" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"
style={{progressStyle}}>
+    </div>
+  </div>
+
+  {{service-check-entry label="HDFS Check"
+                        status=serviceCheck.hdfsCheckStatus
+                        error=hdfsError
+  }}
+  {{service-check-entry label="USER HOME Check"
+                        status=serviceCheck.userHomeCheckStatus
+                        error=userHomeError
+  }}
+  {{service-check-entry label="ATS Check"
+                        status=serviceCheck.atsCheckStatus
+                        error=atsError
+  }}
+  {{service-check-entry label="HIVE Check"
+                        status=serviceCheck.hiveCheckStatus
+                        error=hiveError
+  }}
+
+</div>


Mime
View raw message