You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ni...@apache.org on 2016/12/28 09:33:10 UTC
[10/23] ambari git commit: AMBARI-19302 : removed contrib/views/hive
folder and made necessary changes in pom.xml files (nitirajrathore)
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/modal-save.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/modal-save.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/modal-save.hbs
deleted file mode 100644
index 8d83f2b..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/modal-save.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.
-}}
-
-{{#modal-widget heading=heading close="close" ok="save"}}
- {{input type=type class="form-control" value=text }}
-{{/modal-widget}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/notification.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/notification.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/notification.hbs
deleted file mode 100644
index 35c2fe1..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/notification.hbs
+++ /dev/null
@@ -1,23 +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 {{bind-attr class=":alert :notification view.typeClass"}}>
- <button type="button" class="close" {{action "close" target="view"}}><span aria-hidden="true">×</span></button>
- <i {{bind-attr class=":fa view.typeIcon"}}></i>
- {{view.notification.message}}
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/open-queries.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/open-queries.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/open-queries.hbs
deleted file mode 100644
index 6d6f0dc..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/open-queries.hbs
+++ /dev/null
@@ -1,23 +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.
-}}
-
-{{#tabs-widget tabs=queryTabs removeClicked="removeQueryTab" canRemove=true onActiveTitleClick="changeTabTitle"}}
- {{outlet 'overlay'}}
- {{query-editor tables=selectedTables query=currentQuery.fileContent editor=view.editor highlightedText=highlightedText
- columnsNeeded="getColumnsForAutocomplete"}}
-{{/tabs-widget}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/queries.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/queries.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/queries.hbs
deleted file mode 100644
index 96e2498..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/queries.hbs
+++ /dev/null
@@ -1,96 +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.
-}}
-
-<table class="table">
- <thead>
- <tr>
- {{#each column in columns}}
- <th>
- {{#if column.caption}}
- {{column-filter-widget class="pull-left"
- column=column
- filterValue=column.filterValue
- sortAscending=controller.sortAscending
- sortProperties=controller.sortProperties
- columnSorted="sort"
- columnFiltered="filter"}}
- {{else}}
- {{column.caption}}
- {{/if}}
- </th>
- {{/each}}
- <th>
- <button type="btn" class="btn btn-sm btn-warning pull-right clear-filters" {{action "clearFilters"}}>{{t "buttons.clearFilters"}}</button>
- </th>
- </tr>
- </thead>
- <tbody>
- {{#if queries.length}}
- {{#if model.length}}
- {{#each query in this}}
- {{#unless query.isNew}}
- <tr>
- <td>
- {{#link-to "index.savedQuery" query}}
- {{query.shortQuery}}
- {{/link-to}}
- </td>
-
- <td>
- {{#link-to "index.savedQuery" query}}
- {{query.title}}
- {{/link-to}}
- </td>
-
- <td>{{query.dataBase}}</td>
-
- <td>{{query.owner}}</td>
-
- <td>
- {{#unless query.isNew}}
- <div class="btn-group pull-right">
- <span data-toggle="dropdown">
- <a class="fa fa-gear"></a>
- </span>
- <ul class="dropdown-menu" role="menu">
- {{#each link in controller.links}}
- <li {{action 'executeAction' link query}}><a>{{tb-helper link}}</a></li>
- {{/each}}
- </ul>
- </div>
- {{/unless}}
- </td>
- </tr>
- {{/unless}}
- {{/each}}
- {{else}}
- <tr>
- <td colspan="5">
- <h4 class="empty-list">{{t "emptyList.savedQueries.noMatches"}}</h4>
- </td>
- </tr>
- {{/if}}
- {{else}}
- <tr>
- <td colspan="5">
- <h4 class="empty-list">{{t "emptyList.savedQueries.noItems"}}</h4>
- </td>
- </tr>
- {{/if}}
- </tbody>
-</table>
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/query-tabs.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/query-tabs.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/query-tabs.hbs
deleted file mode 100644
index 62b15c1..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/query-tabs.hbs
+++ /dev/null
@@ -1,28 +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.
-}}
-
-{{#each tab in tabs}}
- <span {{action tab.action tab}} {{bind-attr class=":query-menu-tab tabClassNames tab.iconClass tab.active:active tab.flash:flash" title="tab.tooltip" id="tab.id"}}>
- {{#if tab.badge}}
- <span class="badge">{{tab.badge}}</span>
- {{/if}}
- {{#if tab.text}}
- {{tab.text}}
- {{/if}}
- </span>
-{{/each}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/redirect.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/redirect.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/redirect.hbs
deleted file mode 100644
index b776fd2..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/redirect.hbs
+++ /dev/null
@@ -1,19 +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.
-}}
-
-{{outlet}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/settings.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/settings.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/settings.hbs
deleted file mode 100644
index e24c667..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/settings.hbs
+++ /dev/null
@@ -1,70 +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="editor-overlay settings-container fadeIn">
- <div class='settings-controls'>
- <button class="btn btn-success btn-xs" {{action 'add'}}><i class="fa fa-plus"></i> Add</button>
-
- {{#if settings.length}}
- <button class="btn btn-danger btn-xs" {{action 'removeAll'}}><i class="fa fa-minus"></i> Remove All</button>
- {{/if}}
-
- <button class="btn btn-success btn-xs pull-right" {{action 'saveDefaultSettings'}}><i class="fa fa-plus"></i> Save Default Settings</button>
- </div>
-
- {{#each setting in settings}}
- <div class="setting col-md-12 col-sm-12">
- <form>
- <div class="form-group">
- <div class="input-group">
- <div class="input-group-addon">
-
- <div {{bind-attr keyname="setting.key.name"}} class="typeahead-container">
- {{typeahead-widget
- options=predefinedSettings
- excluded=excluded
- optionLabelPath="name"
- optionValuePath="name"
- plugins="remove_button,restore_on_backspace"
- selection=setting.key
- safeValue = setting.key.name
- create="addKey"
- }}
- </div>
- </div>
- <div {{bind-attr class=":input-group-addon setting.valid::has-error"}}>
- <div class="setting-input-value">
- {{#if setting.key.values}}
- {{select-widget items=setting.key.values
- labelPath="value"
- selectedValue=setting.selection
- defaultLabelTranslation="placeholders.select.value"
- }}
- {{else}}
- {{input class="input-sm form-control" placeholderTranslation="placeholders.select.value" value=setting.selection.value}}
- {{/if}}
- </div>
-
- <span class="fa fa-times-circle remove pull-right" {{action 'remove' setting}}></span>
- </div>
- </div>
- </div>
- </form>
- </div>
- {{/each}}
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/splash.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/splash.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/splash.hbs
deleted file mode 100644
index 5612542..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/splash.hbs
+++ /dev/null
@@ -1,117 +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="spinner"></div>
-<div class="container-fluid">
- {{#if allTestsCompleted }}
- <h3>Service checks completed.</h3>
- {{else}}
- <h3>Service checks in progress.</h3>
- {{/if}}
-
- {{#if errors}}
- <div class="progress active">
- <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" {{bind-attr style="progressBarStyle"}}></div>
- </div>
- {{else}}
- <div class="progress progress-striped active">
- <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" {{bind-attr style="progressBarStyle"}}></div>
- </div>
- {{/if}}
-
- <table class="table">
- <tbody>
- <tr>
- <td>
- {{#if modelhdfsTestDone}}
- {{#if modelhdfsTest}}
- <i class="fa fa-check"></i>
- {{else}}
- <i class="fa fa-remove"></i>
- {{/if}}
- {{else}}
- <i class="fa fa-arrow-right"></i>
- {{/if}}
- </td>
- <td>HDFS test</td>
- </tr>
- <tr>
- <td>
- {{#if modelhiveserverTestDone}}
- {{#if modelhiveserverTest}}
- <i class="fa fa-check"></i>
- {{else}}
- <i class="fa fa-remove"></i>
- {{/if}}
- {{else}}
- <i class="fa fa-arrow-right"></i>
- {{/if}}
- </td>
- <td>HiveServer test</td>
- </tr>
- <tr>
- <td>
- {{#if modelatsTestDone}}
- {{#if modelatsTest}}
- <i class="fa fa-check"></i>
- {{else}}
- <i class="fa fa-remove"></i>
- {{/if}}
- {{else}}
- <i class="fa fa-arrow-right"></i>
- {{/if}}
- </td>
- <td>ATS test</td>
- </tr>
-
- <tr>
- <td>
- {{#if modeluserhomeTestDone}}
- {{#if modeluserhomeTest}}
- <i class="fa fa-check"></i>
- {{else}}
- <i class="fa fa-remove"></i>
- {{/if}}
- {{else}}
- <i class="fa fa-arrow-right"></i>
- {{/if}}
- </td>
- <td>User Home Directory test</td>
- </tr>
-
- </tbody>
- </table>
- {{#if errors}}
- <h3>Issues detected</h3>
- <p>{{{errors}}}</p>
- {{/if}}
- {{#if stackTrace}}
- <a href="#" {{action "toggleStackTrace" post}}>
- {{#if isExpanded}}
- <i class="fa fa-minus"></i> Collapse Stack Trace
- {{else}}
- <<i class="fa fa-plus"></i> Expand Stack Trace
- {{/if}}
- </a>
- {{#if isExpanded}}
- <pre class="prettyprint">
- {{stackTrace}}
- </pre>
- {{/if}}
- {{/if}}
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/tez-ui.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/tez-ui.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/tez-ui.hbs
deleted file mode 100644
index 6f6df4c..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/tez-ui.hbs
+++ /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.
-}}
-
-<div id="tez-ui" class="index-overlay">
- {{#panel-widget headingTranslation="titles.query.tez"}}
- {{#if dagURL}}
- <iframe {{bind-attr src=dagURL}}></iframe>
- {{else}}
- {{#if error}}
- <div class="alert alert-danger" role="alert"><strong>{{tb-helper error}}</strong></div>
- {{else}}
- <div class="alert alert-danger" role="alert"><strong>{{tb-helper 'tez.errors.no.dag'}}</strong></div>
- {{/if}}
- {{/if}}
- {{/panel-widget}}
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/udfs.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/udfs.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/udfs.hbs
deleted file mode 100644
index 7650fba..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/udfs.hbs
+++ /dev/null
@@ -1,53 +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.
-}}
-
-<table class="table">
- <thead>
- <tr>
- <th>{{t "columns.fileResource"}}</th>
- {{#each column in columns}}
- <th>
- {{column-filter-widget class="pull-left"
- column=column
- filterValue=column.filterValue
- sortAscending=controller.sortAscending
- sortProperties=controller.sortProperties
- columnSorted="sort"
- columnFiltered="filter"}}
- </th>
- {{/each}}
- <th>
- <div class="pull-right">
- <button type="button" class="btn btn-sm btn-warning clear-filters" {{action "clearFilters"}}>{{t "buttons.clearFilters"}}</button>
- <button type="button" class="btn btn-sm btn-success add-udf" {{action "add"}}>{{t "buttons.newUdf"}}</button>
- </div>
- </th>
- </tr>
- </thead>
- <tbody>
- {{#each udf in this}}
- {{udf-tr-view udf=udf
- fileResources=fileResources
- columns=columns
- onAddFileResource="handleAddFileResource"
- onDeleteFileResource="handleDeleteFileResource"
- onSaveUdf="handleSaveUdf"
- onDeleteUdf='handleDeleteUdf'}}
- {{/each}}
- </tbody>
-</table>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/upload-table.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/upload-table.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/upload-table.hbs
deleted file mode 100644
index 1638804..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/upload-table.hbs
+++ /dev/null
@@ -1,296 +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 style="width : 90%">
- <div class="main-content">
- {{#if showErrors}}
- {{render 'messages'}}
- {{/if}}
- </div>
-</div>
-
-<div id="uploadProgressModal" class="modal fade" role="dialog" data-backdrop="static">
- <div class="modal-dialog">
-
- <!-- Modal content-->
- <div class="modal-content">
- <div class="modal-header">
- <h4 class="modal-title">{{t "hive.ui.uploadProgress"}}</h4>
- </div>
- <div class="modal-body">
- <p>
- <ul>
- {{uploadProgressInfo}}
- </ul>
- </p>
- </div>
- </div>
-
- </div>
-</div>
-
-<!-- CSV Input Modal -->
-<div class="modal fade" id="inputParamsModal" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
- </div>
- <div class="modal-body">
- <table class="table data-upload-form">
- <tr>
- <td><label>{{t 'hive.ui.columnDelimterField'}}:</label></td>
- <td class="data-upload-form-field" title={{t 'hive.ui.columnDelimiterTooltip'}}>
- {{typeahead-widget
- content=asciiList
- optionValuePath="id"
- optionLabelPath="name"
- selection=csvDelimiter
- optionFunction=asciiFormatter
- }}
- </td>
- </tr>
- <tr>
- <td><label>{{t 'hive.ui.escapeCharacterField'}}:</label></td>
- <td class="data-upload-form-field" title={{t 'hive.ui.escapeCharacterTooltip'}}>
- {{typeahead-widget
- content=asciiList
- optionValuePath="id"
- optionLabelPath="name"
- selection=csvEscape
- optionFunction=asciiFormatter
- }}
- </td>
- </tr>
- <tr>
- <td><label>{{t 'hive.ui.quoteCharacterField'}}:</label></td>
- <td class="data-upload-form-field" title={{t 'hive.ui.quoteCharacterTooltip'}}>
- {{typeahead-widget
- content=asciiList
- optionValuePath="id"
- optionLabelPath="name"
- selection=csvQuote
- optionFunction=asciiFormatter
- }}
- </td>
- </tr>
- <tr>
- <td><label>{{t "hive.ui.isFirstRowHeader"}}</label></td>
- <td class="data-upload-form-field" title={{t 'hive.ui.isFirstRowHeaderTooltip'}}>
- {{input id="isFirstRowHeader" type="checkbox" checked=isFirstRowHeader }}
- </td>
- </tr>
- </table>
- </div>
- <div class="modal-footer">
- <button type="submit" class="btn btn-default btn-default pull-right" data-dismiss="modal"> Close</button>
- </div>
- </div>
- </div>
-</div>
-
-<!-- Row Format Modal -->
-<div class="modal fade" id="rowFormatModal" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
- </div>
- <div class="modal-body">
- <table class="table data-upload-form">
- <tr>
- <td><label>{{t 'hive.ui.fieldsTerminatedByField'}}:</label></td>
- <td class="data-upload-form-field" title={{t 'hive.ui.fieldsTerminatedByTooltip'}}>
- {{typeahead-widget
- content=asciiList
- optionValuePath="id"
- optionLabelPath="name"
- selection=fieldsTerminatedBy
- optionFunction=asciiFormatter
- }}
- </td>
- </tr>
- <tr>
- <td><label>{{t 'hive.ui.escapedByField'}}:</label></td>
- <td class="data-upload-form-field" title={{t 'hive.ui.escapedByTooltip'}}>
- {{typeahead-widget
- content=asciiList
- optionValuePath="id"
- optionLabelPath="name"
- selection=escapedBy
- optionFunction=asciiFormatter
- }}
- </td>
- </tr>
- </table>
- </div>
- <div class="modal-footer">
- <button type="submit" class="btn btn-default btn-default pull-right" data-dismiss="modal"> Close</button>
- </div>
- </div>
- </div>
-</div>
-
-<div class="pull-right">
- <i class="query-menu-tab fa queries-icon fa-envelope" {{ action 'toggleErrors'}} ></i>
-</div>
-<div {{bind-attr class="showErrors:hide-data:show-data"}}>
- <div>
- <table class="table data-upload-form pull-left">
- <tr>
- <td class="data-upload-form-label"><label>{{t "hive.ui.uploadFromLocal"}}</label></td>
- <td class="data-upload-form-field"> {{radio-button value='local' checked=uploadSource}}</td>
-
- <td class="data-upload-form-label"><label>{{t "hive.ui.uploadFromHdfs"}}</label></td>
- <td class="data-upload-form-field">{{radio-button value='hdfs' checked=uploadSource}}</td>
- </tr>
- <tr>
- <td class="data-upload-form-label"><label>{{t "hive.ui.fileType"}}</label></td>
- <td class="data-upload-form-field">
- <div class="col-md-11" style="padding:0">
- {{typeahead-widget
- content=inputFileTypes
- optionValuePath="id"
- optionLabelPath="name"
- selection=inputFileType
- placeholder="Select File Type"}}
- </div>
- <div class="col-md-1" style="padding: 0">
- <span {{bind-attr class=":queries-icon :fa :fa-gear inputFileTypeCSV:settings-gear:settings-gear-disabled"}}
- title="Settings" {{action "showInputParamModal"}}>
- </span>
- </div>
- </td>
- {{#if isLocalUpload }}
- <td class="data-upload-form-label"><label>{{t "hive.ui.selectFromLocal"}}</label></td>
- <td class="data-upload-form-field">{{file-upload filesUploaded="filesUploaded" uploadFiles=files}}</td>
- {{else}}
- <td class="data-upload-form-label"><label>{{t "hive.ui.hdfsPath"}}</label></td>
- <td class="data-upload-form-field" id="hdfs-param">
- {{#validated-text-field inputValue=hdfsPath allowEmpty=false tagClassName="hdfsPath"
- tooltip=(t "hive.ui.hdfsFieldTooltip") placeholder=(t "hive.ui.hdfsFieldPlaceholder")
- invalidClass='form-control hdfsPath red-border' validClass='form-control hdfsPath' regex=HDFS_PATH_REGEX
- errorMessage=(t "hive.ui.hdfsFieldErrorMessage") }}
- {{/validated-text-field}}
- <button style="margin-left: 5px; padding-top: 6px;padding-bottom: 6px; padding-right: 10px; padding-left: 10px;" type="button" {{action "previewFromHdfs"}}
- {{bind-attr class=":btn :btn-sm :btn-default"}}>{{t "buttons.showPreview"}}</button></td>
- {{/if}}
- </tr>
- {{#if showPreview}}
- <tr>
- <td class="data-upload-form-label"><label>{{t "hive.words.database"}}</label></td>
- <td class="data-upload-form-field">
- {{typeahead-widget
- content=databases
- optionValuePath="id"
- optionLabelPath="name"
- selection=selectedDatabase
- placeholder=(t "hive.ui.selectDatabase")
- }}
- </td>
-
- <td class="data-upload-form-label"><label>{{t "hive.ui.tableName"}}</label></td>
- <td class="data-upload-form-field">
- {{#validated-text-field inputValue=tableName allowEmpty=false
- tooltip=(t "hive.ui.tableNameTooltip")
- invalidClass='form-control red-border' validClass='form-control' regex=TABLE_NAME_REGEX
- errorMessage=(t "hive.ui.tableNameErrorMessage") }}
- {{/validated-text-field}}
- </td>
- </tr>
- <tr>
- <td class="data-upload-form-label"><label>{{t "hive.ui.storedAs"}}</label></td>
- <td class="data-upload-form-field">
- <div class="col-md-11" style="padding: 0">
- {{typeahead-widget
- content=fileTypes
- selection=selectedFileType}}
- </div>
- <div class="col-md-1" style="padding: 0">
- <span {{bind-attr class=":queries-icon :fa :fa-gear storedAsTextFile:settings-gear:settings-gear-disabled"}}
- title="Settings" {{action "showRowFormatModal"}}>
- </span>
- </div>
- </td>
- {{#if storedAsNotTextFile}}
- <td class="data-upload-form-label"><label>{{t "hive.ui.containsEndlines"}}</label></td>
- <td class="data-upload-form-field">
- {{input type="checkbox" checked=containsEndlines }}
- </td>
- {{/if}}
- </tr>
- {{/if}}
- </table>
-
- {{#if showPreview}}
- <table class="pull-right">
- <tr>
- <td>
- <button type="button" {{action "uploadTable"}}
- {{bind-attr class=":btn :btn-sm :btn-default"}}>{{t "buttons.uploadTable"}}</button>
- </td>
- </tr>
- </table>
- {{/if}}
- </div>
-
- <div>
- {{#if showPreview}}
- <div id="upload-table">
- <table class="table table-expandable no-border">
- <thead>
- <tr>
- {{#each column in header}}
- <th>
- {{#validated-text-field inputValue=column.name allowEmpty=false
- tooltip=(t "hive.ui.columnNameTooltip")
- invalidClass='form-control red-border' validClass='form-control' regex=COLUMN_NAME_REGEX
- errorMessage=(t "hive.ui.columnNameErrorMessage")}}
- {{/validated-text-field}}
- </th>
- {{/each}}
- </tr>
- <tr id="upload-controls">
- {{#each column in header}}
- <th>
- <table>
- <tbody>
- <tr>
- <td>{{typeahead-widget content=dataTypes selection=column.type }}</td>
- {{input-header column=column dataTypes=dataTypes}}
- </tr>
- </tbody>
- </table>
- </th>
- {{/each}}
- </tr>
- </thead>
- <tbody>
- {{#each row in rows}}
- <tr>
- {{#each item in row.row}}
- <td>{{item}}</td>
- {{/each}}
- </tr>
- {{/each}}
- </tbody>
- </table>
- </div>
- {{/if}}
- </div>
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs
deleted file mode 100644
index bef0693..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs
+++ /dev/null
@@ -1,93 +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 id="visual-explain" class="index-overlay">
- {{#panel-widget headingTranslation="titles.query.visualExplain"}}
-
- {{#if noquery}}
- <div class="alert alert-danger" role="alert"><strong>{{tb-helper 'hive.errors.no.query'}}</strong></div>
- {{/if}}
-
- {{#unless showSpinner}}
- <div class="spinner"></div>
- {{/unless}}
-
- <div id="no-visual-explain-graph"></div>
-
- <div id="visual-explain-graph">
- {{#each edge in view.edges}}
- <div class="edge">
- <div class="edge-path" {{bind-attr style="edge.style"}}>
- {{edge.type}}
- </div>
- {{!-- <div class="edge-arrow" ></div> --}}
- </div>
- {{/each}}
-
- <div class="nodes">
- {{#each group in view.verticesGroups}}
- <div class="node-container">
- {{#if group.contents}}
- {{#each node in group.contents}}
- <div {{bind-attr class="node.isTableNode:table-node node.isOutputNode:output-node :node" title="node.id"}}>
- {{#if node.isTableNode}}
- <p><strong>{{t 'labels.table'}}</strong></p>
- {{node.label}}
- {{else}}
- {{#if node.isOutputNode}}
- {{node.label}}
- {{else}}
- <div class="node-heading">
- <strong>{{node.label}}</strong>
- </div>
- <div class="node-content">
- {{#each section in node.contents}}
- <p>
- {{#popover-widget classNames="fa fa-info-circle" titleTranslation="popover.visualExplain.statistics" }}
- {{section.statistics}}
- {{/popover-widget}}
- <strong>
- {{section.index}}. {{section.title}}
- </strong>
- {{section.value}}
- </p>
-
- {{#each field in section.fields}}
- {{#if field.value}}
- <p>{{field.label}} {{field.value}}</p>
- {{/if}}
- {{/each}}
- {{/each}}
- </div>
- {{progress-widget value=node.progress}}
- {{/if}}
- {{/if}}
- </div>
- {{/each}}
- {{else}}
- <div class="node" {{bind-attr title="group.label"}}>
- {{group.label}}
- </div>
- {{/if}}
- </div>
- {{/each}}
- </div>
- </div>
-
- {{/panel-widget}}
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visualization-ui.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visualization-ui.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visualization-ui.hbs
deleted file mode 100644
index 22cbaef..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visualization-ui.hbs
+++ /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.
-}}
-
-<div id="visualization" class="index-overlay">
- {{#panel-widget headingTranslation="titles.query.visualization"}}
- {{#if error}}
- <div class="alert alert-danger" role="alert"><strong>{{error}}</strong></div>
- {{else}}
- {{#if polestarUrl}}
- <div class="max-rows" >
- <label>Maximum Row Count: </label> {{input value=selectedRowCount placeholder=selectedRowCount }}
- <button {{action "changeRowCount"}}>OK</button>
- </div>
- {{#visualization-tabs-widget tabs=visualizationTabs }}
-
- {{/visualization-tabs-widget}}
- {{else}}
- <div class="alert alert-danger" role="alert"><strong>An unknown error occurred! Please try again later.</strong></div>
- {{/if}}
- {{/if}}
- {{/panel-widget}}
-</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/transforms/date.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/transforms/date.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/transforms/date.js
deleted file mode 100644
index 716ab84..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/transforms/date.js
+++ /dev/null
@@ -1,49 +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';
-import DS from 'ember-data';
-
-export default DS.Transform.extend({
-
- deserialize: function (serialized) {
- var type = typeof serialized;
-
- if (type === "string") {
- return new Date(Ember.Date.parse(serialized));
- } else if (type === "number") {
- return new Date(serialized);
- } else if (serialized === null || serialized === undefined) {
- // if the value is not present in the data,
- // return undefined, not null.
- return serialized;
- } else {
- return null;
- }
- },
-
- serialize: function (date) {
- if (date instanceof Date) {
- // Serialize it as a number to maintain millisecond precision
- return Number(date);
- } else {
- return null;
- }
- }
-
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/constants.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/constants.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/constants.js
deleted file mode 100644
index 95aeb6d..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/constants.js
+++ /dev/null
@@ -1,230 +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';
-import helpers from 'hive/utils/functions';
-
-export default Ember.Object.create({
- appTitle: 'Hive',
-
- /**
- * This should reflect the naming conventions accross the application.
- * Changing one value also means changing the filenames for the chain of files
- * represented by that value (routes, controllers, models etc).
- * This dependency goes both ways.
- */
- namingConventions: {
- routes: {
- index: 'index',
- savedQuery: 'savedQuery',
- historyQuery: 'historyQuery',
- queries: 'queries',
- history: 'history',
- udfs: 'udfs',
- logs: 'logs',
- results: 'results',
- explain: 'explain',
- uploadTable :'upload-table',
- visualization: 'visualization'
- },
-
- subroutes: {
- savedQuery: 'index.savedQuery',
- historyQuery: 'index.historyQuery',
- jobLogs: 'index.historyQuery.logs',
- jobResults: 'index.historyQuery.results',
- jobExplain: 'index.historyQuery.explain'
- },
-
- index: 'index',
- udf: 'udf',
- udfs: 'udfs',
- udfInsertPrefix: 'create temporary function ',
- fileInsertPrefix: 'add jar ',
- explainPrefix: 'EXPLAIN ',
- explainFormattedPrefix: 'EXPLAIN FORMATTED ',
- insertUdfs: 'insert-udfs',
- job: 'job',
- jobs: 'jobs',
- savedQuery: 'saved-query',
- database: 'database',
- databases: 'databases',
- openQueries: 'open-queries',
- visualExplain: 'visual-explain',
- notify: 'notify',
- history: 'history',
- tezUI: 'tez-ui',
- file: 'file',
- fileResource: 'file-resource',
- alerts: 'alerts',
- logs: 'logs',
- results: 'results',
- jobResults: 'index/history-query/results',
- jobLogs: 'index/history-query/logs',
- jobExplain: 'index/history-query/explain',
- databaseTree: 'databases-tree',
- databaseSearch: 'databases-search-results',
- settings: 'settings',
- jobProgress: 'job-progress',
- ldapAuthentication: 'ldap-authentication',
- queryTabs: 'query-tabs',
- session: 'session'
- },
-
- hiveParameters: [
- {
- name: 'hive.tez.container.size',
- validate: helpers.regexes.digits
- },
-
- {
- name: 'hive.prewarm.enabled',
- values: helpers.validationValues.bool
- },
- {
- name: 'hive.prewarm.numcontainers',
- validate: helpers.regexes.digits
- },
- {
- name: 'hive.tez.auto.reducer.parallelism',
- values: helpers.validationValues.bool
- },
- {
- name: 'hive.execution.engine',
- values: helpers.validationValues.execEngine
- },
- {
- name: 'hive.vectorized.execution.enabled',
- values: helpers.validationValues.bool
- },
- {
- name: 'hive.auto.convert.join',
- values: helpers.validationValues.bool
- },
- {
- name: 'tez.am.resource.memory.mb',
- validate: helpers.regexes.digits
- },
- {
- name: 'tez.am.container.idle.release-timeout-min.millis',
- validate: helpers.regexes.digits
- },
- {
- name: 'tez.am.container.idle.release-timeout-max.millis',
- validate: helpers.regexes.digits
- },
- {
- name: 'tez.queue.name',
- validate: helpers.regexes.name
- },
- {
- name: 'tez.runtime.io.sort.mb',
- validate: helpers.regexes.digits
- },
- {
- name: 'tez.runtime.sort.threads',
- validate: helpers.regexes.digits
- },
- {
- name: 'tez.runtime.compress.codec',
- validate: helpers.regexes.dotPath
- },
- {
- name: 'tez.grouping.min-size',
- validate: helpers.regexes.digits
- },
- {
- name: 'tez.grouping.max-size',
- validate: helpers.regexes.digits
- },
- {
- name: 'tez.generate.debug.artifacts',
- values: helpers.validationValues.bool
- }
- ],
-
- jobReferrer: {
- sample: 'sample',
- explain: 'explain',
- visualExplain: 'visualExplain',
- job: 'job'
- },
-
- statuses: {
- unknown: "UNKNOWN",
- initialized: "INITIALIZED",
- running: "RUNNING",
- succeeded: "SUCCEEDED",
- canceled: "CANCELED",
- closed: "CLOSED",
- error: "ERROR",
- failed: 'FAILED',
- killed: 'KILLED',
- pending: "PENDING"
- },
-
- alerts: {
- warning: 'warning',
- error: 'danger',
- success: 'success'
- },
-
- results: {
- save: {
- csv: 'Save as csv',
- hdfs: 'Save to HDFS'
- },
- statuses: {
- terminated: "TERMINATED",
- runnable: "RUNNABLE"
- }
- },
-
- //this can be replaced by a string.format implementation
- adapter: {
- version: '1.0.0',
- instance: 'Hive',
- apiPrefix: '/api/v1/views/HIVE/versions/',
- instancePrefix: '/instances/',
- resourcePrefix: 'resources/'
- },
-
- sampleDataQuery: 'SELECT * FROM %@ LIMIT 100;',
-
- notify: {
- ERROR: {
- typeClass : 'alert-danger',
- typeIcon : 'fa-exclamation-triangle'
- },
- WARN: {
- typeClass : 'alert-warning',
- typeIcon : 'fa-times-circle'
- },
- SUCCESS: {
- typeClass : 'alert-success',
- typeIcon : 'fa-check'
- },
- INFO: {
- typeClass : 'alert-info',
- typeIcon : 'fa-info'
- }
- },
-
- defaultVisualizationRowCount: 10000
-
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/dag-rules.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/dag-rules.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/dag-rules.js
deleted file mode 100644
index c854892..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/dag-rules.js
+++ /dev/null
@@ -1,141 +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.ArrayProxy.create({
- content: Ember.A(
- [
- {
- targetOperator: 'TableScan',
- targetProperty: 'alias:',
- label: 'Table Scan:',
-
- fields: [
- {
- label: 'filterExpr:',
- targetProperty: 'filterExpr:'
- }
- ]
- },
- {
- targetOperator: 'Filter Operator',
- targetProperty: 'predicate:',
- label: 'Filter:',
-
- fields: []
- },
- {
- targetOperator: 'Map Join Operator',
- label: 'Map Join',
-
- fields: []
- },
- {
- targetOperator: 'Merge Join Operator',
- label: 'Merge Join',
-
- fields: []
- },
- {
- targetOperator: 'Select Operator',
- label: 'Select',
-
- fields: []
- },
- {
- targetOperator: 'Reduce Output Operator',
- label: 'Reduce',
-
- fields: [
- {
- label: 'Partition columns:',
- targetProperty: 'Map-reduce partition columns:'
- },
- {
- label: 'Key expressions:',
- targetProperty: 'key expressions:'
- },
- {
- label: 'Sort order:',
- targetProperty: 'sort order:'
- }
- ]
- },
- {
- targetOperator: 'File Output Operator',
- label: 'File Output Operator',
-
- fields: []
- },
- {
- targetOperator: 'Group By Operator',
- label: 'Group By:',
-
- fields: [
- {
- label: 'Aggregations:',
- targetProperties: 'aggregations:'
- },
- {
- label: 'Keys:',
- targetProperty: 'keys:'
- }
- ]
- },
- {
- targetOperator: 'Limit',
- targetProperty: 'Number of rows:',
- label: 'Limit:',
-
- fields: []
- },
- {
- targetOperator: 'Extract',
- label: 'Extract',
-
- fields: []
- },
- {
- targetOperator: 'PTF Operator',
- label: 'Partition Table Function',
-
- fields: []
- },
- {
- targetOperator: 'Dynamic Partitioning Event Operator',
- labelel: 'Dynamic Partitioning Event',
-
- fields: [
- {
- label: 'Target column:',
- targetProperty: 'Target column:'
- },
- {
- label: 'Target Vertex:',
- targetProperty: 'Target Vertex:'
- },
- {
- label: 'Partition key expr:',
- targetProperty: 'Partition key expr:'
- }
- ]
- }
- ]
- )
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
deleted file mode 100644
index 32d81d3..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
+++ /dev/null
@@ -1,139 +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';
-
-/* globals moment */
-
-export default Ember.Object.create({
- isInteger: function (x) {
- return !isNaN(x);
- },
-
- isDate: function (date) {
- return moment(date).isValid();
- },
-
- regexes: {
- allUppercase: /^[^a-z]*$/,
- whitespaces: /^(\s*).*$/,
- digits: /^\d+$/,
- name: /\w+/ig,
- dotPath: /[a-z.]+/i,
- setSetting: /^set\s+[\w-.]+(\s+|\s?)=(\s+|\s?)[\w-.]+(\s+|\s?);/gim
- },
-
- validationValues: {
- bool: [
- Ember.Object.create({
- value: 'true'
- }),
- Ember.Object.create({
- value: 'false'
- })
- ],
-
- execEngine: [
- Ember.Object.create({
- value: 'tez'
- }),
- Ember.Object.create({
- value: 'mr'
- })
- ]
- },
-
- insensitiveCompare: function (sourceString) {
- var args = Array.prototype.slice.call(arguments, 1);
-
- if (!sourceString) {
- return false;
- }
-
- return !!args.find(function (arg) {
- return sourceString.match(new RegExp('^' + arg + '$', 'i'));
- });
- },
-
- insensitiveContains: function (sourceString, destString) {
- return sourceString.toLowerCase().indexOf(destString.toLowerCase()) > -1;
- },
-
- convertToArray: function (inputObj) {
- var array = [];
-
- for (var key in inputObj) {
- if (inputObj.hasOwnProperty(key)) {
- array.pushObject({
- name: key,
- value: inputObj[key]
- });
- }
- }
- return array;
- },
-
- /**
- * Convert number of seconds into time object HH MM SS
- *
- * @param integer secs Number of seconds to convert
- * @return object
- */
- secondsToHHMMSS: function (secs) {
- var hours = 0,
- minutes = 0,
- seconds = secs,
- divisor_for_minutes,
- divisor_for_seconds,
- formattedVal = [];
-
- if (seconds < 60) {
- formattedVal.push(Ember.I18n.t('labels.secsShort', {
- seconds: seconds
- }));
- } else {
- hours = Math.floor(seconds / (60 * 60));
-
- divisor_for_minutes = seconds % (60 * 60);
- minutes = Math.floor(divisor_for_minutes / 60);
-
- divisor_for_seconds = divisor_for_minutes % 60;
- seconds = Math.ceil(divisor_for_seconds);
-
- if (hours > 0) {
- formattedVal.push(Ember.I18n.t('labels.hrsShort', {
- hours: hours
- }));
- }
- if (minutes > 0) {
- formattedVal.push(Ember.I18n.t('labels.minsShort', {
- minutes: minutes
- }));
- }
- if (seconds > 0) {
- formattedVal.push(Ember.I18n.t('labels.secsShort', {
- seconds: seconds
- }));
- }
-
- }
-
- return formattedVal.join(' ');
- }
-
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/views/.gitkeep
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/.gitkeep b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/.gitkeep
deleted file mode 100644
index e69de29..0000000
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/views/index.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/index.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/index.js
deleted file mode 100644
index 204e67f..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/index.js
+++ /dev/null
@@ -1,28 +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.View.extend({
- didInsertElement: function() {
- this._super();
- Ember.$('body').tooltip({
- selector: '[data-toggle="tooltip"]'
- });
- }
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/views/message.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/message.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/message.js
deleted file mode 100644
index 45b0236..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/message.js
+++ /dev/null
@@ -1,36 +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';
-import NotificationView from 'hive/views/notification';
-
-export default NotificationView.extend({
- templateName : 'message',
- removeLater : Ember.K,
- isExpanded : false,
- removeMessage: 'removeMessage',
-
- actions: {
- expand: function () {
- this.toggleProperty('isExpanded');
- },
-
- close: function () {
- this.get('controller').send('removeMessage', this.get('notification'));
- }
- }
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/views/messages.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/messages.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/messages.js
deleted file mode 100644
index 5e720c0..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/messages.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 default Ember.View.extend({
- didInsertElement: function () {
- var target = this.$('#messages');
- var panel = this.$('#messages .panel-body');
-
- panel.css('min-height', $('.main-content').height());
- target.animate({ width: $('.main-content').width() }, 'fast');
- },
-
- willDestroyElement: function () {
- var target = this.$('#messages');
- var panel = this.$('#messages .panel-body');
-
- panel.css('min-height', 0);
- target.css('width', 0);
- }
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/views/notification.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/notification.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/notification.js
deleted file mode 100644
index 1fd2ce8..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/notification.js
+++ /dev/null
@@ -1,51 +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.View.extend({
- closeAfter : 5000,
- isHovering : false,
- templateName : 'notification',
- removeNotification : 'removeNotification',
-
- setup: function () {
- this.set('typeClass', this.get('notification.type.typeClass'));
- this.set('typeIcon', this.get('notification.type.typeIcon'));
- }.on('init'),
-
- removeLater: function () {
- Ember.run.later(this, function () {
- if (this.get('isHovering')) {
- this.removeLater();
- } else if (this.element) {
- this.send('close');
- }
- }, this.get('closeAfter'));
- }.on('didInsertElement'),
-
- mouseEnter: function () { this.set('isHovering', true); },
- mouseLeave: function () { this.set('isHovering', false); },
-
- actions: {
- close: function () {
- this.remove();
- this.get('parentView').send('removeNotification', this.get('notification'));
- }
- }
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/views/tez-ui.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/tez-ui.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/tez-ui.js
deleted file mode 100644
index 7601463..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/tez-ui.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 default Ember.View.extend({
- didInsertElement: function () {
- var target = this.$('#tez-ui');
- var panel = this.$('#tez-ui .panel-body');
-
- panel.css('min-height', $('.main-content').height());
- target.animate({ width: $('.main-content').width() }, 'fast');
- },
-
- willDestroyElement: function () {
- var target = this.$('#tez-ui');
- var panel = this.$('#tez-ui .panel-body');
-
- panel.css('min-height', 0);
- target.css('width', 0);
- }
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visual-explain.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visual-explain.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visual-explain.js
deleted file mode 100644
index 94cb05a..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visual-explain.js
+++ /dev/null
@@ -1,461 +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.
- */
-
-/* globals dagre */
-
-import Ember from 'ember';
-import dagRules from '../utils/dag-rules';
-import utils from 'hive/utils/functions';
-
-export default Ember.View.extend({
- verticesGroups: [],
- edges: [],
-
- willInsertElement: function () {
- this.set('graph', new dagre.graphlib.Graph());
- },
-
- didInsertElement: function () {
- this._super();
-
- var target = this.$('#visual-explain');
- var panel = this.$('#visual-explain .panel-body');
-
- panel.css('min-height', $('.main-content').height());
- target.animate({ width: $('.main-content').width() }, 'fast');
-
- this.$('#visual-explain-graph').draggable();
-
- if (this.get('controller.rerender')) {
- this.renderDag();
- }
- },
-
- willDestroyElement: function () {
- var target = this.$('#visual-explain');
- var panel = this.$('#visual-explain .panel-body');
-
- panel.css('min-height', 0);
- target.css('width', 0);
- },
-
- updateProgress: function () {
- var verticesProgress = this.get('controller.verticesProgress');
- var verticesGroups = this.get('verticesGroups');
-
- if (!verticesGroups || !verticesProgress || !verticesProgress.length) {
- return;
- }
-
- verticesGroups.forEach(function (verticesGroup) {
- verticesGroup.contents.forEach(function (node) {
- var progress = verticesProgress.findBy('name', node.get('label'));
-
- if (progress) {
- node.set('progress', progress.get('value'));
- }
- });
- });
- }.observes('controller.verticesProgress.@each.value', 'verticesGroups'),
-
- jsonChanged: function () {
- var json = this.get('controller.json');
- this.renderDag();
- }.observes('controller.json'),
-
- getOffset: function (el) {
- var _x = 0;
- var _y = 0;
- var _w = el.offsetWidth|0;
- var _h = el.offsetHeight|0;
- while( el && !isNaN( el.offsetLeft ) && !isNaN( el.offsetTop ) ) {
- _x += el.offsetLeft - el.scrollLeft;
- _y += el.offsetTop - el.scrollTop;
- el = el.offsetParent;
- }
- return { top: _y, left: _x, width: _w, height: _h };
- },
-
- addEdge: function (div1, div2, thickness, type) {
- var off1 = this.getOffset(div1);
- var off2 = this.getOffset(div2);
- // bottom right
- var x1 = off1.left + off1.width / 2;
- var y1 = off1.top + off1.height;
- // top right
- var x2 = off2.left + off2.width / 2;
- var y2 = off2.top;
- // distance
- var length = Math.sqrt(((x2-x1) * (x2-x1)) + ((y2-y1) * (y2-y1)));
- // center
- var cx = ((x1 + x2) / 2) - (length / 2);
- var cy = ((y1 + y2) / 2) - (thickness / 2) - 73;
- // angle
- var angle = Math.round(Math.atan2((y1-y2), (x1-x2)) * (180 / Math.PI));
-
- if (angle < -90) {
- angle = 180 + angle;
- }
-
- var style = "left: %@px; top: %@px; width: %@px; transform:rotate(%@4deg);";
- style = style.fmt(cx, cy, length, angle);
-
- var edgeType;
-
- if (type) {
- if (type === 'BROADCAST_EDGE') {
- edgeType = 'BROADCAST';
- } else {
- edgeType = 'SHUFFLE';
- }
- }
-
- this.get('edges').pushObject({
- style: style,
- type: edgeType
- });
- },
-
- getNodeContents: function (operator, contents, table, vertex) {
- var currentTable = table,
- contents = contents || [],
- nodeName,
- node,
- ruleNode,
- nodeLabelValue,
- self = this;
-
- if (operator.constructor === Array) {
- operator.forEach(function (childOperator) {
- self.getNodeContents(childOperator, contents, currentTable, vertex);
- });
-
- return contents;
- } else {
- nodeName = Object.getOwnPropertyNames(operator)[0];
- node = operator[nodeName];
- ruleNode = dagRules.findBy('targetOperator', nodeName);
-
- if (ruleNode) {
- if (nodeName.indexOf('Map Join') > -1) {
- nodeLabelValue = this.handleMapJoinNode(node, currentTable);
- currentTable = null;
- } else if (nodeName.indexOf('Merge Join') > -1) {
- nodeLabelValue = this.handleMergeJoinNode(node, vertex);
- } else {
- nodeLabelValue = node[ruleNode.targetProperty];
- }
-
- contents.pushObject({
- title: ruleNode.label,
- statistics: node["Statistics:"],
- index: contents.length + 1,
- value: nodeLabelValue,
- fields: ruleNode.fields.map(function (field) {
- var value = node[field.targetProperty || field.targetProperties];
-
- return {
- label: field.label,
- value: value
- };
- })
- });
-
- if (node.children) {
- return this.getNodeContents(node.children, contents, currentTable, vertex);
- } else {
- return contents;
- }
- } else {
- return contents;
- }
- }
- },
-
- handleMapJoinNode: function (node, table) {
- var rows = table || "<rows from above>";
- var firstTable = node["input vertices:"][0] || rows;
- var secondTable = node["input vertices:"][1] || rows;
-
- var joinString = node["condition map:"][0][""];
- joinString = joinString.replace("0", firstTable);
- joinString = joinString.replace("1", secondTable);
- joinString += " on ";
- joinString += node["keys:"][0] + "=";
- joinString += node["keys:"][1];
-
- return joinString;
- },
-
- handleMergeJoinNode: function (node, vertex) {
- var graphData = this.get('controller.json')['STAGE PLANS']['Stage-1']['Tez'];
- var edges = graphData['Edges:'];
- var index = 0;
- var joinString = node["condition map:"][0][""];
-
- edges[vertex].toArray().forEach(function (edge) {
- if (edge.type === "SIMPLE_EDGE") {
- joinString.replace(String(index), edge.parent);
- index++;
- }
- });
-
- return joinString;
- },
-
- //sets operator nodes
- setNodes: function (vertices) {
- var g = this.get('graph');
- var self = this;
-
- vertices.forEach(function (vertex) {
- var contents = [];
- var operator;
- var currentTable;
-
- if (vertex.name.indexOf('Map') > -1) {
- if (vertex.value && vertex.value['Map Operator Tree:']) {
- operator = vertex.value['Map Operator Tree:'][0];
- currentTable = operator["TableScan"]["alias:"];
- } else {
- //https://hortonworks.jira.com/browse/BUG-36168
- operator = "None";
- }
- } else if (vertex.name.indexOf('Reducer') > -1) {
- operator = vertex.value['Reduce Operator Tree:'];
- }
-
- if (operator) {
- contents = self.getNodeContents(operator, null, currentTable, vertex.name);
-
- g.setNode(vertex.name, {
- contents: contents,
- id: vertex.name,
- label: vertex.name
- });
- }
- });
-
- return this;
- },
-
- //sets edges between operator nodes
- setEdges: function (edges) {
- var g = this.get('graph');
- var invalidEdges = [];
- var edgesToBeRemoved = [];
- var isValidEdgeType = function (type) {
- return type === "SIMPLE_EDGE" ||
- type === "BROADCAST_EDGE";
- };
-
- edges.forEach(function (edge) {
- var parent;
- var type;
-
- if (edge.value.constructor === Array) {
- edge.value.forEach(function (childEdge) {
- parent = childEdge.parent;
- type = childEdge.type;
-
- if (isValidEdgeType(type)) {
- g.setEdge(parent, edge.name);
- g.edge({v: parent, w: edge.name}).type = type;
- } else {
- invalidEdges.pushObject({
- vertex: edge.name,
- edge: childEdge
- });
- }
- });
- } else {
- parent = edge.value.parent;
- type = edge.value.type;
-
- if (isValidEdgeType(type)) {
- g.setEdge(parent, edge.name);
- g.edge({v: parent, w: edge.name}).type = type;
- } else {
- invalidEdges.pushObject({
- vertex: edge.name,
- edge: edge.name
- });
- }
- }
- });
-
- invalidEdges.forEach(function (invalidEdge) {
- var parent;
- var targetEdge = g.edges().find(function (graphEdge) {
- return graphEdge.v === invalidEdge.edge.parent ||
- graphEdge.w === invalidEdge.edge.parent;
- });
-
- var targetVertex;
-
- if (targetEdge) {
- edgesToBeRemoved.pushObject(targetEdge);
-
- if (targetEdge.v === invalidEdge.edge.parent) {
- targetVertex = targetEdge.w;
- } else {
- targetVertex = targetEdge.v;
- }
-
- parent = invalidEdge.vertex;
-
- g.setEdge({v: parent, w: targetVertex});
- g.setEdge({v: parent, w: targetVertex}).type = "BROADCAST_EDGE";
- }
- });
-
- edgesToBeRemoved.uniq().forEach(function (edge) {
- g.removeEdge(edge.v, edge.w, edge.name);
- });
-
- return this;
- },
-
- //sets nodes for tables and their edges
- setTableNodesAndEdges: function (vertices) {
- var g = this.get('graph');
-
- vertices.forEach(function (vertex) {
- var operator;
- var table;
- var id;
-
- if (vertex.name.indexOf('Map') > -1 && vertex.value && vertex.value['Map Operator Tree:']) {
- operator = vertex.value['Map Operator Tree:'][0];
- for (var node in operator) {
- table = operator[node]['alias:'];
-
- //create unique identifier by using table + map pairs so that we have
- //different nodes for the same table if it's a table connected to multiple Map operators
- id = table + ' for ' + vertex.name;
-
- g.setNode(id, { id: id, label: table, isTableNode: true });
- g.setEdge(id, vertex.name);
- }
- }
- });
-
- dagre.layout(g);
-
- return this;
- },
-
- createNodeGroups: function () {
- var groupedNodes = [];
- var g = this.get('graph');
- var lastRowNode;
- var fileOutputOperator;
-
- g.nodes().forEach(function (value) {
- var node = g.node(value);
-
- if (node) {
- var existentRow = groupedNodes.findBy('topOffset', node.y);
-
- if (!existentRow) {
- groupedNodes.pushObject({
- topOffset: node.y,
- contents: [ Ember.Object.create(node) ]
- });
- } else {
- existentRow.contents.pushObject(Ember.Object.create(node));
- }
- }
- });
-
- groupedNodes = groupedNodes.sortBy('topOffset');
- groupedNodes.forEach(function (group) {
- group.contents = group.contents.sortBy('x');
- });
-
- lastRowNode = groupedNodes.get('lastObject.contents.lastObject');
- fileOutputOperator = lastRowNode.contents.get('lastObject');
-
- g.setNode(fileOutputOperator.title, { id: fileOutputOperator.title, label: fileOutputOperator.title, isOutputNode: true });
- g.setEdge(fileOutputOperator.title, lastRowNode.id);
-
- groupedNodes.pushObject({
- contents: [ Ember.Object.create(g.node(fileOutputOperator.title)) ]
- });
-
- lastRowNode.contents.removeObject(fileOutputOperator);
-
- this.set('verticesGroups', groupedNodes);
-
- return this;
- },
-
- renderEdges: function () {
- var self = this;
- var g = this.get('graph');
-
- Ember.run.later(function () {
- g.edges().forEach(function (value) {
- var firstNode = self.$("[title='" + value.v + "']");
- var secondNode = self.$("[title='" + value.w + "']");
-
- if (firstNode && secondNode) {
- self.addEdge(firstNode[0], secondNode[0], 2, g.edge(value).type);
- }
-
- });
- }, 400);
- },
-
- renderDag: function () {
- var json = this.get('controller.json');
- var isVisualExplain = json && (json['STAGE PLANS'] != undefined) && (json['STAGE PLANS']['Stage-1'] != undefined) && (json['STAGE PLANS']['Stage-1']['Tez'] != undefined);
- if (isVisualExplain) {
- this.set('edges', []);
-
- // Create a new directed graph
- var g = this.get('graph');
-
- var graphData = json['STAGE PLANS']['Stage-1']['Tez'];
- var vertices = utils.convertToArray(graphData['Vertices:']);
- var edges = utils.convertToArray(graphData['Edges:']);
-
- // Set an object for the graph label
- g.setGraph({});
-
- // Default to assigning a new object as a label for each new edge.
- g.setDefaultEdgeLabel(function () { return {}; });
-
- this.setNodes(vertices)
- .setEdges(edges)
- .setTableNodesAndEdges(vertices)
- .createNodeGroups()
- .renderEdges();
-
- this.set('controller.showSpinner', true);
-
- } else {
-
- if(!this.get('controller.noquery')) {
- $('#no-visual-explain-graph').html('Visual explain is not available.');
- }
-
- }
-
- }
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visualization-ui.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visualization-ui.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visualization-ui.js
deleted file mode 100644
index b1c10df..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/views/visualization-ui.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 default Ember.View.extend({
- didInsertElement: function () {
- var target = this.$('#visualization');
- var panel = this.$('#visualization .panel-body').first();
-
- panel.css('min-height', $('.main-content').height());
- target.animate({ width: $('.main-content').width() }, 'fast');
- },
-
- willDestroyElement: function () {
- var target = this.$('#visualization');
- var panel = this.$('#visualization .panel-body');
-
- panel.css('min-height', 0);
- target.css('width', 0);
- }
-});
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/big_tables.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/big_tables.js b/contrib/views/hive/src/main/resources/ui/hive-web/big_tables.js
deleted file mode 100644
index 9f3a317..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/big_tables.js
+++ /dev/null
@@ -1,54 +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.
- */
-
-var result = '';
-var tableCount = 15000;
-var columnCount = 100;
-
-//tables and columns script
-for (var i = 0; i < tableCount; i++) {
- result += 'CREATE TABLE TABLE_' + i + ' (';
- (function () {
- for (var j = 0; j < columnCount; j++) {
- result += 'field_' + j + ' STRING';
-
- if (j < columnCount - 1) {
- result += ',';
- } else {
- result += ') '
- }
- }
- }());
-
- result += "ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; \nLOAD DATA LOCAL INPATH 'test.csv' OVERWRITE INTO TABLE " +
- 'TABLE_' + i + ';\n\n';
-}
-
-console.log(result);
-
-//csv script
-var fill = '';
-for (var i = 0; i < columnCount; i++) {
- fill += 'field_' + i;
-
- if (i < columnCount - 1) {
- fill += ', ';
- }
-}
-
-console.log(fill);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/c0f9621f/contrib/views/hive/src/main/resources/ui/hive-web/bower.json
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/bower.json b/contrib/views/hive/src/main/resources/ui/hive-web/bower.json
deleted file mode 100644
index d029eff..0000000
--- a/contrib/views/hive/src/main/resources/ui/hive-web/bower.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "name": "hive",
- "dependencies": {
- "jquery": "1.11.3",
- "ember": "1.10.0",
- "ember-data": "1.0.0-beta.16.1",
- "ember-resolver": "~0.1.12",
- "loader.js": "stefanpenner/loader.js#3.2.0",
- "ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",
- "ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.1.3",
- "ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2",
- "ember-qunit": "0.4.0",
- "ember-qunit-notifications": "0.0.7",
- "qunit": "1.18.0",
- "bootstrap": "~3.2.0",
- "ember-i18n": "~3.0.0",
- "blanket": "~1.1.5",
- "jquery-ui": "~1.11.2",
- "selectize": "~0.12.0",
- "pretender": "0.1.0",
- "ember-uploader": "0.3.9",
- "polestar": "https://github.com/hortonworks/polestar.git#0.7.2",
- "voyager": "https://github.com/hortonworks/voyager.git#0.7.2"
- },
- "resolutions": {
- "ember": "1.10.0"
- }
-}