瀏覽代碼

AMBARI-19981. Hive View 2.0: Enable Notifications. (dipayanb)

Dipayan Bhowmick 8 年之前
父節點
當前提交
692bf97591
共有 27 個文件被更改,包括 387 次插入66 次删除
  1. 5 1
      contrib/views/hive20/src/main/resources/ui/app/components/create-table.js
  2. 3 1
      contrib/views/hive20/src/main/resources/ui/app/configs/file-format.js
  3. 30 0
      contrib/views/hive20/src/main/resources/ui/app/controllers/messages.js
  4. 31 0
      contrib/views/hive20/src/main/resources/ui/app/controllers/messages/message.js
  5. 27 0
      contrib/views/hive20/src/main/resources/ui/app/helpers/alert-message-context-class.js
  6. 37 0
      contrib/views/hive20/src/main/resources/ui/app/helpers/alert-message-icon-class.js
  7. 32 0
      contrib/views/hive20/src/main/resources/ui/app/helpers/shorten-text.js
  8. 15 0
      contrib/views/hive20/src/main/resources/ui/app/mixins/ui-logger.js
  9. 7 5
      contrib/views/hive20/src/main/resources/ui/app/routes/databases.js
  10. 6 9
      contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new-database.js
  11. 5 3
      contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new.js
  12. 5 3
      contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table.js
  13. 6 10
      contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/edit.js
  14. 6 9
      contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/rename.js
  15. 0 3
      contrib/views/hive20/src/main/resources/ui/app/routes/jobs.js
  16. 5 5
      contrib/views/hive20/src/main/resources/ui/app/routes/settings.js
  17. 9 4
      contrib/views/hive20/src/main/resources/ui/app/services/alert-messages.js
  18. 21 0
      contrib/views/hive20/src/main/resources/ui/app/templates/databases-loading.hbs
  19. 24 0
      contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables-loading.hbs
  20. 21 0
      contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table-loading.hbs
  21. 20 0
      contrib/views/hive20/src/main/resources/ui/app/templates/jobs-loading.hbs
  22. 5 9
      contrib/views/hive20/src/main/resources/ui/app/templates/messages.hbs
  23. 3 3
      contrib/views/hive20/src/main/resources/ui/app/templates/messages/message.hbs
  24. 21 0
      contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries-loading.hbs
  25. 21 0
      contrib/views/hive20/src/main/resources/ui/app/templates/settings-loading.hbs
  26. 21 0
      contrib/views/hive20/src/main/resources/ui/app/templates/udfs-loading.hbs
  27. 1 1
      contrib/views/hive20/src/main/resources/ui/config/environment.js

+ 5 - 1
contrib/views/hive20/src/main/resources/ui/app/components/create-table.js

@@ -18,13 +18,17 @@
 
 import Ember from 'ember';
 import Helper from '../configs/helpers';
+import FileFormats from '../configs/file-format';
 
 export default Ember.Component.extend({
   init() {
     this._super(...arguments);
+    let defaultFileFormat = FileFormats.findBy('default', true);
     this.set('columns', Ember.A());
     this.set('properties', []);
-    this.set('settings', {});
+    this.set('settings', {
+      fileFormat: { type: defaultFileFormat.name}
+    });
     this.set('shouldAddBuckets', null);
     this.set('settingErrors', []);
   },

+ 3 - 1
contrib/views/hive20/src/main/resources/ui/app/configs/file-format.js

@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-export default [
+let fileFormats = [
   {name: "SEQUENCEFILE", default: false, custom: false},
   {name: "TEXTFILE", default: false, custom: false},
   {name: "RCFILE", default: false, custom: false},
@@ -24,3 +24,5 @@ export default [
   {name: "AVRO", default: false, custom: false},
   {name: "CUSTOM SerDe", default: false, custom: true},
 ];
+
+export default fileFormats;

+ 30 - 0
contrib/views/hive20/src/main/resources/ui/app/controllers/messages.js

@@ -0,0 +1,30 @@
+/**
+ * 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({
+  isExpanded: true,
+  shortenLength: Ember.computed('isExpanded', function() {
+    if(this.get('isExpanded') === true) {
+      return 200;
+    } else {
+      return 100;
+    }
+  })
+});

+ 31 - 0
contrib/views/hive20/src/main/resources/ui/app/controllers/messages/message.js

@@ -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 Ember from 'ember';
+
+export default Ember.Controller.extend({
+
+  showStatus: Ember.computed('model', function() {
+    return this.get('model.status') !== -1;
+  }),
+
+  displayBody: Ember.computed('model', function() {
+    return !(Ember.isBlank(this.get('model.responseMessage'))
+      && Ember.isBlank(this.get('model.trace')));
+  })
+});

+ 27 - 0
contrib/views/hive20/src/main/resources/ui/app/helpers/alert-message-context-class.js

@@ -0,0 +1,27 @@
+/**
+ * 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 function alertMessageContextClass(params) {
+  let messageType = params[0];
+  let prefix = params[1];
+  return `${prefix}${messageType}`;
+}
+
+export default Ember.Helper.helper(alertMessageContextClass);

+ 37 - 0
contrib/views/hive20/src/main/resources/ui/app/helpers/alert-message-icon-class.js

@@ -0,0 +1,37 @@
+/**
+ * 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 function alertMessageIconClass(params) {
+  let type = params[0];
+  switch (type) {
+    case 'success':
+      return 'check';
+    case 'info':
+      return 'info';
+    case 'warning':
+      return 'exclamation';
+    case 'danger':
+      return 'times';
+    default:
+      return 'check';
+  }
+}
+
+export default Ember.Helper.helper(alertMessageIconClass);

+ 32 - 0
contrib/views/hive20/src/main/resources/ui/app/helpers/shorten-text.js

@@ -0,0 +1,32 @@
+/**
+ * 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 function shortenText(params) {
+  let text = params[0];
+  let length = params[1];
+  if (text.length < length) {
+    return text;
+  } else {
+    return text.substring(0, length - 3) + '...';
+  }
+
+}
+
+export default Ember.Helper.helper(shortenText);

+ 15 - 0
contrib/views/hive20/src/main/resources/ui/app/mixins/ui-logger.js

@@ -0,0 +1,15 @@
+import Ember from 'ember';
+
+export default Ember.Mixin.create({
+  logger: Ember.inject.service('alert-messages'),
+
+  extractError(error) {
+    if (Ember.isArray(error.errors) && (error.errors.length >= 0)) {
+      return error.errors[0];
+    } else if(!Ember.isEmpty(error.errors)) {
+      return error.errors;
+    } else {
+      return error;
+    }
+  }
+});

+ 7 - 5
contrib/views/hive20/src/main/resources/ui/app/routes/databases.js

@@ -17,8 +17,9 @@
  */
 
 import Ember from 'ember';
+import UILoggerMixin from '../mixins/ui-logger';
 
-export default Ember.Route.extend({
+export default Ember.Route.extend(UILoggerMixin, {
   tableOperations: Ember.inject.service(),
 
   model() {
@@ -93,7 +94,8 @@ export default Ember.Route.extend({
           this.controller.set('deleteDatabaseMessage', 'Waiting for the database to be deleted');
           this.get('tableOperations').waitForJobToComplete(job.get('id'), 5 * 1000)
             .then((status) => {
-              this.controller.set('deleteDatabaseMessage', "Successfully Deleted table");
+              this.controller.set('deleteDatabaseMessage', "Successfully deleted database");
+              this.get('logger').success(`Successfully deleted database '${databaseModel.get('name')}'`);
               Ember.run.later(() => {
                 this.store.unloadRecord(databaseModel);
                 this.controller.set('showDeleteDatabaseModal', false);
@@ -102,16 +104,16 @@ export default Ember.Route.extend({
                 this.refresh();
               }, 2 * 1000);
             }, (error) => {
-              // TODO: handle error
+              this.get('logger').danger(`Failed to delete database '${databaseModel.get('name')}'`, this.extractError(error));
               Ember.run.later(() => {
                 this.controller.set('showDeleteDatabaseModal', false);
                 this.controller.set('deleteDatabaseMessage');
                 this.replaceWith('databases');
                 this.refresh();
-              }, 2 * 1000);
+              }, 1 * 1000);
             });
         }, (error) => {
-          console.log("Error encountered", error);
+          this.get('logger').danger(`Failed to delete database '${databaseModel.get('name')}'`, this.extractError(error));
           this.controller.set('showDeleteDatabaseModal', false);
         });
     },

+ 6 - 9
contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new-database.js

@@ -17,8 +17,9 @@
  */
 
 import Ember from 'ember';
+import UILoggerMixin from '../../../../mixins/ui-logger';
 
-export default Ember.Route.extend({
+export default Ember.Route.extend(UILoggerMixin, {
 
   tableOperations: Ember.inject.service(),
 
@@ -40,10 +41,10 @@ export default Ember.Route.extend({
     }).then((status) => {
       this._modalStatus(true, 'Successfully created database');
       this._transitionToDatabases(newDatabaseName);
+      this.get('logger').success(`Successfully created database '${newDatabaseName}'`);
     }).catch((err) => {
-      this._modalStatus(true, 'Failed to create database');
-      this._alertMessage('Failed to create database', err);
-      this._transitionToDatabases();
+      this._modalStatus(false);
+      this.get('logger').danger(`Failed to create database '${newDatabaseName}'`, this.extractError(err));
     });
   },
 
@@ -59,10 +60,6 @@ export default Ember.Route.extend({
       this._modalStatus(false);
       this.transitionTo('databases');
     }, 2000);
-  },
-
-  _alertMessage(message, err) {
-    console.log(message, err);
-    // TODO: user alert message here
   }
+
 });

+ 5 - 3
contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new.js

@@ -18,8 +18,9 @@
 
 import Ember from 'ember';
 import tabs from '../../../../configs/create-table-tabs';
+import UILoggerMixin from '../../../../mixins/ui-logger';
 
-export default Ember.Route.extend({
+export default Ember.Route.extend(UILoggerMixin, {
   tableOperations: Ember.inject.service(),
 
   setupController(controller, model) {
@@ -44,6 +45,7 @@ export default Ember.Route.extend({
         return this.get('tableOperations').waitForJobToComplete(job.get('id'), 5 * 1000)
           .then((status) => {
             this.controller.set('createTableMessage', "Successfully created table");
+            this.get('logger').success(`Successfully created table '${settings.name}'`);
             Ember.run.later(() => {
             this.controller.set('showCreateTableModal', false);
             this.controller.set('createTableMessage');
@@ -55,7 +57,7 @@ export default Ember.Route.extend({
             }, 2 * 1000);
             return Ember.RSVP.Promise.resolve(job);
           }, (error) => {
-            // TODO: handle error
+            this.get('logger').danger(`Failed to create table '${settings.name}'`, this.extractError(error));
             Ember.run.later(() => {
               this.controller.set('showCreateTableModal', false);
               this.controller.set('createTableMessage');
@@ -67,7 +69,7 @@ export default Ember.Route.extend({
             return Ember.RSVP.Promise.reject(error);
           });
       }, (error) => {
-        console.log("Error encountered", error);
+        this.get('logger').danger(`Failed to create table '${settings.name}'`, this.extractError(error));
         this.controller.set('showCreateTableModal', true);
         throw error;
       });

+ 5 - 3
contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table.js

@@ -18,8 +18,9 @@
 
 import Ember from 'ember';
 import tabs from '../../../../configs/table-level-tabs';
+import UILoggerMixin from '../../../../mixins/ui-logger';
 
-export default Ember.Route.extend({
+export default Ember.Route.extend(UILoggerMixin, {
   tableOperations: Ember.inject.service(),
   model(params) {
     let database = this.modelFor('databases.database').get('name');
@@ -65,6 +66,7 @@ export default Ember.Route.extend({
         this.get('tableOperations').waitForJobToComplete(job.get('id'), 5 * 1000)
           .then((status) => {
             this.controller.set('deleteTableMessage', "Successfully Deleted table");
+            this.get('logger').success(`Successfully deleted table '${tableInfo.get('table')}'`);
             Ember.run.later(() => {
               this.controller.set('showDeleteTableModal', false);
               this.controller.set('deleteTableMessage');
@@ -73,7 +75,7 @@ export default Ember.Route.extend({
               this.transitionTo('databases.database', databaseModel.get('name'));
             }, 2 * 1000);
           }, (error) => {
-            // TODO: handle error
+            this.get('logger').danger(`Failed to delete table '${tableInfo.get('table')}'`, this.extractError(error));
             Ember.run.later(() => {
               this.controller.set('showDeleteTableModal', false);
               this.controller.set('deleteTableMessage');
@@ -81,7 +83,7 @@ export default Ember.Route.extend({
             }, 2 * 1000);
           });
       }, (error) => {
-        console.log("Error encountered", error);
+        this.get('logger').danger(`Failed to delete table '${tableInfo.get('table')}'`, this.extractError(error));
         this.controller.set('showDeleteTableModal', true);
       });
   },

+ 6 - 10
contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/edit.js

@@ -18,8 +18,9 @@
 
 import TableMetaRouter from './table-meta-router';
 import tabs from '../../../../../configs/edit-table-tabs';
+import UILoggerMixin from '../../../../../mixins/ui-logger';
 
-export default TableMetaRouter.extend({
+export default TableMetaRouter.extend(UILoggerMixin, {
 
   tableOperations: Ember.inject.service(),
 
@@ -51,12 +52,12 @@ export default TableMetaRouter.extend({
         this._modalStatus(true, 'Waiting for the table edit job to complete');
         return this.get('tableOperations').waitForJobToComplete(job.get('id'), 5 * 1000);
       }).then((status) => {
-        this._modalStatus(true, 'Successfully edited the table');
+        this._modalStatus(true, 'Successfully altered table');
+        this.get('logger').success(`Successfully altered table '${settings.table}'`);
         this._transitionToTables();
       }).catch((err) => {
-        this._modalStatus(true, 'Failed to edit table');
-        this._alertMessage('Failed to edit table', err);
-        this._transitionToTables();
+        this._modalStatus(false, 'Failed to edit table');
+        this.get('logger').danger(`Failed to  altered table '${settings.table}'`, this.extractError(err));
       });
     }
 
@@ -75,11 +76,6 @@ export default TableMetaRouter.extend({
       this.send('refreshTableInfo');
       this.transitionTo('databases.database.tables.table');
     }, 2000);
-  },
-
-  _alertMessage(message, err) {
-    console.log(message, err);
-    // TODO: user alert message here
   }
 
 

+ 6 - 9
contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/rename.js

@@ -16,9 +16,11 @@
  * limitations under the License.
  */
 
+import Ember from 'ember';
 import TableMetaRouter from './table-meta-router';
+import UILoggerMixin from '../../../../../mixins/ui-logger';
 
-export default TableMetaRouter.extend({
+export default TableMetaRouter.extend(UILoggerMixin, {
 
   tableOperations: Ember.inject.service(),
 
@@ -52,11 +54,11 @@ export default TableMetaRouter.extend({
       return this.get('tableOperations').waitForJobToComplete(job.get('id'), 5 * 1000);
     }).then((status) => {
       this._modalStatus(true, 'Successfully renamed table');
+      this.get('logger').success(`Successfully renamed table '${oldTableName}' to '${newTableName}'`);
       this._transitionToTables();
     }).catch((err) => {
-      this._modalStatus(true, 'Failed to rename table');
-      this._alertMessage('Failed to rename table', err);
-      this._transitionToTables();
+      this._modalStatus(false, 'Failed to rename table');
+      this.get('logger').danger(`Failed to rename table '${oldTableName}' to '${newTableName}'`, this.extractError(err));
     });
   },
 
@@ -72,11 +74,6 @@ export default TableMetaRouter.extend({
       this._modalStatus(false);
       this.transitionTo('databases');
     }, 2000);
-  },
-
-  _alertMessage(message, err) {
-    console.log(message, err);
-    // TODO: user alert message here
   }
 
 

+ 0 - 3
contrib/views/hive20/src/main/resources/ui/app/routes/jobs.js

@@ -63,9 +63,6 @@ export default Ember.Route.extend({
       this.controller.set('startTime', this.get('moment').moment(startTime, 'YYYY-MM-DD').startOf('day').valueOf())
       this.controller.set('endTime', this.get('moment').moment(endTime, 'YYYY-MM-DD').endOf('day').valueOf())
       this.refresh();
-    },
-    hideDatePicker() {
-      console.log("Hiddennnnn");
     }
   }
 

+ 5 - 5
contrib/views/hive20/src/main/resources/ui/app/routes/settings.js

@@ -17,9 +17,10 @@
  */
 
 import Ember from 'ember';
-import hiveParams from '../configs/hive-parameters'
+import hiveParams from '../configs/hive-parameters';
+import UILoggerMixin from '../mixins/ui-logger';
 
-export default Ember.Route.extend({
+export default Ember.Route.extend(UILoggerMixin, {
   model() {
     return this.store.findAll('setting').then(settings => settings.toArray());
   },
@@ -63,16 +64,15 @@ export default Ember.Route.extend({
         let model = this.get('controller.model');
         model.removeObject(data);
       }, err => {
-        console.log('error in deletion');
+        this.get('logger').danger(`Failed to delete setting with key: '${setting.get('key')}`, this.extractError(err));
       })
     },
 
     updateAction(newSetting) {
       newSetting.save().then(data => {
-        console.log('saved', data);
         data.set('editMode', false);
       }, error => {
-        console.log('error', err);
+        this.get('logger').danger(`Failed to update setting with key: '${setting.get('key')}`, this.extractError(error));
       })
     },
 

+ 9 - 4
contrib/views/hive20/src/main/resources/ui/app/services/alert-messages.js

@@ -69,6 +69,10 @@ export default Ember.Service.extend({
     this._processMessage('danger', message, options, alertOptions);
   },
 
+  error: function() {
+    this.danger(...arguments);
+  },
+
   clearMessages: function() {
     this.get('flashMessages').clearMessages();
   },
@@ -82,13 +86,13 @@ export default Ember.Service.extend({
     }
     switch (type) {
       case 'success':
-        this.get('flashMessages').success(message, this._getOptions(alertOptions));
+        this.get('flashMessages').success(message, this._getOptions(Ember.merge(alertOptions, {sticky: false})));
         break;
       case 'warn':
-        this.get('flashMessages').warning(message, this._getOptions(alertOptions));
+        this.get('flashMessages').warning(message, this._getOptions(Ember.merge(alertOptions, {sticky: false})));
         break;
       case 'info':
-        this.get('flashMessages').info(message, this._getOptions(alertOptions));
+        this.get('flashMessages').info(message, this._getOptions(Ember.merge(alertOptions, {sticky: false})));
         break;
       case 'danger':
         this.get('flashMessages').danger(message, this._getOptions(alertOptions));
@@ -126,7 +130,8 @@ export default Ember.Service.extend({
     var defaultOptions = {
       priority: 100,
       showProgress: true,
-      timeout: 6000
+      timeout: 6000,
+      sticky: true
     };
     return Ember.merge(defaultOptions, options);
   },

+ 21 - 0
contrib/views/hive20/src/main/resources/ui/app/templates/databases-loading.hbs

@@ -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 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="alert alert-info text-center">
+  <p class="lead">Loading Databases. Please wait. {{fa-icon "refresh" spin=true}}</p>
+</div>

+ 24 - 0
contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables-loading.hbs

@@ -0,0 +1,24 @@
+{{!
+* 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="alert alert-info text-center">
+  <p class="lead">Loading Tables. Please wait. {{fa-icon "refresh" spin=true}}</p>
+</div>
+
+
+

+ 21 - 0
contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table-loading.hbs

@@ -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 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="alert alert-info text-center">
+  <p class="lead">Loading Table Information. Please wait. {{fa-icon "refresh" spin=true}}</p>
+</div>

+ 20 - 0
contrib/views/hive20/src/main/resources/ui/app/templates/jobs-loading.hbs

@@ -0,0 +1,20 @@
+{{!
+* 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="alert alert-info text-center">
+  <p class="lead">Loading Jobs. Please wait. {{fa-icon "refresh" spin=true}}</p>
+</div>

+ 5 - 9
contrib/views/hive20/src/main/resources/ui/app/templates/messages.hbs

@@ -17,12 +17,9 @@
 }}
 
 <div class="row">
-  <div class="col-md-12 messages-header">
-    <div class="col-md-1">
-      {{!--#link-to "files" (query-params path=currentBrowserPath) class="btn btn-primary"}}{{fa-icon "arrow-left"}} Browser{{/link-to--}}
-    </div>
-    <div class="col-md-2 col-md-offset-4 text-center">
-      <span class="messages-title">{{fa-icon "comment"}} Messages</span>
+  <div class="col-md-12 messages-header text-center">
+    <div class="alert alert-info">
+      <p class="lead">{{fa-icon "comment" size="lg" }} Notification Messages</p>
     </div>
   </div>
 </div>
@@ -30,7 +27,8 @@
   <div class={{if isExpanded "col-md-12" "col-md-4"}}>
     <div class="list-group">
       {{#each model as |message|}}
-        {{#link-to 'messages.message' message class=(alert-message-context-class message.type "list-group-item list-group-item-")}}
+        {{#link-to 'messages.message' message
+                   class=(alert-message-context-class message.type "list-group-item list-group-item-")}}
           <h4 class="list-group-item-heading wrap-message">
             {{#fa-stack}}
               {{fa-icon "circle-thin" stack=2}}
@@ -39,8 +37,6 @@
             {{{message.message}}}</h4>
           <p class="list-group-item-text wrap-message">{{shorten-text message.responseMessage shortenLength}}</p>
         {{/link-to}}
-      {{else}}
-        No messages present
       {{/each}}
     </div>
 

+ 3 - 3
contrib/views/hive20/src/main/resources/ui/app/templates/messages/message.hbs

@@ -27,18 +27,18 @@
   {{#if displayBody}}
     <div class="panel-body">
       {{#if showStatus}}
-        <p><strong>Server status:</strong> {{model.status}}</p>
+        <p><strong>Status:</strong> {{model.status}}</p>
         <hr/>
       {{/if}}
       {{#if model.responseMessage}}
-        {{alert-message-display title="Server Message:"
+        {{alert-message-display title="Message:"
         value=model.responseMessage
         shorten=true
         length=200}}
         <hr/>
       {{/if}}
       {{#if model.trace}}
-        {{alert-message-display title="Error trace:"
+        {{alert-message-display title="Trace:"
         value=model.trace
         shorten=true
         length=500}}

+ 21 - 0
contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries-loading.hbs

@@ -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 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="alert alert-info text-center">
+  <p class="lead">Loading Saved Queries. Please wait. {{fa-icon "refresh" spin=true}}</p>
+</div>

+ 21 - 0
contrib/views/hive20/src/main/resources/ui/app/templates/settings-loading.hbs

@@ -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 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="alert alert-info text-center">
+  <p class="lead">Loading Settings. Please wait. {{fa-icon "refresh" spin=true}}</p>
+</div>

+ 21 - 0
contrib/views/hive20/src/main/resources/ui/app/templates/udfs-loading.hbs

@@ -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 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="alert alert-info text-center">
+  <p class="lead">Loading Udfs. Please wait. {{fa-icon "refresh" spin=true}}</p>
+</div>

+ 1 - 1
contrib/views/hive20/src/main/resources/ui/config/environment.js

@@ -48,7 +48,7 @@ module.exports = function(environment) {
 
     // Change the value to false to prevent the service checks. This is required in development mode
     // as service checks take up time and hence increase the overall development time.
-    ENV.APP.SHOULD_PERFORM_SERVICE_CHECK = true;
+    ENV.APP.SHOULD_PERFORM_SERVICE_CHECK = false;
   }
 
   if (environment === 'test') {