瀏覽代碼

[notebook] Refactor notebook code into a single lib

Romain Rigaux 10 年之前
父節點
當前提交
1474cfe
共有 30 個文件被更改,包括 1542 次插入1 次删除
  1. 2 1
      desktop/Makefile
  2. 1 0
      desktop/core/src/desktop/settings.py
  3. 36 0
      desktop/libs/notebook/Makefile
  4. 2 0
      desktop/libs/notebook/babel.cfg
  5. 1 0
      desktop/libs/notebook/hueversion.py
  6. 29 0
      desktop/libs/notebook/setup.py
  7. 15 0
      desktop/libs/notebook/src/notebook/__init__.py
  8. 16 0
      desktop/libs/notebook/src/notebook/conf.py
  9. 109 0
      desktop/libs/notebook/src/notebook/locale/de/LC_MESSAGES/django.po
  10. 109 0
      desktop/libs/notebook/src/notebook/locale/en/LC_MESSAGES/django.po
  11. 19 0
      desktop/libs/notebook/src/notebook/locale/en_US.pot
  12. 109 0
      desktop/libs/notebook/src/notebook/locale/es/LC_MESSAGES/django.po
  13. 109 0
      desktop/libs/notebook/src/notebook/locale/fr/LC_MESSAGES/django.po
  14. 109 0
      desktop/libs/notebook/src/notebook/locale/ja/LC_MESSAGES/django.po
  15. 109 0
      desktop/libs/notebook/src/notebook/locale/ko/LC_MESSAGES/django.po
  16. 109 0
      desktop/libs/notebook/src/notebook/locale/pt/LC_MESSAGES/django.po
  17. 109 0
      desktop/libs/notebook/src/notebook/locale/pt_BR/LC_MESSAGES/django.po
  18. 109 0
      desktop/libs/notebook/src/notebook/locale/zh_CN/LC_MESSAGES/django.po
  19. 0 0
      desktop/libs/notebook/src/notebook/management/__init__.py
  20. 0 0
      desktop/libs/notebook/src/notebook/management/commands/__init__.py
  21. 16 0
      desktop/libs/notebook/src/notebook/models.py
  22. 24 0
      desktop/libs/notebook/src/notebook/settings.py
  23. 二進制
      desktop/libs/notebook/src/notebook/static/notebook/art/icon_notebook_24.png
  24. 167 0
      desktop/libs/notebook/src/notebook/static/notebook/css/admin.css
  25. 183 0
      desktop/libs/notebook/src/notebook/static/notebook/help/index.html
  26. 二進制
      desktop/libs/notebook/src/notebook/static/notebook/img/clear.png
  27. 二進制
      desktop/libs/notebook/src/notebook/static/notebook/img/loading.gif
  28. 16 0
      desktop/libs/notebook/src/notebook/tests.py
  29. 18 0
      desktop/libs/notebook/src/notebook/urls.py
  30. 16 0
      desktop/libs/notebook/src/notebook/views.py

+ 2 - 1
desktop/Makefile

@@ -49,7 +49,8 @@ APPS := core \
 	libs/libsaml \
 	libs/libsentry \
 	libs/libsolr \
-	libs/libzookeeper
+	libs/libzookeeper \
+	libs/notebook
 
 .PHONY: default
 default:: hue syncdb

+ 1 - 0
desktop/core/src/desktop/settings.py

@@ -107,6 +107,7 @@ MEDIA_URL = ''
 # Additional locations of static files
 STATICFILES_DIRS = (
     os.path.join(BASE_DIR, 'desktop', 'libs', 'indexer', 'src', 'indexer', 'static'),
+    os.path.join(BASE_DIR, 'desktop', 'libs', 'notebook', 'src', 'notebook', 'static'),
     os.path.join(BASE_DIR, 'desktop', 'libs', 'liboauth', 'src', 'liboauth', 'static'),
 )
 

+ 36 - 0
desktop/libs/notebook/Makefile

@@ -0,0 +1,36 @@
+#
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. 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.
+#
+
+
+ifeq ($(ROOT),)
+  $(error "Error: Expect the environment variable $$ROOT to point to the Desktop installation")
+endif
+
+include $(ROOT)/Makefile.sdk
+
+default::
+	@echo '  env-install    : Install into virtual-env'
+
+#
+# env-install
+#   Install app into the virtual environment.
+#
+.PHONY: env-install
+env-install: compile ext-env-install
+	@echo '--- Installing $(APP_NAME) into virtual-env'
+	@$(ENV_PYTHON) setup.py develop -N -q

+ 2 - 0
desktop/libs/notebook/babel.cfg

@@ -0,0 +1,2 @@
+[python: src/notebook/**.py]
+[mako: src/notebook/templates/**.mako]

+ 1 - 0
desktop/libs/notebook/hueversion.py

@@ -0,0 +1 @@
+VERSION

+ 29 - 0
desktop/libs/notebook/setup.py

@@ -0,0 +1,29 @@
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. 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.
+from setuptools import setup, find_packages
+from hueversion import VERSION
+
+setup(
+      name = "notebook",
+      version = VERSION,
+      author = "Hue",
+      url = 'http://github.com/cloudera/hue',
+      description = "Type various snippets of code",
+      packages = find_packages('src'),
+      package_dir = {'': 'src'},
+      install_requires = ['setuptools', 'desktop'],
+      entry_points = { 'desktop.sdk.application': 'notebook=notebook' },
+)

+ 15 - 0
desktop/libs/notebook/src/notebook/__init__.py

@@ -0,0 +1,15 @@
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. 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.

+ 16 - 0
desktop/libs/notebook/src/notebook/conf.py

@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. 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.

+ 109 - 0
desktop/libs/notebook/src/notebook/locale/de/LC_MESSAGES/django.po

@@ -0,0 +1,109 @@
+# German translations for Hue.
+# Copyright (C) 2012 Cloudera
+# This file is distributed under the same license as the Hue project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version:  PROJEKTVERSION\n"
+"Report-Msgid-Bugs-To: E-MAIL@ADRESSE\n"
+"POT-Creation-Date: 2015-09-11 11:43-0400\n"
+"PO-Revision-Date: 2012-07-30 18:50-0700\n"
+"Last-Translator: VOLLSTÄNDIGER NAME <E-MAIL@ADRESSE>\n"
+"Language-Team: de <LL@li.org>\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+
+#~ msgid "Solr Indexes"
+#~ msgstr "Indizes löschen"
+
+#~ msgid "Search for name, description, etc..."
+#~ msgstr ""
+
+#~ msgid "Delete"
+#~ msgstr "Löschen"
+
+#~ msgid "Create index"
+#~ msgstr "Index löschen "
+
+#~ msgid "Create index from a file"
+#~ msgstr ""
+
+#~ msgid "Create alias"
+#~ msgstr ""
+
+#~ msgid "Name"
+#~ msgstr "Name"
+
+#~ msgid "Type"
+#~ msgstr "Typ"
+
+#~ msgid "Collections"
+#~ msgstr "Sammlungen"
+
+#~ msgid "Schema"
+#~ msgstr ""
+
+#~ msgid "Edit"
+#~ msgstr ""
+
+#~ msgid "Cancel"
+#~ msgstr "Abbrechen"
+
+#~ msgid "Create or edit"
+#~ msgstr ""
+
+#~ msgid "Get Sample"
+#~ msgstr ""
+
+#~ msgid "Create"
+#~ msgstr "Erstellen"
+
+#~ msgid "Path"
+#~ msgstr "Aktualisieren"
+
+#~ msgid "Database"
+#~ msgstr ""
+
+#~ msgid "Table"
+#~ msgstr ""
+
+#~ msgid "Delete the selected index(es)?"
+#~ msgstr "Format der zu indizierenden ausgewählten Datei"
+
+#~ msgid "No"
+#~ msgstr ""
+
+#~ msgid "Yes"
+#~ msgstr ""
+
+#~ msgid "No data available"
+#~ msgstr ""
+
+#~ msgid "Showing _START_ to _END_ of _TOTAL_ entries"
+#~ msgstr ""
+
+#~ msgid "Showing 0 to 0 of 0 entries"
+#~ msgstr ""
+
+#~ msgid "(filtered from _MAX_ total entries)"
+#~ msgstr ""
+
+#~ msgid "No matching records"
+#~ msgstr ""
+
+#~ msgid "First"
+#~ msgstr ""
+
+#~ msgid "Last"
+#~ msgstr ""
+
+#~ msgid "Next"
+#~ msgstr "Weiter"
+
+#~ msgid "Previous"
+#~ msgstr "Zurück"
+

+ 109 - 0
desktop/libs/notebook/src/notebook/locale/en/LC_MESSAGES/django.po

@@ -0,0 +1,109 @@
+# English translations for Hue.
+# Copyright (C) 2012 Cloudera, Inc
+# This file is distributed under the same license as the Hue project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Hue VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2015-09-11 11:43-0400\n"
+"PO-Revision-Date: 2013-10-28 10:31-0700\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: en <LL@li.org>\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+
+#~ msgid "Solr Indexes"
+#~ msgstr ""
+
+#~ msgid "Search for name, description, etc..."
+#~ msgstr ""
+
+#~ msgid "Delete"
+#~ msgstr ""
+
+#~ msgid "Create index"
+#~ msgstr ""
+
+#~ msgid "Create index from a file"
+#~ msgstr ""
+
+#~ msgid "Create alias"
+#~ msgstr ""
+
+#~ msgid "Name"
+#~ msgstr ""
+
+#~ msgid "Type"
+#~ msgstr ""
+
+#~ msgid "Collections"
+#~ msgstr ""
+
+#~ msgid "Schema"
+#~ msgstr ""
+
+#~ msgid "Edit"
+#~ msgstr ""
+
+#~ msgid "Cancel"
+#~ msgstr ""
+
+#~ msgid "Create or edit"
+#~ msgstr ""
+
+#~ msgid "Get Sample"
+#~ msgstr ""
+
+#~ msgid "Create"
+#~ msgstr ""
+
+#~ msgid "Path"
+#~ msgstr ""
+
+#~ msgid "Database"
+#~ msgstr ""
+
+#~ msgid "Table"
+#~ msgstr ""
+
+#~ msgid "Delete the selected index(es)?"
+#~ msgstr ""
+
+#~ msgid "No"
+#~ msgstr ""
+
+#~ msgid "Yes"
+#~ msgstr ""
+
+#~ msgid "No data available"
+#~ msgstr ""
+
+#~ msgid "Showing _START_ to _END_ of _TOTAL_ entries"
+#~ msgstr ""
+
+#~ msgid "Showing 0 to 0 of 0 entries"
+#~ msgstr ""
+
+#~ msgid "(filtered from _MAX_ total entries)"
+#~ msgstr ""
+
+#~ msgid "No matching records"
+#~ msgstr ""
+
+#~ msgid "First"
+#~ msgstr ""
+
+#~ msgid "Last"
+#~ msgstr ""
+
+#~ msgid "Next"
+#~ msgstr ""
+
+#~ msgid "Previous"
+#~ msgstr ""
+

+ 19 - 0
desktop/libs/notebook/src/notebook/locale/en_US.pot

@@ -0,0 +1,19 @@
+# Translations template for Hue.
+# Copyright (C) 2015 Cloudera, Inc
+# This file is distributed under the same license as the Hue project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2015.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: Hue VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2015-09-11 11:43-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+

+ 109 - 0
desktop/libs/notebook/src/notebook/locale/es/LC_MESSAGES/django.po

@@ -0,0 +1,109 @@
+# Spanish translations for Hue.
+# Copyright (C) 2012 Cloudera
+# This file is distributed under the same license as the Hue project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VERSIÓN DEL PROYECTO\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2015-09-11 11:43-0400\n"
+"PO-Revision-Date: 2012-07-30 18:50-0700\n"
+"Last-Translator: NOMBRE COMPLETO <EMAIL@ADDRESS>\n"
+"Language-Team: es <LL@li.org>\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+
+#~ msgid "Solr Indexes"
+#~ msgstr "Eliminar índices"
+
+#~ msgid "Search for name, description, etc..."
+#~ msgstr ""
+
+#~ msgid "Delete"
+#~ msgstr "Eliminar"
+
+#~ msgid "Create index"
+#~ msgstr "Eliminar índice "
+
+#~ msgid "Create index from a file"
+#~ msgstr ""
+
+#~ msgid "Create alias"
+#~ msgstr ""
+
+#~ msgid "Name"
+#~ msgstr "Nombre"
+
+#~ msgid "Type"
+#~ msgstr "Tipo"
+
+#~ msgid "Collections"
+#~ msgstr "Recopilaciones"
+
+#~ msgid "Schema"
+#~ msgstr ""
+
+#~ msgid "Edit"
+#~ msgstr ""
+
+#~ msgid "Cancel"
+#~ msgstr "Cancelar"
+
+#~ msgid "Create or edit"
+#~ msgstr ""
+
+#~ msgid "Get Sample"
+#~ msgstr ""
+
+#~ msgid "Create"
+#~ msgstr "Crear"
+
+#~ msgid "Path"
+#~ msgstr "Actualizar"
+
+#~ msgid "Database"
+#~ msgstr ""
+
+#~ msgid "Table"
+#~ msgstr ""
+
+#~ msgid "Delete the selected index(es)?"
+#~ msgstr "Formato del archivo seleccionado para indexar"
+
+#~ msgid "No"
+#~ msgstr ""
+
+#~ msgid "Yes"
+#~ msgstr ""
+
+#~ msgid "No data available"
+#~ msgstr ""
+
+#~ msgid "Showing _START_ to _END_ of _TOTAL_ entries"
+#~ msgstr ""
+
+#~ msgid "Showing 0 to 0 of 0 entries"
+#~ msgstr ""
+
+#~ msgid "(filtered from _MAX_ total entries)"
+#~ msgstr ""
+
+#~ msgid "No matching records"
+#~ msgstr ""
+
+#~ msgid "First"
+#~ msgstr ""
+
+#~ msgid "Last"
+#~ msgstr ""
+
+#~ msgid "Next"
+#~ msgstr "Siguiente"
+
+#~ msgid "Previous"
+#~ msgstr "Anterior"
+

+ 109 - 0
desktop/libs/notebook/src/notebook/locale/fr/LC_MESSAGES/django.po

@@ -0,0 +1,109 @@
+# French translations for Hue.
+# Copyright (C) 2012 Cloudera
+# This file is distributed under the same license as the Hue project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VERSION DU PROJET\n"
+"Report-Msgid-Bugs-To: ADRESSE@EMAIL\n"
+"POT-Creation-Date: 2015-09-11 11:43-0400\n"
+"PO-Revision-Date: 2012-07-30 18:50-0700\n"
+"Last-Translator: NOM COMPLET <ADRESSE@EMAIL>\n"
+"Language-Team: fr <LL@li.org>\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+
+#~ msgid "Solr Indexes"
+#~ msgstr "Supprimer des index"
+
+#~ msgid "Search for name, description, etc..."
+#~ msgstr ""
+
+#~ msgid "Delete"
+#~ msgstr "Supprimer"
+
+#~ msgid "Create index"
+#~ msgstr "Supprimer l'index "
+
+#~ msgid "Create index from a file"
+#~ msgstr ""
+
+#~ msgid "Create alias"
+#~ msgstr ""
+
+#~ msgid "Name"
+#~ msgstr "Nom"
+
+#~ msgid "Type"
+#~ msgstr "Type"
+
+#~ msgid "Collections"
+#~ msgstr "Collections"
+
+#~ msgid "Schema"
+#~ msgstr ""
+
+#~ msgid "Edit"
+#~ msgstr ""
+
+#~ msgid "Cancel"
+#~ msgstr "Annuler"
+
+#~ msgid "Create or edit"
+#~ msgstr ""
+
+#~ msgid "Get Sample"
+#~ msgstr ""
+
+#~ msgid "Create"
+#~ msgstr "Créer"
+
+#~ msgid "Path"
+#~ msgstr "Mettre à jour"
+
+#~ msgid "Database"
+#~ msgstr ""
+
+#~ msgid "Table"
+#~ msgstr ""
+
+#~ msgid "Delete the selected index(es)?"
+#~ msgstr "Format du fichier sélectionné à notebook"
+
+#~ msgid "No"
+#~ msgstr ""
+
+#~ msgid "Yes"
+#~ msgstr ""
+
+#~ msgid "No data available"
+#~ msgstr ""
+
+#~ msgid "Showing _START_ to _END_ of _TOTAL_ entries"
+#~ msgstr ""
+
+#~ msgid "Showing 0 to 0 of 0 entries"
+#~ msgstr ""
+
+#~ msgid "(filtered from _MAX_ total entries)"
+#~ msgstr ""
+
+#~ msgid "No matching records"
+#~ msgstr ""
+
+#~ msgid "First"
+#~ msgstr ""
+
+#~ msgid "Last"
+#~ msgstr ""
+
+#~ msgid "Next"
+#~ msgstr "Suivant"
+
+#~ msgid "Previous"
+#~ msgstr "Précédent"
+

+ 109 - 0
desktop/libs/notebook/src/notebook/locale/ja/LC_MESSAGES/django.po

@@ -0,0 +1,109 @@
+# Japanese translations for Hue.
+# Copyright (C) 2012 Cloudera
+# This file is distributed under the same license as the Hue project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version:  プロジェクトバージョン\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2015-09-11 11:43-0400\n"
+"PO-Revision-Date: 2012-07-30 18:50-0700\n"
+"Last-Translator: フルネーム <EMAIL@ADDRESS>\n"
+"Language-Team: ja <LL@li.org>\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+
+#~ msgid "Solr Indexes"
+#~ msgstr "インデックスを削除"
+
+#~ msgid "Search for name, description, etc..."
+#~ msgstr ""
+
+#~ msgid "Delete"
+#~ msgstr "削除"
+
+#~ msgid "Create index"
+#~ msgstr "インデックスを削除 "
+
+#~ msgid "Create index from a file"
+#~ msgstr ""
+
+#~ msgid "Create alias"
+#~ msgstr ""
+
+#~ msgid "Name"
+#~ msgstr "名前"
+
+#~ msgid "Type"
+#~ msgstr "タイプ"
+
+#~ msgid "Collections"
+#~ msgstr "コレクション"
+
+#~ msgid "Schema"
+#~ msgstr ""
+
+#~ msgid "Edit"
+#~ msgstr ""
+
+#~ msgid "Cancel"
+#~ msgstr "キャンセル"
+
+#~ msgid "Create or edit"
+#~ msgstr ""
+
+#~ msgid "Get Sample"
+#~ msgstr ""
+
+#~ msgid "Create"
+#~ msgstr "作成"
+
+#~ msgid "Path"
+#~ msgstr "更新"
+
+#~ msgid "Database"
+#~ msgstr ""
+
+#~ msgid "Table"
+#~ msgstr ""
+
+#~ msgid "Delete the selected index(es)?"
+#~ msgstr "インデックスを作成する選択済みファイルの形式"
+
+#~ msgid "No"
+#~ msgstr ""
+
+#~ msgid "Yes"
+#~ msgstr ""
+
+#~ msgid "No data available"
+#~ msgstr ""
+
+#~ msgid "Showing _START_ to _END_ of _TOTAL_ entries"
+#~ msgstr ""
+
+#~ msgid "Showing 0 to 0 of 0 entries"
+#~ msgstr ""
+
+#~ msgid "(filtered from _MAX_ total entries)"
+#~ msgstr ""
+
+#~ msgid "No matching records"
+#~ msgstr ""
+
+#~ msgid "First"
+#~ msgstr ""
+
+#~ msgid "Last"
+#~ msgstr ""
+
+#~ msgid "Next"
+#~ msgstr "次"
+
+#~ msgid "Previous"
+#~ msgstr "前"
+

+ 109 - 0
desktop/libs/notebook/src/notebook/locale/ko/LC_MESSAGES/django.po

@@ -0,0 +1,109 @@
+# Korean translations for Hue.
+# Copyright (C) 2012 Cloudera
+# This file is distributed under the same license as the Hue project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 프로젝트 버전\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2015-09-11 11:43-0400\n"
+"PO-Revision-Date: 2012-07-30 18:50-0700\n"
+"Last-Translator: 전체 이름 <EMAIL@ADDRESS>\n"
+"Language-Team: ko <LL@li.org>\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+
+#~ msgid "Solr Indexes"
+#~ msgstr "인덱스 삭제"
+
+#~ msgid "Search for name, description, etc..."
+#~ msgstr ""
+
+#~ msgid "Delete"
+#~ msgstr "삭제"
+
+#~ msgid "Create index"
+#~ msgstr "인덱스 삭제 "
+
+#~ msgid "Create index from a file"
+#~ msgstr ""
+
+#~ msgid "Create alias"
+#~ msgstr ""
+
+#~ msgid "Name"
+#~ msgstr "이름"
+
+#~ msgid "Type"
+#~ msgstr "유형"
+
+#~ msgid "Collections"
+#~ msgstr "컬렉션"
+
+#~ msgid "Schema"
+#~ msgstr ""
+
+#~ msgid "Edit"
+#~ msgstr ""
+
+#~ msgid "Cancel"
+#~ msgstr "취소"
+
+#~ msgid "Create or edit"
+#~ msgstr ""
+
+#~ msgid "Get Sample"
+#~ msgstr ""
+
+#~ msgid "Create"
+#~ msgstr "생성"
+
+#~ msgid "Path"
+#~ msgstr "업데이트"
+
+#~ msgid "Database"
+#~ msgstr ""
+
+#~ msgid "Table"
+#~ msgstr ""
+
+#~ msgid "Delete the selected index(es)?"
+#~ msgstr "인덱스를 위해 선택한 파일 형식"
+
+#~ msgid "No"
+#~ msgstr ""
+
+#~ msgid "Yes"
+#~ msgstr ""
+
+#~ msgid "No data available"
+#~ msgstr ""
+
+#~ msgid "Showing _START_ to _END_ of _TOTAL_ entries"
+#~ msgstr ""
+
+#~ msgid "Showing 0 to 0 of 0 entries"
+#~ msgstr ""
+
+#~ msgid "(filtered from _MAX_ total entries)"
+#~ msgstr ""
+
+#~ msgid "No matching records"
+#~ msgstr ""
+
+#~ msgid "First"
+#~ msgstr ""
+
+#~ msgid "Last"
+#~ msgstr ""
+
+#~ msgid "Next"
+#~ msgstr "다음"
+
+#~ msgid "Previous"
+#~ msgstr "이전"
+

+ 109 - 0
desktop/libs/notebook/src/notebook/locale/pt/LC_MESSAGES/django.po

@@ -0,0 +1,109 @@
+# Portuguese translations for Hue.
+# Copyright (C) 2012 Cloudera
+# This file is distributed under the same license as the Hue project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VERSÃO DO PROJECTO\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2015-09-11 11:43-0400\n"
+"PO-Revision-Date: 2012-07-30 18:50-0700\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: pt <LL@li.org>\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+
+#~ msgid "Solr Indexes"
+#~ msgstr "Eliminar índices"
+
+#~ msgid "Search for name, description, etc..."
+#~ msgstr ""
+
+#~ msgid "Delete"
+#~ msgstr "Eliminar"
+
+#~ msgid "Create index"
+#~ msgstr "Eliminar índice "
+
+#~ msgid "Create index from a file"
+#~ msgstr ""
+
+#~ msgid "Create alias"
+#~ msgstr ""
+
+#~ msgid "Name"
+#~ msgstr "Nome"
+
+#~ msgid "Type"
+#~ msgstr "Tipo"
+
+#~ msgid "Collections"
+#~ msgstr "Colecções"
+
+#~ msgid "Schema"
+#~ msgstr ""
+
+#~ msgid "Edit"
+#~ msgstr ""
+
+#~ msgid "Cancel"
+#~ msgstr "Cancelar"
+
+#~ msgid "Create or edit"
+#~ msgstr ""
+
+#~ msgid "Get Sample"
+#~ msgstr ""
+
+#~ msgid "Create"
+#~ msgstr "Criar"
+
+#~ msgid "Path"
+#~ msgstr "Actualizar"
+
+#~ msgid "Database"
+#~ msgstr ""
+
+#~ msgid "Table"
+#~ msgstr ""
+
+#~ msgid "Delete the selected index(es)?"
+#~ msgstr "Formato do ficheiro seleccionado para índice"
+
+#~ msgid "No"
+#~ msgstr ""
+
+#~ msgid "Yes"
+#~ msgstr ""
+
+#~ msgid "No data available"
+#~ msgstr ""
+
+#~ msgid "Showing _START_ to _END_ of _TOTAL_ entries"
+#~ msgstr ""
+
+#~ msgid "Showing 0 to 0 of 0 entries"
+#~ msgstr ""
+
+#~ msgid "(filtered from _MAX_ total entries)"
+#~ msgstr ""
+
+#~ msgid "No matching records"
+#~ msgstr ""
+
+#~ msgid "First"
+#~ msgstr ""
+
+#~ msgid "Last"
+#~ msgstr ""
+
+#~ msgid "Next"
+#~ msgstr "Seguinte"
+
+#~ msgid "Previous"
+#~ msgstr "Anterior"
+

+ 109 - 0
desktop/libs/notebook/src/notebook/locale/pt_BR/LC_MESSAGES/django.po

@@ -0,0 +1,109 @@
+# Portuguese (Brazil) translations for Hue.
+# Copyright (C) 2012 Cloudera
+# This file is distributed under the same license as the Hue project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VERSÃO DO PROJETO\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2015-09-11 11:43-0400\n"
+"PO-Revision-Date: 2012-07-30 18:50-0700\n"
+"Last-Translator: NOME COMPLETO <EMAIL@ADDRESS>\n"
+"Language-Team: pt_BR <LL@li.org>\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+
+#~ msgid "Solr Indexes"
+#~ msgstr "Excluir índices"
+
+#~ msgid "Search for name, description, etc..."
+#~ msgstr ""
+
+#~ msgid "Delete"
+#~ msgstr "Excluir"
+
+#~ msgid "Create index"
+#~ msgstr "Excluir índice "
+
+#~ msgid "Create index from a file"
+#~ msgstr ""
+
+#~ msgid "Create alias"
+#~ msgstr ""
+
+#~ msgid "Name"
+#~ msgstr "Nome"
+
+#~ msgid "Type"
+#~ msgstr "Tipo"
+
+#~ msgid "Collections"
+#~ msgstr "Coleções"
+
+#~ msgid "Schema"
+#~ msgstr ""
+
+#~ msgid "Edit"
+#~ msgstr ""
+
+#~ msgid "Cancel"
+#~ msgstr "Cancelar"
+
+#~ msgid "Create or edit"
+#~ msgstr ""
+
+#~ msgid "Get Sample"
+#~ msgstr ""
+
+#~ msgid "Create"
+#~ msgstr "Criar"
+
+#~ msgid "Path"
+#~ msgstr "Atualizar"
+
+#~ msgid "Database"
+#~ msgstr ""
+
+#~ msgid "Table"
+#~ msgstr ""
+
+#~ msgid "Delete the selected index(es)?"
+#~ msgstr "Formato do arquivo selecionado para indexação"
+
+#~ msgid "No"
+#~ msgstr ""
+
+#~ msgid "Yes"
+#~ msgstr ""
+
+#~ msgid "No data available"
+#~ msgstr ""
+
+#~ msgid "Showing _START_ to _END_ of _TOTAL_ entries"
+#~ msgstr ""
+
+#~ msgid "Showing 0 to 0 of 0 entries"
+#~ msgstr ""
+
+#~ msgid "(filtered from _MAX_ total entries)"
+#~ msgstr ""
+
+#~ msgid "No matching records"
+#~ msgstr ""
+
+#~ msgid "First"
+#~ msgstr ""
+
+#~ msgid "Last"
+#~ msgstr ""
+
+#~ msgid "Next"
+#~ msgstr "Próximo"
+
+#~ msgid "Previous"
+#~ msgstr "Anterior"
+

+ 109 - 0
desktop/libs/notebook/src/notebook/locale/zh_CN/LC_MESSAGES/django.po

@@ -0,0 +1,109 @@
+# Chinese (China) translations for Hue.
+# Copyright (C) 2012 Cloudera
+# This file is distributed under the same license as the Hue project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version:  项目版本\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2015-09-11 11:43-0400\n"
+"PO-Revision-Date: 2012-07-30 18:50-0700\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: zh_CN <LL@li.org>\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+
+#~ msgid "Solr Indexes"
+#~ msgstr "删除索引"
+
+#~ msgid "Search for name, description, etc..."
+#~ msgstr ""
+
+#~ msgid "Delete"
+#~ msgstr "删除"
+
+#~ msgid "Create index"
+#~ msgstr "删除索引 "
+
+#~ msgid "Create index from a file"
+#~ msgstr ""
+
+#~ msgid "Create alias"
+#~ msgstr ""
+
+#~ msgid "Name"
+#~ msgstr "名称"
+
+#~ msgid "Type"
+#~ msgstr "类型"
+
+#~ msgid "Collections"
+#~ msgstr "集合"
+
+#~ msgid "Schema"
+#~ msgstr ""
+
+#~ msgid "Edit"
+#~ msgstr ""
+
+#~ msgid "Cancel"
+#~ msgstr "取消"
+
+#~ msgid "Create or edit"
+#~ msgstr ""
+
+#~ msgid "Get Sample"
+#~ msgstr ""
+
+#~ msgid "Create"
+#~ msgstr "创建"
+
+#~ msgid "Path"
+#~ msgstr "更新"
+
+#~ msgid "Database"
+#~ msgstr ""
+
+#~ msgid "Table"
+#~ msgstr ""
+
+#~ msgid "Delete the selected index(es)?"
+#~ msgstr "要索引的选定文件的格式"
+
+#~ msgid "No"
+#~ msgstr ""
+
+#~ msgid "Yes"
+#~ msgstr ""
+
+#~ msgid "No data available"
+#~ msgstr ""
+
+#~ msgid "Showing _START_ to _END_ of _TOTAL_ entries"
+#~ msgstr ""
+
+#~ msgid "Showing 0 to 0 of 0 entries"
+#~ msgstr ""
+
+#~ msgid "(filtered from _MAX_ total entries)"
+#~ msgstr ""
+
+#~ msgid "No matching records"
+#~ msgstr ""
+
+#~ msgid "First"
+#~ msgstr ""
+
+#~ msgid "Last"
+#~ msgstr ""
+
+#~ msgid "Next"
+#~ msgstr "下一页"
+
+#~ msgid "Previous"
+#~ msgstr "上一页"
+

+ 0 - 0
desktop/libs/notebook/src/notebook/management/__init__.py


+ 0 - 0
desktop/libs/notebook/src/notebook/management/commands/__init__.py


+ 16 - 0
desktop/libs/notebook/src/notebook/models.py

@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. 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.

+ 24 - 0
desktop/libs/notebook/src/notebook/settings.py

@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. 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.
+
+DJANGO_APPS = [ "notebook" ]
+NICE_NAME = "Notebook"
+REQUIRES_HADOOP = False
+MENU_INDEX = 43
+ICON = "search/art/icon_notebook_48.png"
+
+IS_URL_NAMESPACED = True

二進制
desktop/libs/notebook/src/notebook/static/notebook/art/icon_notebook_24.png


+ 167 - 0
desktop/libs/notebook/src/notebook/static/notebook/css/admin.css

@@ -0,0 +1,167 @@
+/*
+ Licensed to Cloudera, Inc. under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  Cloudera, Inc. 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.
+*/
+
+h3 {
+  line-height: 24px;
+}
+
+.sidebar-nav {
+  padding: 9px 0;
+}
+
+#content-editor {
+  border: 1px dotted #DDD;
+}
+
+.available-fields {
+  padding: 0;
+  padding-left:10px;
+}
+
+.available-fields ul {
+  list-style: none outside none;
+  padding: 0;
+  margin: 0;
+  cursor: pointer;
+}
+
+.available-fields ul li {
+  cursor: pointer;
+  color: #666;
+}
+
+.form-actions {
+  padding-left: 0!important;
+}
+
+.bubble {
+  float: left;
+  background-color: #EEEEEE;
+  border: 1px solid #E0E0E0;
+  padding: 8px;
+  margin: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+
+.section {
+  background-color: #FAFAFA;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+
+.miniform {
+  margin-top: 20px;
+  background-color: #F3F3F3;
+  padding: 10px;
+  border-top: 1px solid #DDD;
+}
+
+.select-mini {
+  width: 100%;
+}
+
+.search-bar {
+  background-color: #fafafa;
+  border-bottom: 1px solid #e3e3e3;
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  margin: 0;
+  margin-bottom: 20px;
+  padding: 10px;
+  padding-left: 20px;
+  padding-right: 20px;
+  text-align: left;
+}
+
+.search-bar h4 {
+  font-size: 20px !important;
+  color: #338BB8 !important;
+  padding: 0 !important;
+  margin-top: 4px !important;
+  margin-left: 20px;
+  border: none !important;
+  max-width: none!important;
+}
+
+.waiting {
+  font-size: 196px;
+  color: #DDD;
+}
+
+h1.emptyMessage {
+  margin-top: 50px;
+  color: #BBB;
+  line-height: 60px;
+}
+
+.stepDetails {
+  padding: 5px;
+}
+
+.editable {
+  cursor: pointer;
+}
+
+.collectionRow {
+  cursor: pointer;
+  margin-bottom: 10px;
+  padding: 10px;
+  height: 40px;
+}
+
+.collectionRow:hover {
+  background-color: #EFEFEF;
+}
+
+.hue-colorchart {
+  width: 100%;
+}
+
+.hue-colorchart td {
+  padding: 4px;
+  cursor: pointer;
+}
+
+.cloud-tmpl {
+  border: 1px dashed #FFFFFF;
+  padding: 10px;
+  margin-bottom: 10px;
+  color: #666;
+  cursor: pointer;
+}
+
+.cloud-tmpl h4 {
+  margin-top: 0;
+}
+
+.cloud-tmpl.selected {
+  border: 1px dashed #338BB8;
+}
+
+.cloud-tmpl:hover, .cloud-tmpl.selected:hover  {
+  color: #000;
+  border: 1px dashed #CCCCCC;
+}
+
+.actionbar-actions {
+  min-height: 20px;
+}

+ 183 - 0
desktop/libs/notebook/src/notebook/static/notebook/help/index.html

@@ -0,0 +1,183 @@
+<html>
+
+<h1>Solr Search</h1>
+<p>The Solr Search application, which is based on  <a href="http://lucene.apache.org/solr/">Apache Solr</a>, allows you to perform keyword searches across Hadoop data. A wizard lets you style the result snippets, specify facets to group the results, sort the results, and highlight result fields.</p>
+
+                <h2 class="subhead"><a href="http://gethue.tumblr.com/post/66351828212/new-search-feature-graphical-facets">New Search feature: Graphical facets</a></h2>
+
+
+                <p>
+                    <p>This new feature completed in <a href="http://gethue.tumblr.com/post/66661140648/hue-team-retreat-thailand">Thailand</a> lets you search interactively:</p>
+<p><iframe frameborder="0" height="495" src="http://player.vimeo.com/video/78887745" width="900"></iframe></p>
+<p>As usual feel free to comment on the <a href="https://groups.google.com/a/cloudera.org/group/hue-user/">hue-user</a> list or <a href="https://twitter.com/gethue">@gethue</a>!</p>
+                </p>
+
+
+<h2>Solr Search Installation and Configuration</h2>
+
+<p>Solr Search is one of the applications installed as part of Hue. For information about installing and configuring Hue, see the Hue Installation
+manual.</p>
+<h2>Starting  Solr Search</h2>
+<p>Click the <strong> Solr Search</strong> icon
+(<img alt="image" src="/static/search/art/icon_search_24.png" />) in the navigation bar at the top of
+the Hue browser page. <strong>Solr Search</strong> opens to the  <a href="#collectionManager">Collection Manager</a>. If there are no collections, the <a href="#importCollection">Import Collections and Cores</a> dialog displays.</p>
+<p><a id="collectionManager"></a></p>
+<h2>Collection Manager</h2>
+<p>In Collection Manager you import, copy, and delete <a href="http://wiki.apache.org/solr/SolrCloud#A_little_about_SolrCores_and_Collections">collections</a>.</p>
+<h3>Displaying the Collection Manager</h3>
+<p>When you start Solr Search, the Collection Manager displays. You navigate to the Collection Manager by clicking <strong>Collection manager</strong> in the Search page or the Template Editor.</p>
+<h3>Filtering Collections</h3>
+<p>When you type in the Filter field, the list of collections is dynamically filtered to display only those rows
+containing text that matches the specified substring.</p>
+<p><a id="importCollection"></a></p>
+<h3>Importing Collections</h3>
+<ol>
+<li>If there are existing collections, click the <i class="fa fa-plus-sign"></i> <strong>Import</strong> button at the top right. The Import Collections and Cores dialog displays.</li>
+<li>Check the checkboxes next to the collections to import.</li>
+<li>Click <strong>Import Selected</strong>. The collection is added to the Collection Manager.</li>
+</ol>
+<h3>Editing Collection Properties</h3>
+<ol>
+<li>In the Collection Manager, click a collection.</li>
+<li>In the <strong>COLLECTION</strong> area on the left, click <strong>Properties</strong>.</li>
+<li>Edit a property and click <strong>Save</strong>.</li>
+</ol>
+<h3>Searching a Collection</h3>
+<ol>
+<li>In the Collection Manager, click <strong>Search page</strong> or click <strong>Search it</strong> in the Collection area on the left. The Search page displays.</li>
+<li>Select a collection from the <strong>Search in</strong> drop-down list.</li>
+<li>Type a search string in the <strong>Search...</strong> text box.</li>
+<li>
+<p>Press <strong>Enter</strong> or click the <i class="fa fa-search"></i>  icon.</p>
+</li>
+<li>
+<p>If you have defined <a href="#facets">facets</a>, click a facet to display only those results in the group defined by the facet.</p>
+</li>
+<li>If you have defined <a href="#sorting">sorting fields</a>, select from the <strong>Sort by</strong> drop-down list to sort the results.</li>
+<li>Click 'X' to clear the search string.</li>
+</ol>
+<h2>Styling Search Results</h2>
+<p>Do one of the following:</p>
+<ul>
+<li>In the Collection Manager, click a collection.</li>
+<li>In the Search page, select a collection from the <strong>Search in</strong> drop-down list and click <strong> Customize this collection</strong>.  The Template Editor displays.</li>
+</ul>
+<h3>Template Editor</h3>
+<p>The Template Editor provides four features:</p>
+<ul>
+<li><a href="#snippetEditor">Snippet editor</a> - Specify the layout of the search result snippet, which fields appear in the snippet, and style the results.</li>
+<li><a href="#facetEditor">Facet editor</a> - Define buckets in which to group results.</li>
+<li><a href="#sortEditor">Sort editor</a> - Specify on which fields and order the results are sorted. </li>
+<li><a href="#highlightingEditor">Highlighting editor</a> - Enable highlighting of search fields. </li>
+</ul>
+<p><a id="snippetEditor"></a></p>
+<h4>Snippet Editor</h4>
+<ol>
+<li>In the Snippet Editor, click a tab to choose the method for editing the search snippet fields and styling:</li>
+<li>
+<ul>
+<li><strong>Visual editor</strong> - Click <img alt="image" src="images/layoutChooser.png" /> to choose an overall layout for the snippet.</li>
+</ul>
+</li>
+<li>
+<ul>
+<li>
+<ul>
+<li>Select the fields and functions from the drop-down lists on the right and click <img alt="image" src="images/add.png" />. </li>
+</ul>
+</li>
+</ul>
+</li>
+<li>
+<ul>
+<li>
+<ul>
+<li>Select fields, right-click, and select <strong>Cut</strong> and <strong>Paste</strong> to place the fields on the canvas. </li>
+</ul>
+</li>
+</ul>
+</li>
+<li>
+<ul>
+<li>
+<ul>
+<li>Select fields and apply styling using the buttons on top.</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>
+<ul>
+<li><strong>Source</strong> - </li>
+</ul>
+</li>
+<li>
+<ul>
+<li>
+<ul>
+<li>Select the data fields and functions from the drop-down lists on the right.</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>
+<ul>
+<li>
+<ul>
+<li>Specify layout and styling using HTML tags.</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>
+<ul>
+<li><strong>Preview</strong> - Preview the snippet.</li>
+</ul>
+</li>
+<li>
+<ul>
+<li><strong>Advanced</strong> - Specify styles for CSS classes specified in the Source tab.</li>
+</ul>
+</li>
+<li>Click <strong>Save</strong>.</li>
+</ol>
+<p><a id="facetEditor"></a></p>
+<h4>Facet Editor</h4>
+<p>By default, faceting  search result fields is disabled. Click <strong>Enabled</strong> to enable faceting.</p>
+<ol>
+<li>In the Template Editor, click <strong>2. Facets</strong>. You can move between the facet tabs by clicking each <strong>Step</strong> tab, or by clicking <strong>Back</strong> and <strong>Next</strong>.</li>
+<li>In the General tab, specify </li>
+<li>
+<ul>
+<li><strong>Limit</strong> - the maximum number of values for each facet.</li>
+</ul>
+</li>
+<li>
+<ul>
+<li><strong>Mincount</strong> - the minimum number of search results that fall into a group for the facet to display on the Search page.</li>
+</ul>
+</li>
+<li>In the Field, Range, and Date Facet tabs,  specify the facet properties and click <img alt="image" src="images/add.png" /> <strong>Add</strong>.</li>
+<li>In the Facets Order tab, drag and drop the facet to specify the order in they appear in the Search page.</li>
+<li>Click <strong>Save</strong>. When you display the Search page, the facets display on the left.</li>
+</ol>
+<p><a id="sortEditor"></a></p>
+<h4>Sorting Editor</h4>
+<p>By default, sorting on search result fields is disabled. Click <strong>Enabled</strong> to enable sorting.</p>
+<ol>
+<li>In the Template Editor, click <strong>3. Sorting</strong>. </li>
+<li>In the Field drop-down, select a field. Optionally specify a label for the field. </li>
+<li>The default order is ascending. Click the arrows to change the order.</li>
+<li>Click  <img alt="image" src="images/add.png" /> <strong>Add</strong>.</li>
+<li>Click <strong>Save</strong>. When you display search results, the results are sorted by the fields in the order that  they appear left to right. </li>
+</ol>
+<p><a id="highlightingEditor"></a></p>
+<h4>Highlighting Editor</h4>
+<p>By default,highlighting search result fields is disabled. Click <strong>Enabled</strong> to enable highlighting.</p>
+<ol>
+<li>In the Template Editor, click <strong>3. Highlighting</strong>. </li>
+<li>Select the fields to be highlighted.</li>
+<li>Click <strong>Save</strong>. When you display search results, the selected fields are displayed with the style of the <strong>em</strong> class defined in the Advanced tab of the <a href="#snippetEditor">Snippet editor</a>. </li>
+</ol>
+
+</html>

二進制
desktop/libs/notebook/src/notebook/static/notebook/img/clear.png


二進制
desktop/libs/notebook/src/notebook/static/notebook/img/loading.gif


+ 16 - 0
desktop/libs/notebook/src/notebook/tests.py

@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. 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.

+ 18 - 0
desktop/libs/notebook/src/notebook/urls.py

@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. 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.
+
+from django.conf.urls import patterns, url

+ 16 - 0
desktop/libs/notebook/src/notebook/views.py

@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. 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.