Repository: ambari Updated Branches: refs/heads/trunk 0a8584f9e -> b00cd9951
AMBARI-20497. Hive View2.0: Upload table fails, if one column is deleted (pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b00cd995 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b00cd995 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b00cd995 Branch: refs/heads/trunk Commit: b00cd99515aa2e9a3601827496fa4cb2672b2ca9 Parents: 0a8584f Author: pallavkul <[email protected]> Authored: Tue Mar 21 01:51:42 2017 +0530 Committer: pallavkul <[email protected]> Committed: Tue Mar 21 01:51:42 2017 +0530 ---------------------------------------------------------------------- .../ui/app/routes/databases/database/tables/upload-table.js | 1 + .../src/main/resources/ui/app/templates/components/column-item.hbs | 2 +- .../main/resources/ui/app/templates/components/create-table.hbs | 2 +- .../main/resources/ui/app/templates/components/table-columns.hbs | 1 + .../main/resources/ui/app/templates/components/upload-table.hbs | 2 +- .../ui/app/templates/databases/database/tables/upload-table.hbs | 2 +- 6 files changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/b00cd995/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js ---------------------------------------------------------------------- diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js index e6b71fe..bfd603b 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js +++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js @@ -38,6 +38,7 @@ export default NewTable.extend(UILoggerMixin, { setupController(controller, model) { this._super(controller, model); this.controller.set("showUploadTableModal", false); + this.controller.set("options", { 'isDeleteColumnDisabled' : true}); }, getCharOptionByCharCode: function(charCode){ return Helpers.getAllTerminationCharacters().findBy("id", charCode + ""); http://git-wip-us.apache.org/repos/asf/ambari/blob/b00cd995/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs index 762c77c..6874781 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs @@ -118,7 +118,7 @@ {{#unless column.editing}} <button class="btn btn-success" {{action "edit"}}>{{fa-icon "check"}} Edit</button> {{/unless}} - <button class="btn btn-danger" {{action "delete"}}>{{fa-icon "times"}} Delete</button> + <button class="btn btn-danger" {{action "delete"}} disabled={{options.isDeleteColumnDisabled}} >{{fa-icon "times"}} Delete</button> {{/if}} </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/b00cd995/contrib/views/hive20/src/main/resources/ui/app/templates/components/create-table.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/create-table.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/create-table.hbs index f369783..2ffbd2a 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/create-table.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/create-table.hbs @@ -44,7 +44,7 @@ {{emptyColumnsErrorText}} </div> {{/if}} - {{table-columns columns=columns shouldAddBuckets=shouldAddBuckets}} + {{table-columns columns=columns shouldAddBuckets=shouldAddBuckets options=options}} {{/if}} {{#if (eq tab.link "create.table.properties")}} {{table-properties properties=properties}} http://git-wip-us.apache.org/repos/asf/ambari/blob/b00cd995/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-columns.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-columns.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-columns.hbs index b942136..969308a 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-columns.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-columns.hbs @@ -32,6 +32,7 @@ columnDeleted="columnDeleted" columnUpdated="columnUpdated" editMode=editMode + options=options }} {{/each}} <tr class="new-settings text-center"> http://git-wip-us.apache.org/repos/asf/ambari/blob/b00cd995/contrib/views/hive20/src/main/resources/ui/app/templates/components/upload-table.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/upload-table.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/upload-table.hbs index 0ee6b81..7483d65 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/upload-table.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/upload-table.hbs @@ -54,7 +54,7 @@ <div class="table-body"> {{create-table tabs=tabs cancel="cancel" - create="createAndUpload" columns=columns tableName=tableName }} + create="createAndUpload" columns=columns tableName=tableName options=options}} </div> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/b00cd995/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/upload-table.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/upload-table.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/upload-table.hbs index 0091ede..557d9c6 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/upload-table.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/upload-table.hbs @@ -40,6 +40,6 @@ container-class="modal-dialog modal-sm"}} {{/if}} </div> -{{upload-table tabs=tabs columns=columns rows=rows tableName=tableName tableMeta=tableMeta cancel="cancel" createAndUpload="uploadTable" preview="preview"}} +{{upload-table tabs=tabs columns=columns rows=rows tableName=tableName tableMeta=tableMeta cancel="cancel" createAndUpload="uploadTable" preview="preview" options=options}} </div> {{yield}}
