pax_global_header 0000666 0000000 0000000 00000000064 12232201773 0014511 g ustar 00root root 0000000 0000000 52 comment=236886462f908ecf62c682ccbdfc30513b50b718 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/ 0000775 0000000 0000000 00000000000 12232201773 0024773 5 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/.gitignore 0000664 0000000 0000000 00000000257 12232201773 0026767 0 ustar 00root root 0000000 0000000 # Python bytecode: *.py[co] # Packaging files: *.egg* # Editor temp files: *.swp *~ # Sphinx docs: build _build # SQLite3 database files: *.db # Logs: *.log .ropeproject CONTRIBUTORS.txt 0000664 0000000 0000000 00000000141 12232201773 0027406 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718 Adam Dudas Bence Danyi Daniel Bach Gergo Nagy Imre Szeberenyi Mate Ory Sandor Guba Viktor Kalman cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/LICENSE.txt 0000664 0000000 0000000 00000000206 12232201773 0026614 0 ustar 00root root 0000000 0000000 Copyright (c) 2012--2013 Budapest University of Technology and Economics (BME-IK), and contributors. [SOME OPEN SOURCE LICENSE HERE] cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/README.rst 0000664 0000000 0000000 00000000163 12232201773 0026462 0 ustar 00root root 0000000 0000000 ============= cirecle-cloud ============= This is the Django based controller and web portal of the CIRCLE Cloud. cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/ 0000775 0000000 0000000 00000000000 12232201773 0026234 5 ustar 00root root 0000000 0000000 __init__.py 0000664 0000000 0000000 00000000000 12232201773 0030254 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle circle/ 0000775 0000000 0000000 00000000000 12232201773 0027416 5 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle __init__.py 0000664 0000000 0000000 00000000000 12232201773 0031515 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/circle settings/ 0000775 0000000 0000000 00000000000 12232201773 0031256 5 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/circle __init__.py 0000664 0000000 0000000 00000000001 12232201773 0033356 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/circle/settings base.py 0000664 0000000 0000000 00000022656 12232201773 0032555 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/circle/settings """Common settings and globals.""" from os import environ from os.path import abspath, basename, dirname, join, normpath from json import loads # from socket import SOCK_STREAM from sys import path # Normally you should not import ANYTHING from Django directly # into your settings, but ImproperlyConfigured is an exception. from django.core.exceptions import ImproperlyConfigured def get_env_variable(var_name, default=None): """ Get the environment variable or return exception/default """ try: return environ[var_name] except KeyError: if default is None: error_msg = "Set the %s environment variable" % var_name raise ImproperlyConfigured(error_msg) else: return default ########## PATH CONFIGURATION # Absolute filesystem path to the Django project directory: DJANGO_ROOT = dirname(dirname(abspath(__file__))) # Absolute filesystem path to the top-level project folder: SITE_ROOT = dirname(DJANGO_ROOT) # Site name: SITE_NAME = basename(DJANGO_ROOT) # Add our project to our pythonpath, this way we don't need to type our project # name in our dotted import paths: path.append(DJANGO_ROOT) ########## END PATH CONFIGURATION ########## DEBUG CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = False # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug TEMPLATE_DEBUG = DEBUG ########## END DEBUG CONFIGURATION ########## MANAGER CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#admins ADMINS = ( ('Root', 'root@localhost'), ) # See: https://docs.djangoproject.com/en/dev/ref/settings/#managers MANAGERS = ADMINS ########## END MANAGER CONFIGURATION ########## DATABASE CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.' + get_env_variable('DJANG_DB_TYPE', 'postgresql_psycopg2'), 'NAME': get_env_variable('DJANGO_DB_NAME', 'circle'), 'USER': get_env_variable('DJANGO_DB_USER', 'circle'), 'PASSWORD': get_env_variable('DJANGO_DB_PASSWORD'), 'HOST': get_env_variable('DJANGO_DB_HOST', ''), 'PORT': get_env_variable('DJANGO_DB_PORT', ''), } } ########## END DATABASE CONFIGURATION ########## GENERAL CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#time-zone try: with open("/etc/timezone", "r") as f: systz = f.readline().rstrip() except: systz = None TIME_ZONE = get_env_variable('DJANGO_TIME_ZONE', default=systz) # See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code LANGUAGE_CODE = 'en-us' # See: https://docs.djangoproject.com/en/dev/ref/settings/#site-id SITE_ID = 1 # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n USE_I18N = True # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n USE_L10N = True # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-tz USE_TZ = True ########## END GENERAL CONFIGURATION ########## MEDIA CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root MEDIA_ROOT = normpath(join(SITE_ROOT, 'media')) # See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url MEDIA_URL = get_env_variable('DJANGO_MEDIA_URL', default='/media/') ########## END MEDIA CONFIGURATION ########## STATIC FILE CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root STATIC_ROOT = normpath(join(SITE_ROOT, 'static_collected')) # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url STATIC_URL = get_env_variable('DJANGO_STATIC_URL', default='/static/') # See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS STATICFILES_DIRS = ( normpath(join(SITE_ROOT, 'static')), ) # See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', ) ########## END STATIC FILE CONFIGURATION ########## SECRET CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key # Note: This key should only be used for development and testing. SECRET_KEY = r"a5w*b0wajigd^kd7b=@w=5=+l_0c62@vljnhzqu3dfc@vx2jw-" ########## END SECRET CONFIGURATION ########## SITE CONFIGURATION # Hosts/domain names that are valid for this site # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts ALLOWED_HOSTS = [] ########## END SITE CONFIGURATION ########## FIXTURE CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS FIXTURE_DIRS = ( normpath(join(SITE_ROOT, 'fixtures')), ) ########## END FIXTURE CONFIGURATION ########## TEMPLATE CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages', 'django.core.context_processors.request', ) # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', ) # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs TEMPLATE_DIRS = ( normpath(join(SITE_ROOT, 'templates')), ) ########## END TEMPLATE CONFIGURATION ########## MIDDLEWARE CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#middleware-classes MIDDLEWARE_CLASSES = ( # Default Django middleware. 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) ########## END MIDDLEWARE CONFIGURATION ########## URL CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#root-urlconf ROOT_URLCONF = '%s.urls' % SITE_NAME ########## END URL CONFIGURATION ########## APP CONFIGURATION DJANGO_APPS = ( # Default Django apps: 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', # Useful template tags: # 'django.contrib.humanize', # Admin panel and documentation: 'django.contrib.admin', # 'django.contrib.admindocs', ) THIRD_PARTY_APPS = ( 'south', 'django_tables2', 'crispy_forms', 'djcelery', 'sizefield', ) # Apps specific for this project go here. LOCAL_APPS = ( 'vm', 'storage', 'firewall', 'network', 'dashboard', 'manager', ) # See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS ########## END APP CONFIGURATION ########## LOGGING CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#logging # A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error when DEBUG=False. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'simple': { 'format': '%(asctime)s [%(levelname)s]: %(name)s %(message)s', 'datefmt': '%Y-%m-%d %H:%M:%S', }, }, 'filters': { 'require_debug_false': { '()': 'django.utils.log.RequireDebugFalse' } }, 'handlers': { 'mail_admins': { 'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler' }, 'syslog': { 'level': 'INFO', 'class': 'logging.handlers.SysLogHandler', 'formatter': 'simple', 'address': '/dev/log', # 'socktype': SOCK_STREAM, # 'address': ('host', '514'), } }, 'loggers': { 'django.request': { 'handlers': ['mail_admins', 'syslog'], 'level': 'INFO', 'propagate': True, }, } } ########## END LOGGING CONFIGURATION ########## WSGI CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application WSGI_APPLICATION = '%s.wsgi.application' % SITE_NAME ########## END WSGI CONFIGURATION FIREWALL_SETTINGS = loads(get_env_variable('DJANGO_FIREWALL_SETTINGS')) CRISPY_TEMPLATE_PACK = 'bootstrap3' # format: id: (name, port, protocol) VM_ACCESS_PROTOCOLS = loads(get_env_variable('DJANGO_VM_ACCESS_PROTOCOLS', '''{"nx": ["NX", 22, "tcp"], "rdp": ["RDP", 3389, "tcp"], "ssh": ["SSH", 22, "tcp"]}''')) VM_SCHEDULER = 'manager.scheduler' from datetime import timedelta CELERYBEAT_SCHEDULE = { 'blabla': { 'task': 'firewall.tasks.local_tasks.periodic_task', 'schedule': timedelta(seconds=5), }, } local.py 0000664 0000000 0000000 00000003703 12232201773 0032725 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/circle/settings """Development settings and globals.""" # from os.path import join, normpath from base import * ########## DEBUG CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = True # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug TEMPLATE_DEBUG = DEBUG ########## END DEBUG CONFIGURATION ########## EMAIL CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' ########## END EMAIL CONFIGURATION ########## DATABASE CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#databases # DATABASES = { # 'default': { # 'ENGINE': 'django.db.backends.sqlite3', # 'NAME': normpath(join(DJANGO_ROOT, 'default.db')), # 'USER': '', # 'PASSWORD': '', # 'HOST': '', # 'PORT': '', # } # } ########## END DATABASE CONFIGURATION ########## CACHE CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#caches CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', } } ########## END CACHE CONFIGURATION ########## TOOLBAR CONFIGURATION # https://github.com/django-debug-toolbar/django-debug-toolbar#installation if get_env_variable('DJANGO_TOOLBAR', 'FALSE') == 'TRUE': INSTALLED_APPS += ( 'debug_toolbar', ) # https://github.com/django-debug-toolbar/django-debug-toolbar#installation INTERNAL_IPS = ( get_env_variable('SSH_CLIENT', '127.0.0.1').split(' ')[0], ) # https://github.com/django-debug-toolbar/django-debug-toolbar#installation MIDDLEWARE_CLASSES += ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) # https://github.com/django-debug-toolbar/django-debug-toolbar#installation DEBUG_TOOLBAR_CONFIG = { 'INTERCEPT_REDIRECTS': False, 'SHOW_TEMPLATE_CONTEXT': True, } ########## END TOOLBAR CONFIGURATION production.py 0000664 0000000 0000000 00000004533 12232201773 0034023 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/circle/settings """Production settings and globals.""" from os import environ from base import * def get_env_setting(setting): """ Get the environment setting or return exception """ try: return environ[setting] except KeyError: error_msg = "Set the %s env variable" % setting raise ImproperlyConfigured(error_msg) ########## HOST CONFIGURATION # See: https://docs.djangoproject.com/en/1.5/releases/1.5/#allowed-hosts-required-in-production ALLOWED_HOSTS = get_env_setting('DJANGO_ALLOWED_HOSTS').split(',') ########## END HOST CONFIGURATION ########## EMAIL CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' try: # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host EMAIL_HOST = environ.get('EMAIL_HOST') except ImproperlyConfigured: pass else: # https://docs.djangoproject.com/en/dev/ref/settings/#email-host-password EMAIL_HOST_PASSWORD = environ.get('EMAIL_HOST_PASSWORD', '') # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-user EMAIL_HOST_USER = environ.get('EMAIL_HOST_USER', 'your_email@example.com') # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-port EMAIL_PORT = environ.get('EMAIL_PORT', 587) # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-use-tls EMAIL_USE_TLS = True # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix EMAIL_SUBJECT_PREFIX = '[%s] ' % SITE_NAME # See: https://docs.djangoproject.com/en/dev/ref/settings/#server-email SERVER_EMAIL = EMAIL_HOST_USER ########## END EMAIL CONFIGURATION ########## CACHE CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#caches try: CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': get_env_variable('DJANGO_MEMCACHED'), } } except ImproperlyConfigured: CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': SITE_NAME, } } ########## END CACHE CONFIGURATION ########## SECRET CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = get_env_setting('SECRET_KEY') ########## END SECRET CONFIGURATION test.py 0000664 0000000 0000000 00000000656 12232201773 0032616 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/circle/settings from base import * ########## TEST SETTINGS TEST_RUNNER = 'discover_runner.DiscoverRunner' TEST_DISCOVER_TOP_LEVEL = SITE_ROOT TEST_DISCOVER_ROOT = SITE_ROOT TEST_DISCOVER_PATTERN = "test_*.py" ########## IN-MEMORY TEST DATABASE DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", "USER": "", "PASSWORD": "", "HOST": "", "PORT": "", }, } urls.py 0000664 0000000 0000000 00000001123 12232201773 0030752 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/circle from django.conf.urls import patterns, include, url # from django.views.generic import TemplateView from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', #url(r'^$', TemplateView.as_view(template_name='base.html')), # Examples: # url(r'^$', 'circle.views.home', name='home'), # url(r'^circle/', include('circle.foo.urls')), # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^network/', include('network.urls')), url(r'^dashboard/', include('dashboard.urls')), ) wsgi.py 0000664 0000000 0000000 00000003421 12232201773 0030741 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/circle """ WSGI config for circle project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setting. Usually you will have the standard Django WSGI application here, but it also might make sense to replace the whole Django WSGI application with a custom one that later delegates to the Django one. For example, you could introduce WSGI middleware here, or combine a Django application with an application of another framework. """ import os from os.path import abspath, dirname from sys import path SITE_ROOT = dirname(dirname(abspath(__file__))) path.append(SITE_ROOT) # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks # if running multiple sites in the same mod_wsgi process. To fix this, use # mod_wsgi daemon mode with each site in its own daemon process, or use # os.environ["DJANGO_SETTINGS_MODULE"] = "jajaja.settings" os.environ.setdefault("DJANGO_SETTINGS_MODULE", "circle.settings.production") # This application object is used by any WSGI server configured to use this # file. This includes Django's development server, if the WSGI_APPLICATION # setting points here. from django.core.wsgi import get_wsgi_application _application = get_wsgi_application() def application(environ, start_response): # copy DJANGO_* wsgi-env vars to process-env for i in environ.keys(): if i.startswith('DJANGO_'): os.environ[i] = environ[i] return _application(environ, start_response) # Apply WSGI middleware here. # from helloworld.wsgi import HelloWorldApplication # application = HelloWorldApplication(application) common/ 0000775 0000000 0000000 00000000000 12232201773 0027445 5 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle __init__.py 0000664 0000000 0000000 00000000000 12232201773 0031544 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/common models.py 0000664 0000000 0000000 00000003213 12232201773 0031301 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/common from django.contrib.auth.models import User from django.db.models import (CharField, DateTimeField, ForeignKey, TextField) from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from model_utils.models import TimeStampedModel def activitycontextimpl(act): try: yield act except Exception as e: act.finish(str(e)) raise e else: act.finish() class ActivityModel(TimeStampedModel): activity_code = CharField(max_length=100, verbose_name=_('activity code')) parent = ForeignKey('self', blank=True, null=True) task_uuid = CharField(blank=True, max_length=50, null=True, unique=True, help_text=_('Celery task unique identifier.'), verbose_name=_('task_uuid')) user = ForeignKey(User, blank=True, null=True, verbose_name=_('user'), help_text=_('The person who started this activity.')) started = DateTimeField(verbose_name=_('started at'), blank=True, null=True, help_text=_('Time of activity initiation.')) finished = DateTimeField(verbose_name=_('finished at'), blank=True, null=True, help_text=_('Time of activity finalization.')) result = TextField(verbose_name=_('result'), blank=True, null=True, help_text=_('Human readable result of activity.')) class Meta: abstract = True def finish(self, result=None): if not self.finished: self.finished = timezone.now() self.result = result self.save() dashboard/ 0000775 0000000 0000000 00000000000 12232201773 0030104 5 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle __init__.py 0000664 0000000 0000000 00000000000 12232201773 0032203 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/dashboard models.py 0000664 0000000 0000000 00000000071 12232201773 0031737 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/dashboard from django.db import models # Create your models here. static/ 0000775 0000000 0000000 00000000000 12232201773 0031373 5 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/dashboard dashboard/ 0000775 0000000 0000000 00000000000 12232201773 0033322 5 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/dashboard/static dashboard.css 0000664 0000000 0000000 00000005671 12232201773 0035774 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/dashboard/static/dashboard /* Move down content because we have a fixed navbar that is 50px tall */ body { padding-top: 50px; padding-bottom: 20px; } /* Set widths on the navbar form inputs since otherwise they're 100% wide */ .navbar-form input[type="text"], .navbar-form input[type="password"] { width: 180px; } /* Wrapping element */ /* Set some basic padding to keep content from hitting the edges */ .body-content { padding-left: 15px; padding-right: 15px; } /* Responsive: Portrait tablets and up */ @media screen and (min-width: 768px) { /* Let the jumbotron breathe */ .container > :first-child { margin-top: 20px; } /* Remove padding from wrapping element since we kick in the grid classes here */ .body-content { padding: 0; } } .no-margin { margin: 0!important; } .list-group .list-group-footer { padding-top: 5px; padding-bottom: 5px; } .big { font-size: 2em; } .bigbig { font-size: 3em; } .timeline { border-left: 4px #428bca solid; margin-left: 20px; padding-left: 20px; } .timeline > div { margin: 0; padding: 0; margin-left: -34px; margin-bottom: .5em; line-height: 24px; } .timeline > div:last-child { margin-bottom: 0; } .timeline .timeline-icon { margin: 0; padding: 0; width: 24px; height: 24px; text-align: center; display: inline-block; border-radius: 50%; background-color: #428bca; color: #fff; } .timeline-icon.timeline-warning { border-color: #c09853; border-style: solid; border-width: 2px; background-color: white; color: #c09853; line-height: 20px; } .timeline .timeline-icon.timeline-nobg { background-color: transparent; } .table-with-form-fields tbody tr td { line-height: 34px; } #vm-detail-panel .panel-body { min-height: 20em; } :link i:before:hover { text-decoration: none !important; } .slider { display: inline-block; } .slider .track { height: 20px; top: 50%; } .slider > .dragger, .slider > .dragger:hover { border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; width: 8px; height: 24px; margin-top: -12px!important; text-shadow: 0 1px 0 #fff; background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3071a9)); background-image: -webkit-linear-gradient(top, #428bca, 0%, #3071a9, 100%); background-image: -moz-linear-gradient(top, #428bca 0%, #3071a9 100%); background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%); background-repeat: repeat-x; border-color: #2d6ca2; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0); } .slider > .dragger:hover { background-color: #3071a9; background-image: none; border-color: #2d6ca2; } .slider > .highlight-track { height: 20px; top: 50%; } .slider + .output { } .rule-table tr >:nth-child(1) { text-align: right; } .rule-table tr >:nth-child(2) { text-align: center; } .dashboard-index .panel { height: 300px; } dashboard.js 0000664 0000000 0000000 00000014771 12232201773 0035621 0 ustar 00root root 0000000 0000000 cloud-236886462f908ecf62c682ccbdfc30513b50b718-236886462f908ecf62c682ccbdfc30513b50b718/circle/dashboard/static/dashboard $(function () { $('.vm-create').click(function(e) { $.ajax({ type: 'GET', url: '/dashboard/vm/create/', success: function(data) { // TODO this is still ugly var html = '