Pārlūkot izejas kodu

removed hello world app

Ben Bishop 13 gadi atpakaļ
vecāks
revīzija
4dbf73b230

+ 0 - 4
apps/Makefile

@@ -40,10 +40,6 @@ APPS := about \
         shell \
 	useradmin
 
-# <<<< DEV ONLY
-APPS += hello
-# END DEV ONLY >>>>
-
 ################################################
 # Install all applications into the Desktop environment
 ################################################

+ 0 - 24
apps/hello/Makefile

@@ -1,24 +0,0 @@
-#
-# 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
-
-APP_NAME = hue-hello
-include $(ROOT)/Makefile.sdk

+ 0 - 1
apps/hello/README

@@ -1 +0,0 @@
-This "hello world" application is an example of a Hue application.

+ 0 - 1
apps/hello/hueversion.py

@@ -1 +0,0 @@
-../../VERSION

+ 0 - 29
apps/hello/setup.py

@@ -1,29 +0,0 @@
-# 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 = "hello",
-      version = VERSION,
-      author = "Hue",
-      url = 'http://github.com/cloudera/hue',
-      description = "Hue Hello Example",
-      packages = find_packages('src'),
-      package_dir = {'': 'src'},
-      install_requires = ['setuptools', 'desktop'],
-      entry_points = { 'desktop.sdk.application': 'hello=hello' },
-)

+ 0 - 19
apps/hello/src/hello/__init__.py

@@ -1,19 +0,0 @@
-# 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.
-import sys
-import os
-
-sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'gen-py'))

+ 0 - 25
apps/hello/src/hello/conf.py

@@ -1,25 +0,0 @@
-#!/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.
-"""
-Configuration options for the template Hello application.
-"""
-from desktop.lib.conf import Config
-
-GREETING = Config(
-  key="greeting",
-  default="Bonjour",
-  help="The text to display to greet someone")

+ 0 - 50
apps/hello/src/hello/hello_test.py

@@ -1,50 +0,0 @@
-#!/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.
-#
-# Functional test for hello app.
-#
-# This test uses "nose"-style testing (no need for a TestCase),
-# and nose-style assertions.  It uses the Django client to
-# go through most of the stack.
-#
-# You can use nose.tools.set_trace() to set a breakpoint while
-# developing the test.
-
-import simplejson
-from nose.tools import *
-
-from desktop.lib.django_test_util import make_logged_in_client
-
-def test_require_login():
-  c = make_logged_in_client()
-  # All apps require login.
-  c.login(username="test", password="test")
-
-  # Test basic output.
-  response = c.get('/hello/')
-  assert_true("Bonjour" in response.content)
-
-  # Or like so.
-  assert_equal("Bonjour", c.get('/hello/').context["greeting"])
-
-  # Test JSON too
-  response = c.get('/hello/', dict(format="json"))
-  assert_equal(dict(greeting="Bonjour"), simplejson.JSONDecoder().decode(response.content))
-
-  # Can also do this:
-  assert_equal(dict(greeting="Bonjour"), c.get_json('/hello/', dict(format="json")))
-

+ 0 - 0
apps/hello/src/hello/management/__init__.py


+ 0 - 0
apps/hello/src/hello/management/commands/__init__.py


+ 0 - 26
apps/hello/src/hello/management/commands/hello_world.py

@@ -1,26 +0,0 @@
-#!/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.
-#
-# Template manage.py plugin.  If you don't need one of these,
-# then don't bother with it.
-
-from django.core.management.base import NoArgsCommand
-
-class Command(NoArgsCommand):
-  """Prints a friendly greeting."""
-  def handle_noargs(self, **options):
-    print "Hello there!"

+ 0 - 17
apps/hello/src/hello/models.py

@@ -1,17 +0,0 @@
-#!/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.
-

+ 0 - 18
apps/hello/src/hello/settings.py

@@ -1,18 +0,0 @@
-# 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 = [ "hello" ]
-NICE_NAME = "Hello (SDK)"
-REQUIRES_HADOOP = False

+ 0 - 25
apps/hello/src/hello/templates/hello.mako

@@ -1,25 +0,0 @@
-## 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 desktop.views import commonheader, commonfooter
-%>
-${commonheader("Hi there!", "hello")}
-
-	<div class="container-fluid">
-		<h1>${greeting}</h1>
-	</div>
-
-${commonfooter()}

+ 0 - 26
apps/hello/src/hello/urls.py

@@ -1,26 +0,0 @@
-#!/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.defaults import patterns, url
-
-urlpatterns = patterns('hello',
-  # Make your app do something when /app/ is requested.
-  url(r'^$', 'views.hello'),
-
-  # Prefix the names of your views with the app name.
-  url(r'^goodbye$', 'views.goodbye', name="hello.goodbye"),
-)

+ 0 - 28
apps/hello/src/hello/views.py

@@ -1,28 +0,0 @@
-#!/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.
-#
-# Sample "hello world" view.
-
-from desktop.lib.django_util import render
-from hello import conf
-
-def hello(request):
-  # Use render from django_util so that ?format=json works.
-  return render("hello.mako", request, {"greeting": conf.GREETING.get()})
-
-def goodbye(request):
-  return render("hello.mako", request, {"greeting": "goodbye"})

+ 0 - 18
apps/hello/static/bootstrap.js

@@ -1,18 +0,0 @@
-// 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.
-// Applications may register themselves with the desktop environment
-// by encluding some javascript here.
-hello = 1;

+ 0 - 1
apps/hello/static/help/index.md

@@ -1 +0,0 @@
-This is a sample application.