Ejemplo n.º 1
0
 def get_ajax_endpoints(self, views):
     return (
         {
             'id':
             'FIWARE_RESOURCES_COLLECTION',
             'url':
             build_url_template(
                 'wirecloud.fiware.market_resource_collection',
                 ['market_user', 'market_name'])
         },
         {
             'id':
             'FIWARE_OFFERING_ENTRY',
             'url':
             build_url_template(
                 'wirecloud.fiware.market_offering_entry',
                 ['market_user', 'market_name', 'store', 'offering_id'])
         },
         {
             'id':
             'FIWARE_FULL_SEARCH',
             'url':
             build_url_template(
                 'wirecloud.fiware.market_full_search',
                 ['market_user', 'market_name', 'search_string'])
         },
         {
             'id':
             'FIWARE_STORE_RESOURCES_COLLECTION',
             'url':
             build_url_template(
                 'wirecloud.fiware.store_resource_collection',
                 ['market_user', 'market_name', 'store'])
         },
         {
             'id':
             'FIWARE_STORE_SEARCH',
             'url':
             build_url_template(
                 'wirecloud.fiware.store_search',
                 ['market_user', 'market_name', 'store', 'search_string'])
         },
         {
             'id':
             'FIWARE_STORE_COLLECTION',
             'url':
             build_url_template('wirecloud.fiware.store_collection',
                                ['market_user', 'market_name'])
         },
         {
             'id':
             'FIWARE_STORE_START_PURCHASE',
             'url':
             build_url_template('wirecloud.fiware.store_start_purchase',
                                ['market_user', 'market_name', 'store'])
         },
     )
Ejemplo n.º 2
0
 def get_ajax_endpoints(self, views):
     return (
         {'id': 'FIWARE_RESOURCES_COLLECTION', 'url': build_url_template('wirecloud.fiware.market_resource_collection', ['market_user', 'market_name'])},
         {'id': 'FIWARE_OFFERING_ENTRY', 'url': build_url_template('wirecloud.fiware.market_offering_entry', ['market_user', 'market_name', 'store', 'offering_id'])},
         {'id': 'FIWARE_FULL_SEARCH', 'url': build_url_template('wirecloud.fiware.market_full_search', ['market_user', 'market_name', 'search_string'])},
         {'id': 'FIWARE_STORE_RESOURCES_COLLECTION', 'url': build_url_template('wirecloud.fiware.store_resource_collection', ['market_user', 'market_name', 'store'])},
         {'id': 'FIWARE_STORE_SEARCH', 'url': build_url_template('wirecloud.fiware.store_search', ['market_user', 'market_name', 'store', 'search_string'])},
         {'id': 'FIWARE_STORE_COLLECTION', 'url': build_url_template('wirecloud.fiware.store_collection', ['market_user', 'market_name'])},
         {'id': 'FIWARE_STORE_START_PURCHASE', 'url': build_url_template('wirecloud.fiware.store_start_purchase', ['market_user', 'market_name', 'store'])},
     )
Ejemplo n.º 3
0
    def get_ajax_endpoints(self, view):
        endpoints = (
            {'id': 'LOGOUT_VIEW', 'url': build_url_template('logout')},
            {'id': 'LOCAL_REPOSITORY', 'url': build_url_template('wirecloud.root')},
            {'id': 'LOCAL_RESOURCE_COLLECTION', 'url': build_url_template('wirecloud_showcase.resource_collection')},
            {'id': 'LOCAL_RESOURCE_ENTRY', 'url': build_url_template('wirecloud_showcase.resource_entry', ['vendor', 'name', 'version'])},
            {'id': 'IWIDGET_COLLECTION', 'url': build_url_template('wirecloud.iwidget_collection', ['workspace_id', 'tab_id'])},
            {'id': 'IWIDGET_ENTRY', 'url': build_url_template('wirecloud.iwidget_entry', ['workspace_id', 'tab_id', 'iwidget_id'])},
            {'id': 'IWIDGET_VERSION_ENTRY', 'url': build_url_template('wirecloud.iwidget_version_entry', ['workspace_id', 'tab_id', 'iwidget_id'])},
            {'id': 'PLATFORM_CONTEXT_COLLECTION', 'url': build_url_template('wirecloud.platform_context_collection')},
            {'id': 'PLATFORM_PREFERENCES', 'url': build_url_template('wirecloud.platform_preferences')},
            {'id': 'PROXY', 'url': build_url_template('wirecloud.proxy', ['protocol', 'domain', 'path'])},
            {'id': 'WORKSPACE_PREFERENCES', 'url': build_url_template('wirecloud.workspace_preferences', ['workspace_id'])},
            {'id': 'TAB_COLLECTION', 'url': build_url_template('wirecloud.tab_collection', ['workspace_id'])},
            {'id': 'TAB_ENTRY', 'url': build_url_template('wirecloud.tab_entry', ['workspace_id', 'tab_id'])},
            {'id': 'TAB_PREFERENCES', 'url': build_url_template('wirecloud.tab_preferences', ['workspace_id', 'tab_id'])},
            {'id': 'THEME_ENTRY', 'url': build_url_template('wirecloud.theme_entry', ['name'])},
            {'id': 'MARKET_COLLECTION', 'url': build_url_template('wirecloud.market_collection')},
            {'id': 'GLOBAL_MARKET_ENTRY', 'url': build_url_template('wirecloud.market_entry', ['market'])},
            {'id': 'MARKET_ENTRY', 'url': build_url_template('wirecloud.market_entry', ['user', 'market'])},
            {'id': 'WIRING_ENTRY', 'url': build_url_template('wirecloud.workspace_wiring', ['workspace_id'])},
            {'id': 'OPERATOR_ENTRY', 'url': build_url_template('wirecloud.operator_code_entry', ['vendor', 'name', 'version'])},
            {'id': 'VARIABLE_COLLECTION', 'url': build_url_template('wirecloud.variable_collection', ['workspace_id'])},
            {'id': 'WIDGET_CODE_ENTRY', 'url': build_url_template('wirecloud.widget_code_entry', ['vendor', 'name', 'version'])},
            {'id': 'WORKSPACE_COLLECTION', 'url': build_url_template('wirecloud.workspace_collection')},
            {'id': 'WORKSPACE_ENTRY', 'url': build_url_template('wirecloud.workspace_entry', ['workspace_id'])},
            {'id': 'WORKSPACE_PUBLISH', 'url': build_url_template('wirecloud.workspace_publish', ['workspace_id'])},
            {'id': 'PUBLISH_ON_OTHER_MARKETPLACE', 'url': build_url_template('wirecloud.publish_on_other_marketplace')},
            {'id': 'WORKSPACE_MERGE', 'url': build_url_template('wirecloud.workspace_merge', ['to_ws_id'])},
            {'id': 'WORKSPACE_SHARE', 'url': build_url_template('wirecloud.workspace_share', ['workspace_id', 'share_boolean'])},
        )

        from django.conf import settings
        if 'django.contrib.admin' in settings.INSTALLED_APPS:
            endpoints += ({'id': 'DJANGO_ADMIN', 'url': build_url_template('admin:index')},)

        return endpoints
Ejemplo n.º 4
0
    def get_ajax_endpoints(self, view):
        endpoints = (
            {
                'id':
                'IWIDGET_COLLECTION',
                'url':
                build_url_template('wirecloud.iwidget_collection',
                                   ['workspace_id', 'tab_id'])
            },
            {
                'id':
                'IWIDGET_ENTRY',
                'url':
                build_url_template('wirecloud.iwidget_entry',
                                   ['workspace_id', 'tab_id', 'iwidget_id'])
            },
            {
                'id':
                'IWIDGET_PREFERENCES',
                'url':
                build_url_template('wirecloud.iwidget_preferences',
                                   ['workspace_id', 'tab_id', 'iwidget_id'])
            },
            {
                'id':
                'IWIDGET_PROPERTIES',
                'url':
                build_url_template('wirecloud.iwidget_properties',
                                   ['workspace_id', 'tab_id', 'iwidget_id'])
            },
            {
                'id': 'LOCAL_REPOSITORY',
                'url': build_url_template('wirecloud.root')
            },
            {
                'id': 'LOCAL_RESOURCE_COLLECTION',
                'url': build_url_template('wirecloud.resource_collection')
            },
            {
                'id':
                'LOCAL_RESOURCE_ENTRY',
                'url':
                build_url_template('wirecloud.resource_entry',
                                   ['vendor', 'name', 'version'])
            },
            {
                'id':
                'LOCAL_UNVERSIONED_RESOURCE_ENTRY',
                'url':
                build_url_template('wirecloud.unversioned_resource_entry',
                                   ['vendor', 'name'])
            },
            {
                'id': 'LOGIN_VIEW',
                'url': build_url_template('login')
            },
            {
                'id': 'LOGOUT_VIEW',
                'url': build_url_template('logout')
            },
            {
                'id':
                'MAC_BASE_URL',
                'url':
                build_url_template('wirecloud.showcase_media',
                                   ['vendor', 'name', 'version', 'file_path'])
            },
            {
                'id': 'MARKET_COLLECTION',
                'url': build_url_template('wirecloud.market_collection')
            },
            {
                'id':
                'MARKET_ENTRY',
                'url':
                build_url_template('wirecloud.market_entry',
                                   ['user', 'market'])
            },
            {
                'id': 'MISSING_WIDGET_CODE_ENTRY',
                'url':
                build_url_template('wirecloud.missing_widget_code_entry')
            },
            {
                'id':
                'OPERATOR_ENTRY',
                'url':
                build_url_template('wirecloud.operator_code_entry',
                                   ['vendor', 'name', 'version'])
            },
            {
                'id': 'PLATFORM_CONTEXT_COLLECTION',
                'url':
                build_url_template('wirecloud.platform_context_collection')
            },
            {
                'id': 'PLATFORM_PREFERENCES',
                'url': build_url_template('wirecloud.platform_preferences')
            },
            {
                'id':
                'PROXY',
                'url':
                build_url_template('wirecloud|proxy',
                                   ['protocol', 'domain', 'path'])
            },
            {
                'id': 'PUBLISH_ON_OTHER_MARKETPLACE',
                'url':
                build_url_template('wirecloud.publish_on_other_marketplace')
            },
            {
                'id': 'ROOT_URL',
                'url': build_url_template('wirecloud.root')
            },
            {
                'id': 'SEARCH_SERVICE',
                'url': build_url_template('wirecloud.search_service')
            },
            {
                'id': 'SWITCH_USER_SERVICE',
                'url': build_url_template('wirecloud.switch_user_service')
            },
            {
                'id':
                'TAB_COLLECTION',
                'url':
                build_url_template('wirecloud.tab_collection',
                                   ['workspace_id'])
            },
            {
                'id':
                'TAB_ENTRY',
                'url':
                build_url_template('wirecloud.tab_entry',
                                   ['workspace_id', 'tab_id'])
            },
            {
                'id':
                'TAB_PREFERENCES',
                'url':
                build_url_template('wirecloud.tab_preferences',
                                   ['workspace_id', 'tab_id'])
            },
            {
                'id': 'THEME_ENTRY',
                'url': build_url_template('wirecloud.theme_entry', ['name'])
            },
            {
                'id':
                'WIRING_ENTRY',
                'url':
                build_url_template('wirecloud.workspace_wiring',
                                   ['workspace_id'])
            },
            {
                'id':
                'OPERATOR_VARIABLES_ENTRY',
                'url':
                build_url_template('wirecloud.operator_variables',
                                   ['workspace_id', 'operator_id'])
            },
            {
                'id': 'WORKSPACE_COLLECTION',
                'url': build_url_template('wirecloud.workspace_collection')
            },
            {
                'id':
                'WORKSPACE_ENTRY_OWNER_NAME',
                'url':
                build_url_template('wirecloud.workspace_entry_owner_name',
                                   ['owner', 'name'])
            },
            {
                'id':
                'WORKSPACE_ENTRY',
                'url':
                build_url_template('wirecloud.workspace_entry',
                                   ['workspace_id'])
            },
            {
                'id':
                'WORKSPACE_MERGE',
                'url':
                build_url_template('wirecloud.workspace_merge', ['to_ws_id'])
            },
            {
                'id':
                'WORKSPACE_PREFERENCES',
                'url':
                build_url_template('wirecloud.workspace_preferences',
                                   ['workspace_id'])
            },
            {
                'id':
                'WORKSPACE_PUBLISH',
                'url':
                build_url_template('wirecloud.workspace_publish',
                                   ['workspace_id'])
            },
            {
                'id':
                'WORKSPACE_RESOURCE_COLLECTION',
                'url':
                build_url_template('wirecloud.workspace_resource_collection',
                                   ['workspace_id'])
            },
            {
                'id':
                'WORKSPACE_VIEW',
                'url':
                build_url_template('wirecloud.workspace_view',
                                   ['owner', 'name'])
            },
        )

        from django.conf import settings
        if 'django.contrib.admin' in settings.INSTALLED_APPS:
            endpoints += ({
                'id': 'DJANGO_ADMIN',
                'url': build_url_template('admin:index')
            }, )

        return endpoints
Ejemplo n.º 5
0
    def get_ajax_endpoints(self, view):
        endpoints = (
            {'id': 'GLOBAL_MARKET_ENTRY', 'url': build_url_template('wirecloud.market_entry', ['market'])},
            {'id': 'IWIDGET_COLLECTION', 'url': build_url_template('wirecloud.iwidget_collection', ['workspace_id', 'tab_id'])},
            {'id': 'IWIDGET_ENTRY', 'url': build_url_template('wirecloud.iwidget_entry', ['workspace_id', 'tab_id', 'iwidget_id'])},
            {'id': 'IWIDGET_PREFERENCES', 'url': build_url_template('wirecloud.iwidget_preferences', ['workspace_id', 'tab_id', 'iwidget_id'])},
            {'id': 'IWIDGET_PROPERTIES', 'url': build_url_template('wirecloud.iwidget_properties', ['workspace_id', 'tab_id', 'iwidget_id'])},
            {'id': 'LOCAL_REPOSITORY', 'url': build_url_template('wirecloud.root')},
            {'id': 'LOCAL_RESOURCE_COLLECTION', 'url': build_url_template('wirecloud.resource_collection')},
            {'id': 'LOCAL_RESOURCE_ENTRY', 'url': build_url_template('wirecloud.resource_entry', ['vendor', 'name', 'version'])},
            {'id': 'LOCAL_UNVERSIONED_RESOURCE_ENTRY', 'url': build_url_template('wirecloud.unversioned_resource_entry', ['vendor', 'name'])},
            {'id': 'LOGIN_VIEW', 'url': build_url_template('login')},
            {'id': 'LOGOUT_VIEW', 'url': build_url_template('logout')},
            {'id': 'MAC_BASE_URL', 'url': build_url_template('wirecloud.showcase_media', ['vendor', 'name', 'version', 'file_path'])},
            {'id': 'MARKET_COLLECTION', 'url': build_url_template('wirecloud.market_collection')},
            {'id': 'MARKET_ENTRY', 'url': build_url_template('wirecloud.market_entry', ['user', 'market'])},
            {'id': 'MISSING_WIDGET_CODE_ENTRY', 'url': build_url_template('wirecloud.missing_widget_code_entry')},
            {'id': 'OPERATOR_ENTRY', 'url': build_url_template('wirecloud.operator_code_entry', ['vendor', 'name', 'version'])},
            {'id': 'PLATFORM_CONTEXT_COLLECTION', 'url': build_url_template('wirecloud.platform_context_collection')},
            {'id': 'PLATFORM_PREFERENCES', 'url': build_url_template('wirecloud.platform_preferences')},
            {'id': 'PROXY', 'url': build_url_template('wirecloud|proxy', ['protocol', 'domain', 'path'])},
            {'id': 'PUBLISH_ON_OTHER_MARKETPLACE', 'url': build_url_template('wirecloud.publish_on_other_marketplace')},
            {'id': 'ROOT_URL', 'url': build_url_template('wirecloud.root')},
            {'id': 'SEARCH_SERVICE', 'url': build_url_template('wirecloud.search_service')},
            {'id': 'SWITCH_USER_SERVICE', 'url': build_url_template('wirecloud.switch_user_service')},
            {'id': 'TAB_COLLECTION', 'url': build_url_template('wirecloud.tab_collection', ['workspace_id'])},
            {'id': 'TAB_ENTRY', 'url': build_url_template('wirecloud.tab_entry', ['workspace_id', 'tab_id'])},
            {'id': 'TAB_PREFERENCES', 'url': build_url_template('wirecloud.tab_preferences', ['workspace_id', 'tab_id'])},
            {'id': 'THEME_ENTRY', 'url': build_url_template('wirecloud.theme_entry', ['name'])},
            {'id': 'WIDGET_CODE_ENTRY', 'url': build_url_template('wirecloud.widget_code_entry', ['vendor', 'name', 'version'])},
            {'id': 'WIRING_ENTRY', 'url': build_url_template('wirecloud.workspace_wiring', ['workspace_id'])},
            {'id': 'WORKSPACE_COLLECTION', 'url': build_url_template('wirecloud.workspace_collection')},
            {'id': 'WORKSPACE_ENTRY', 'url': build_url_template('wirecloud.workspace_entry', ['workspace_id'])},
            {'id': 'WORKSPACE_MERGE', 'url': build_url_template('wirecloud.workspace_merge', ['to_ws_id'])},
            {'id': 'WORKSPACE_PREFERENCES', 'url': build_url_template('wirecloud.workspace_preferences', ['workspace_id'])},
            {'id': 'WORKSPACE_PUBLISH', 'url': build_url_template('wirecloud.workspace_publish', ['workspace_id'])},
            {'id': 'WORKSPACE_RESOURCE_COLLECTION', 'url': build_url_template('wirecloud.workspace_resource_collection', ['workspace_id'])},
            {'id': 'WORKSPACE_VIEW', 'url': build_url_template('wirecloud.workspace_view', ['owner', 'name'])},
        )

        from django.conf import settings
        if 'django.contrib.admin' in settings.INSTALLED_APPS:
            endpoints += ({'id': 'DJANGO_ADMIN', 'url': build_url_template('admin:index')},)

        return endpoints
Ejemplo n.º 6
0
    def get_ajax_endpoints(self, view):
        endpoints = (
            {"id": "LOGOUT_VIEW", "url": build_url_template("logout")},
            {"id": "LOCAL_REPOSITORY", "url": build_url_template("wirecloud.root")},
            {"id": "LOCAL_RESOURCE_COLLECTION", "url": build_url_template("wirecloud_showcase.resource_collection")},
            {
                "id": "LOCAL_RESOURCE_ENTRY",
                "url": build_url_template("wirecloud_showcase.resource_entry", ["vendor", "name", "version"]),
            },
            {
                "id": "IWIDGET_COLLECTION",
                "url": build_url_template("wirecloud.iwidget_collection", ["workspace_id", "tab_id"]),
            },
            {
                "id": "IWIDGET_ENTRY",
                "url": build_url_template("wirecloud.iwidget_entry", ["workspace_id", "tab_id", "iwidget_id"]),
            },
            {
                "id": "IWIDGET_VERSION_ENTRY",
                "url": build_url_template("wirecloud.iwidget_version_entry", ["workspace_id", "tab_id", "iwidget_id"]),
            },
            {"id": "PLATFORM_CONTEXT_COLLECTION", "url": build_url_template("wirecloud.platform_context_collection")},
            {"id": "PLATFORM_PREFERENCES", "url": build_url_template("wirecloud.platform_preferences")},
            {"id": "PROXY", "url": build_url_template("wirecloud.proxy", ["protocol", "domain", "path"])},
            {
                "id": "WORKSPACE_PREFERENCES",
                "url": build_url_template("wirecloud.workspace_preferences", ["workspace_id"]),
            },
            {"id": "TAB_COLLECTION", "url": build_url_template("wirecloud.tab_collection", ["workspace_id"])},
            {"id": "TAB_ENTRY", "url": build_url_template("wirecloud.tab_entry", ["workspace_id", "tab_id"])},
            {
                "id": "TAB_PREFERENCES",
                "url": build_url_template("wirecloud.tab_preferences", ["workspace_id", "tab_id"]),
            },
            {"id": "THEME_ENTRY", "url": build_url_template("wirecloud.theme_entry", ["name"])},
            {"id": "MARKET_COLLECTION", "url": build_url_template("wirecloud.market_collection")},
            {"id": "GLOBAL_MARKET_ENTRY", "url": build_url_template("wirecloud.market_entry", ["market"])},
            {"id": "MARKET_ENTRY", "url": build_url_template("wirecloud.market_entry", ["user", "market"])},
            {"id": "WIRING_ENTRY", "url": build_url_template("wirecloud.workspace_wiring", ["workspace_id"])},
            {
                "id": "OPERATOR_ENTRY",
                "url": build_url_template("wirecloud.operator_code_entry", ["vendor", "name", "version"]),
            },
            {"id": "VARIABLE_COLLECTION", "url": build_url_template("wirecloud.variable_collection", ["workspace_id"])},
            {
                "id": "WIDGET_CODE_ENTRY",
                "url": build_url_template("wirecloud.widget_code_entry", ["vendor", "name", "version"]),
            },
            {"id": "WORKSPACE_COLLECTION", "url": build_url_template("wirecloud.workspace_collection")},
            {"id": "WORKSPACE_ENTRY", "url": build_url_template("wirecloud.workspace_entry", ["workspace_id"])},
            {"id": "WORKSPACE_PUBLISH", "url": build_url_template("wirecloud.workspace_publish", ["workspace_id"])},
            {"id": "PUBLISH_ON_OTHER_MARKETPLACE", "url": build_url_template("wirecloud.publish_on_other_marketplace")},
            {"id": "WORKSPACE_MERGE", "url": build_url_template("wirecloud.workspace_merge", ["to_ws_id"])},
            {
                "id": "WORKSPACE_SHARE",
                "url": build_url_template("wirecloud.workspace_share", ["workspace_id", "share_boolean"]),
            },
        )

        from django.conf import settings

        if "django.contrib.admin" in settings.INSTALLED_APPS:
            endpoints += ({"id": "DJANGO_ADMIN", "url": build_url_template("admin:index")},)

        return endpoints