Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D6C7E200C0F for ; Thu, 2 Feb 2017 07:37:58 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D555D160B57; Thu, 2 Feb 2017 06:37:58 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 82392160B54 for ; Thu, 2 Feb 2017 07:37:57 +0100 (CET) Received: (qmail 82252 invoked by uid 500); 2 Feb 2017 06:37:56 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 82243 invoked by uid 99); 2 Feb 2017 06:37:56 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2017 06:37:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 96620DFC31; Thu, 2 Feb 2017 06:37:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dbhowmick@apache.org To: commits@ambari.apache.org Message-Id: <137419827a9d40ed9dba36c2f8f2c181@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-19817. Hive View 2.0: Introduce service checks. (dipayanb) Date: Thu, 2 Feb 2017 06:37:56 +0000 (UTC) archived-at: Thu, 02 Feb 2017 06:37:59 -0000 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 Authored: Thu Feb 2 12:07:37 2017 +0530 Committer: Dipayan Bhowmick 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 @@
- {{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}} +
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. +}} + +

+ {{#fa-stack size="lg" as |s|}} + {{s.stack-2x "circle-thin"}} + {{s.stack-1x iconName}} + {{/fa-stack}} + {{label}} +

+ + +{{#if error}} +

+ Message: {{error.message}} + + {{#if errorExpanded}} + {{fa-icon 'chevron-up'}} Show less + {{else}} + {{fa-icon 'chevron-down'}} Show more + {{/if}} + +

+ + + {{#if errorExpanded}} +

+

{{error.trace}}
+

+ {{/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 @@ }}

- HIVE - - {{#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}} - + HIVE {{#if service}}SERVICE CHECKS{{/if}} + {{#if (not service)}} + + {{#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}} + + {{/if}}

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. +}} + +
+
+
+
+
+ + {{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 + }} + +