Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No resource shown in My resource list after uploading widgets and mashup #377

Open
kushagrasrivastva-NEC opened this issue Feb 11, 2019 · 0 comments

Comments

@kushagrasrivastva-NEC
Copy link

image

image

There are no widgets and mashups shown in my resource list. Even after uploading it manually the widget gets uploaded but its not visible on My Resource list. After uploading it again it shows error as "widget already exist". I have deployed wirecloud from docker and integrated postgres database. Do I have to enable any settings in wirecloud so that widgets and mashup can be displayed. Also, it shows me the message on My Resource list and Widget as shown in screenshot.

Please find the wirecloud and postgres section which I am using in docker-compose.yml file

postgres:
        container_name: postgres
        hostname: postgres
        restart: always
        image: postgres:latest
        ports:
            - 127.0.0.1:5432:5432
        volumes:
            - ./postgres-data:/var/lib/postgresql/data
        networks:
            - db
        logging:
            options:
                max-size: "100m"
                max-file: "5"


     wirecloud:
            container_name: wirecloud
            hostname: wirecloud
            restart: always
            image: fiware/wirecloud
            ports:
                - 127.0.0.1:8000:8000
            volumes:
                - ./wirecloud_instance:/opt/wirecloud_instance
                - ./static:/var/www/static
                - ./config-idm.sh:/opt/wirecloud_instance/config-idm.sh
                - ./config-django-admin.py:/opt/wirecloud_instance/config-django-admin.py
                - ./change-user-permissions.py:/opt/wirecloud_instance/change-user-permissions.py
            depends_on:
                - postgres
                - fiware-idm
            networks:
                - db
                - frontend
            logging:
                options:
                    max-size: "100m"
                    max-file: "5"

Please find the settings.py file. I tried running it with Haystack default search configuration given in "https://wirecloud.readthedocs.io/en/stable/installation_guide/#whoosh-configuration" but still with same error.

# -*- coding: utf-8 -*-
# Django settings for wirecloud_instance project.

from os import path
from wirecloud.commons.utils.conf import load_default_wirecloud_conf
from django.core.urlresolvers import reverse_lazy

DEBUG = True
BASEDIR = path.dirname(path.abspath(__file__))
load_default_wirecloud_conf(locals())

USE_XSENDFILE = False

SESSION_COOKIE_NAME = "wcsessionid"
CSRF_COOKIE_NAME = "wccsrftoken"

ADMINS = (
    # ('Your Name', '[email protected]'),
)

MANAGERS = ADMINS


DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',       # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'postgres',           # Or path to database file if using sqlite3.
        # The following settings are not used with sqlite3:
        'USER': 'postgres',
        'PASSWORD': 'postgres',
        'HOST': 'postgres',                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
        'PORT': '5432',                      # Set to empty string for default.
    }
}




# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'America/Chicago'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True

# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/var/www/example.com/media/"
MEDIA_ROOT = ''

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://example.com/media/", "http://media.example.com/"
MEDIA_URL = ''

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/var/www/example.com/static/"
STATIC_ROOT = '/var/www/static'

# Controls the absolute file path that linked static will be read from and
# compressed static will be written to when using the default COMPRESS_STORAGE.
COMPRESS_ROOT = STATIC_ROOT

# URL prefix for static files.
# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'
# Additional locations of static files
# STATICFILES_DIRS = (
#     # Put strings here, like "/home/html/static" or "C:/www/django/static".
#     # Always use forward slashes, even on Windows.
#     # Don't forget to use absolute paths, not relative paths.
# )

# List of finder classes that know how to find static files in
# various locations.
# STATICFILES_FINDERS += (
#     'django.contrib.staticfiles.finders.FileSystemFinder',
#     'django.contrib.staticfiles.finders.DefaultStorageFinder',
# )

# Make this unique, and don't share it with anybody.
SECRET_KEY = '=8&cve7*neymifn7i1e%3rn94o3xid0ib(h91%c96m9f==wwlm'

ROOT_URLCONF = 'wirecloud_instance.urls'

# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'wirecloud_instance.wsgi.application'

INSTALLED_APPS += (
    # 'django.contrib.sites',
   # 'wirecloud.oauth2provider',
    'social_django',
    'wirecloud.fiware',
)

# Login/logout URLs
LOGIN_URL = reverse_lazy('login')
LOGOUT_URL = reverse_lazy('wirecloud.root')
LOGIN_REDIRECT_URL = reverse_lazy('wirecloud.root')

THEME_ACTIVE = "wirecloud.defaulttheme"
DEFAULT_LANGUAGE = 'browser'

FIWARE_IDM_SERVER = "http://fiwareidm:3000"
SOCIAL_AUTH_FIWARE_KEY = "8d111720-68ae-45bc-b342-xxxxxxxx"
SOCIAL_AUTH_FIWARE_SECRET = "8598084e-9b6a-4816-b8ca-xxxxxxx"
# WGT deployment dirs
CATALOGUE_MEDIA_ROOT = path.join(BASEDIR, 'catalogue_resources')
GADGETS_DEPLOYMENT_DIR = path.join(BASEDIR, 'widget_files')

# Cache settings
CACHES = {
    'default': {
        'BACKEND': 'wirecloud.platform.cache.backends.locmem.LocMemCache',
        'OPTIONS': {
            'MAX_ENTRIES': 3000,
        },
    }
}

# WireCloud autodiscover Wirecloud plugins by default. Uncomment this for settings
# the list of plugins manually.
#
# WIRECLOUD_PLUGINS = (
#     'wirecloud.oauth2provider.plugins.OAuth2ProviderPlugin',
#     'wirecloud.fiware.plugins.FiWarePlugin',
# )

AUTHENTICATION_BACKENDS = (
     'wirecloud.fiware.social_auth_backend.FIWAREOAuth2',
     'django.contrib.auth.backends.ModelBackend',
)


NOT_PROXY_FOR = ['localhost', '127.0.0.1']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant