You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2017/02/13 23:44:15 UTC
ambari git commit: Revert "AMBARI-19981. Hive View 2.0: Enable
Notifications. (dipayanb)"
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 b0af5f741 -> 8fdc2b0ec
Revert "AMBARI-19981. Hive View 2.0: Enable Notifications. (dipayanb)"
This reverts commit 692bf97591a3538421720409bc3253451b8d8e0e.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8fdc2b0e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8fdc2b0e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8fdc2b0e
Branch: refs/heads/branch-2.5
Commit: 8fdc2b0ec32d3559887214043a918fce16124273
Parents: b0af5f7
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Mon Feb 13 15:43:54 2017 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Mon Feb 13 15:44:00 2017 -0800
----------------------------------------------------------------------
.../resources/ui/app/components/create-table.js | 6 +---
.../resources/ui/app/configs/file-format.js | 4 +--
.../resources/ui/app/controllers/messages.js | 30 ----------------
.../ui/app/controllers/messages/message.js | 31 ----------------
.../app/helpers/alert-message-context-class.js | 27 --------------
.../ui/app/helpers/alert-message-icon-class.js | 37 --------------------
.../resources/ui/app/helpers/shorten-text.js | 32 -----------------
.../main/resources/ui/app/mixins/ui-logger.js | 15 --------
.../main/resources/ui/app/routes/databases.js | 12 +++----
.../databases/database/tables/new-database.js | 15 ++++----
.../app/routes/databases/database/tables/new.js | 8 ++---
.../routes/databases/database/tables/table.js | 8 ++---
.../databases/database/tables/table/edit.js | 16 +++++----
.../databases/database/tables/table/rename.js | 15 ++++----
.../src/main/resources/ui/app/routes/jobs.js | 3 ++
.../main/resources/ui/app/routes/settings.js | 10 +++---
.../resources/ui/app/services/alert-messages.js | 13 +++----
.../ui/app/templates/databases-loading.hbs | 21 -----------
.../databases/database/tables-loading.hbs | 24 -------------
.../databases/database/tables/table-loading.hbs | 21 -----------
.../resources/ui/app/templates/jobs-loading.hbs | 20 -----------
.../resources/ui/app/templates/messages.hbs | 14 +++++---
.../ui/app/templates/messages/message.hbs | 6 ++--
.../ui/app/templates/savedqueries-loading.hbs | 21 -----------
.../ui/app/templates/settings-loading.hbs | 21 -----------
.../resources/ui/app/templates/udfs-loading.hbs | 21 -----------
.../src/main/resources/ui/config/environment.js | 2 +-
27 files changed, 66 insertions(+), 387 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/components/create-table.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/create-table.js b/contrib/views/hive20/src/main/resources/ui/app/components/create-table.js
index 670ebd7..f31d37f 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/create-table.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/create-table.js
@@ -18,17 +18,13 @@
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', {
- fileFormat: { type: defaultFileFormat.name}
- });
+ this.set('settings', {});
this.set('shouldAddBuckets', null);
this.set('settingErrors', []);
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/configs/file-format.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/configs/file-format.js b/contrib/views/hive20/src/main/resources/ui/app/configs/file-format.js
index afcba6e..4042b63 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/configs/file-format.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/configs/file-format.js
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-let fileFormats = [
+export default [
{name: "SEQUENCEFILE", default: false, custom: false},
{name: "TEXTFILE", default: false, custom: false},
{name: "RCFILE", default: false, custom: false},
@@ -24,5 +24,3 @@ let fileFormats = [
{name: "AVRO", default: false, custom: false},
{name: "CUSTOM SerDe", default: false, custom: true},
];
-
-export default fileFormats;
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/controllers/messages.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/controllers/messages.js b/contrib/views/hive20/src/main/resources/ui/app/controllers/messages.js
deleted file mode 100644
index 10aa612..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/controllers/messages.js
+++ /dev/null
@@ -1,30 +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 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;
- }
- })
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/controllers/messages/message.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/controllers/messages/message.js b/contrib/views/hive20/src/main/resources/ui/app/controllers/messages/message.js
deleted file mode 100644
index d46c1f6..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/controllers/messages/message.js
+++ /dev/null
@@ -1,31 +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 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')));
- })
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/helpers/alert-message-context-class.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/helpers/alert-message-context-class.js b/contrib/views/hive20/src/main/resources/ui/app/helpers/alert-message-context-class.js
deleted file mode 100644
index 28a5a8d..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/helpers/alert-message-context-class.js
+++ /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 Ember from 'ember';
-
-export function alertMessageContextClass(params) {
- let messageType = params[0];
- let prefix = params[1];
- return `${prefix}${messageType}`;
-}
-
-export default Ember.Helper.helper(alertMessageContextClass);
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/helpers/alert-message-icon-class.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/helpers/alert-message-icon-class.js b/contrib/views/hive20/src/main/resources/ui/app/helpers/alert-message-icon-class.js
deleted file mode 100644
index 707f2d1..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/helpers/alert-message-icon-class.js
+++ /dev/null
@@ -1,37 +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 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);
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/helpers/shorten-text.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/helpers/shorten-text.js b/contrib/views/hive20/src/main/resources/ui/app/helpers/shorten-text.js
deleted file mode 100644
index c50b5ca..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/helpers/shorten-text.js
+++ /dev/null
@@ -1,32 +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 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);
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/mixins/ui-logger.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/mixins/ui-logger.js b/contrib/views/hive20/src/main/resources/ui/app/mixins/ui-logger.js
deleted file mode 100644
index fb252d2..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/mixins/ui-logger.js
+++ /dev/null
@@ -1,15 +0,0 @@
-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;
- }
- }
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/routes/databases.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases.js
index 6b0eab2..123a93f 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases.js
@@ -17,9 +17,8 @@
*/
import Ember from 'ember';
-import UILoggerMixin from '../mixins/ui-logger';
-export default Ember.Route.extend(UILoggerMixin, {
+export default Ember.Route.extend({
tableOperations: Ember.inject.service(),
model() {
@@ -94,8 +93,7 @@ export default Ember.Route.extend(UILoggerMixin, {
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 database");
- this.get('logger').success(`Successfully deleted database '${databaseModel.get('name')}'`);
+ this.controller.set('deleteDatabaseMessage', "Successfully Deleted table");
Ember.run.later(() => {
this.store.unloadRecord(databaseModel);
this.controller.set('showDeleteDatabaseModal', false);
@@ -104,16 +102,16 @@ export default Ember.Route.extend(UILoggerMixin, {
this.refresh();
}, 2 * 1000);
}, (error) => {
- this.get('logger').danger(`Failed to delete database '${databaseModel.get('name')}'`, this.extractError(error));
+ // TODO: handle error
Ember.run.later(() => {
this.controller.set('showDeleteDatabaseModal', false);
this.controller.set('deleteDatabaseMessage');
this.replaceWith('databases');
this.refresh();
- }, 1 * 1000);
+ }, 2 * 1000);
});
}, (error) => {
- this.get('logger').danger(`Failed to delete database '${databaseModel.get('name')}'`, this.extractError(error));
+ console.log("Error encountered", error);
this.controller.set('showDeleteDatabaseModal', false);
});
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new-database.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new-database.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new-database.js
index ad7fc99..b421bdc 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new-database.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new-database.js
@@ -17,9 +17,8 @@
*/
import Ember from 'ember';
-import UILoggerMixin from '../../../../mixins/ui-logger';
-export default Ember.Route.extend(UILoggerMixin, {
+export default Ember.Route.extend({
tableOperations: Ember.inject.service(),
@@ -41,10 +40,10 @@ export default Ember.Route.extend(UILoggerMixin, {
}).then((status) => {
this._modalStatus(true, 'Successfully created database');
this._transitionToDatabases(newDatabaseName);
- this.get('logger').success(`Successfully created database '${newDatabaseName}'`);
}).catch((err) => {
- this._modalStatus(false);
- this.get('logger').danger(`Failed to create database '${newDatabaseName}'`, this.extractError(err));
+ this._modalStatus(true, 'Failed to create database');
+ this._alertMessage('Failed to create database', err);
+ this._transitionToDatabases();
});
},
@@ -60,6 +59,10 @@ export default Ember.Route.extend(UILoggerMixin, {
this._modalStatus(false);
this.transitionTo('databases');
}, 2000);
- }
+ },
+ _alertMessage(message, err) {
+ console.log(message, err);
+ // TODO: user alert message here
+ }
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new.js
index b29d863..c8ad239 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/new.js
@@ -18,9 +18,8 @@
import Ember from 'ember';
import tabs from '../../../../configs/create-table-tabs';
-import UILoggerMixin from '../../../../mixins/ui-logger';
-export default Ember.Route.extend(UILoggerMixin, {
+export default Ember.Route.extend({
tableOperations: Ember.inject.service(),
setupController(controller, model) {
@@ -45,7 +44,6 @@ export default Ember.Route.extend(UILoggerMixin, {
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');
@@ -57,7 +55,7 @@ export default Ember.Route.extend(UILoggerMixin, {
}, 2 * 1000);
return Ember.RSVP.Promise.resolve(job);
}, (error) => {
- this.get('logger').danger(`Failed to create table '${settings.name}'`, this.extractError(error));
+ // TODO: handle error
Ember.run.later(() => {
this.controller.set('showCreateTableModal', false);
this.controller.set('createTableMessage');
@@ -69,7 +67,7 @@ export default Ember.Route.extend(UILoggerMixin, {
return Ember.RSVP.Promise.reject(error);
});
}, (error) => {
- this.get('logger').danger(`Failed to create table '${settings.name}'`, this.extractError(error));
+ console.log("Error encountered", error);
this.controller.set('showCreateTableModal', true);
throw error;
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table.js
index 6ee8100..1066bc1 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table.js
@@ -18,9 +18,8 @@
import Ember from 'ember';
import tabs from '../../../../configs/table-level-tabs';
-import UILoggerMixin from '../../../../mixins/ui-logger';
-export default Ember.Route.extend(UILoggerMixin, {
+export default Ember.Route.extend({
tableOperations: Ember.inject.service(),
model(params) {
let database = this.modelFor('databases.database').get('name');
@@ -66,7 +65,6 @@ export default Ember.Route.extend(UILoggerMixin, {
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');
@@ -75,7 +73,7 @@ export default Ember.Route.extend(UILoggerMixin, {
this.transitionTo('databases.database', databaseModel.get('name'));
}, 2 * 1000);
}, (error) => {
- this.get('logger').danger(`Failed to delete table '${tableInfo.get('table')}'`, this.extractError(error));
+ // TODO: handle error
Ember.run.later(() => {
this.controller.set('showDeleteTableModal', false);
this.controller.set('deleteTableMessage');
@@ -83,7 +81,7 @@ export default Ember.Route.extend(UILoggerMixin, {
}, 2 * 1000);
});
}, (error) => {
- this.get('logger').danger(`Failed to delete table '${tableInfo.get('table')}'`, this.extractError(error));
+ console.log("Error encountered", error);
this.controller.set('showDeleteTableModal', true);
});
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/edit.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/edit.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/edit.js
index d9f80e1..47340ba 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/edit.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/edit.js
@@ -18,9 +18,8 @@
import TableMetaRouter from './table-meta-router';
import tabs from '../../../../../configs/edit-table-tabs';
-import UILoggerMixin from '../../../../../mixins/ui-logger';
-export default TableMetaRouter.extend(UILoggerMixin, {
+export default TableMetaRouter.extend({
tableOperations: Ember.inject.service(),
@@ -52,12 +51,12 @@ export default TableMetaRouter.extend(UILoggerMixin, {
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 altered table');
- this.get('logger').success(`Successfully altered table '${settings.table}'`);
+ this._modalStatus(true, 'Successfully edited the table');
this._transitionToTables();
}).catch((err) => {
- this._modalStatus(false, 'Failed to edit table');
- this.get('logger').danger(`Failed to altered table '${settings.table}'`, this.extractError(err));
+ this._modalStatus(true, 'Failed to edit table');
+ this._alertMessage('Failed to edit table', err);
+ this._transitionToTables();
});
}
@@ -76,6 +75,11 @@ export default TableMetaRouter.extend(UILoggerMixin, {
this.send('refreshTableInfo');
this.transitionTo('databases.database.tables.table');
}, 2000);
+ },
+
+ _alertMessage(message, err) {
+ console.log(message, err);
+ // TODO: user alert message here
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/rename.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/rename.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/rename.js
index 30ebfc9..cac471e 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/rename.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/rename.js
@@ -16,11 +16,9 @@
* limitations under the License.
*/
-import Ember from 'ember';
import TableMetaRouter from './table-meta-router';
-import UILoggerMixin from '../../../../../mixins/ui-logger';
-export default TableMetaRouter.extend(UILoggerMixin, {
+export default TableMetaRouter.extend({
tableOperations: Ember.inject.service(),
@@ -54,11 +52,11 @@ export default TableMetaRouter.extend(UILoggerMixin, {
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(false, 'Failed to rename table');
- this.get('logger').danger(`Failed to rename table '${oldTableName}' to '${newTableName}'`, this.extractError(err));
+ this._modalStatus(true, 'Failed to rename table');
+ this._alertMessage('Failed to rename table', err);
+ this._transitionToTables();
});
},
@@ -74,6 +72,11 @@ export default TableMetaRouter.extend(UILoggerMixin, {
this._modalStatus(false);
this.transitionTo('databases');
}, 2000);
+ },
+
+ _alertMessage(message, err) {
+ console.log(message, err);
+ // TODO: user alert message here
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/routes/jobs.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/jobs.js b/contrib/views/hive20/src/main/resources/ui/app/routes/jobs.js
index c27c74d..419fd07 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/jobs.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/jobs.js
@@ -63,6 +63,9 @@ 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");
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/routes/settings.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/settings.js b/contrib/views/hive20/src/main/resources/ui/app/routes/settings.js
index affc126..1ce5116 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/settings.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/settings.js
@@ -17,10 +17,9 @@
*/
import Ember from 'ember';
-import hiveParams from '../configs/hive-parameters';
-import UILoggerMixin from '../mixins/ui-logger';
+import hiveParams from '../configs/hive-parameters'
-export default Ember.Route.extend(UILoggerMixin, {
+export default Ember.Route.extend({
model() {
return this.store.findAll('setting').then(settings => settings.toArray());
},
@@ -64,15 +63,16 @@ export default Ember.Route.extend(UILoggerMixin, {
let model = this.get('controller.model');
model.removeObject(data);
}, err => {
- this.get('logger').danger(`Failed to delete setting with key: '${setting.get('key')}`, this.extractError(err));
+ console.log('error in deletion');
})
},
updateAction(newSetting) {
newSetting.save().then(data => {
+ console.log('saved', data);
data.set('editMode', false);
}, error => {
- this.get('logger').danger(`Failed to update setting with key: '${setting.get('key')}`, this.extractError(error));
+ console.log('error', err);
})
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/services/alert-messages.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/services/alert-messages.js b/contrib/views/hive20/src/main/resources/ui/app/services/alert-messages.js
index a05fc7a..ed4cff1 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/services/alert-messages.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/services/alert-messages.js
@@ -69,10 +69,6 @@ export default Ember.Service.extend({
this._processMessage('danger', message, options, alertOptions);
},
- error: function() {
- this.danger(...arguments);
- },
-
clearMessages: function() {
this.get('flashMessages').clearMessages();
},
@@ -86,13 +82,13 @@ export default Ember.Service.extend({
}
switch (type) {
case 'success':
- this.get('flashMessages').success(message, this._getOptions(Ember.merge(alertOptions, {sticky: false})));
+ this.get('flashMessages').success(message, this._getOptions(alertOptions));
break;
case 'warn':
- this.get('flashMessages').warning(message, this._getOptions(Ember.merge(alertOptions, {sticky: false})));
+ this.get('flashMessages').warning(message, this._getOptions(alertOptions));
break;
case 'info':
- this.get('flashMessages').info(message, this._getOptions(Ember.merge(alertOptions, {sticky: false})));
+ this.get('flashMessages').info(message, this._getOptions(alertOptions));
break;
case 'danger':
this.get('flashMessages').danger(message, this._getOptions(alertOptions));
@@ -130,8 +126,7 @@ export default Ember.Service.extend({
var defaultOptions = {
priority: 100,
showProgress: true,
- timeout: 6000,
- sticky: true
+ timeout: 6000
};
return Ember.merge(defaultOptions, options);
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/templates/databases-loading.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/databases-loading.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/databases-loading.hbs
deleted file mode 100644
index d0592ed..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/databases-loading.hbs
+++ /dev/null
@@ -1,21 +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.
-}}
-
-<div class="alert alert-info text-center">
- <p class="lead">Loading Databases. Please wait. {{fa-icon "refresh" spin=true}}</p>
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables-loading.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables-loading.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables-loading.hbs
deleted file mode 100644
index 58c36e9..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables-loading.hbs
+++ /dev/null
@@ -1,24 +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.
-}}
-
-<div class="alert alert-info text-center">
- <p class="lead">Loading Tables. Please wait. {{fa-icon "refresh" spin=true}}</p>
-</div>
-
-
-
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table-loading.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table-loading.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table-loading.hbs
deleted file mode 100644
index 536d025..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table-loading.hbs
+++ /dev/null
@@ -1,21 +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.
-}}
-
-<div class="alert alert-info text-center">
- <p class="lead">Loading Table Information. Please wait. {{fa-icon "refresh" spin=true}}</p>
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/templates/jobs-loading.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/jobs-loading.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/jobs-loading.hbs
deleted file mode 100644
index f679709..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/jobs-loading.hbs
+++ /dev/null
@@ -1,20 +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.
-}}
-<div class="alert alert-info text-center">
- <p class="lead">Loading Jobs. Please wait. {{fa-icon "refresh" spin=true}}</p>
-</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/templates/messages.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/messages.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/messages.hbs
index 52e8d98..b856c20 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/messages.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/messages.hbs
@@ -17,9 +17,12 @@
}}
<div class="row">
- <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 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>
</div>
</div>
@@ -27,8 +30,7 @@
<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}}
@@ -37,6 +39,8 @@
{{{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>
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/templates/messages/message.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/messages/message.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/messages/message.hbs
index 5b82333..0c69d58 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/messages/message.hbs
+++ b/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>Status:</strong> {{model.status}}</p>
+ <p><strong>Server status:</strong> {{model.status}}</p>
<hr/>
{{/if}}
{{#if model.responseMessage}}
- {{alert-message-display title="Message:"
+ {{alert-message-display title="Server Message:"
value=model.responseMessage
shorten=true
length=200}}
<hr/>
{{/if}}
{{#if model.trace}}
- {{alert-message-display title="Trace:"
+ {{alert-message-display title="Error trace:"
value=model.trace
shorten=true
length=500}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries-loading.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries-loading.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries-loading.hbs
deleted file mode 100644
index 571466b..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/savedqueries-loading.hbs
+++ /dev/null
@@ -1,21 +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.
-}}
-
-<div class="alert alert-info text-center">
- <p class="lead">Loading Saved Queries. Please wait. {{fa-icon "refresh" spin=true}}</p>
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/templates/settings-loading.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/settings-loading.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/settings-loading.hbs
deleted file mode 100644
index 253bbb1..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/settings-loading.hbs
+++ /dev/null
@@ -1,21 +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.
-}}
-
-<div class="alert alert-info text-center">
- <p class="lead">Loading Settings. Please wait. {{fa-icon "refresh" spin=true}}</p>
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/app/templates/udfs-loading.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/udfs-loading.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/udfs-loading.hbs
deleted file mode 100644
index 3b74db8..0000000
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/udfs-loading.hbs
+++ /dev/null
@@ -1,21 +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.
-}}
-
-<div class="alert alert-info text-center">
- <p class="lead">Loading Udfs. Please wait. {{fa-icon "refresh" spin=true}}</p>
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/8fdc2b0e/contrib/views/hive20/src/main/resources/ui/config/environment.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/config/environment.js b/contrib/views/hive20/src/main/resources/ui/config/environment.js
index 411ee99..3714eb9 100644
--- a/contrib/views/hive20/src/main/resources/ui/config/environment.js
+++ b/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 = false;
+ ENV.APP.SHOULD_PERFORM_SERVICE_CHECK = true;
}
if (environment === 'test') {