Esempio n. 1
0
class GnmlibrarytoolSRViewJS(Plugin):
    implements(IPluginBlock)

    jsstring = """
        <script src="/sitemedia/gnmlibrarytool/js/storagerulepanel.js"></script>
        <script type="text/javascript" charset="utf-8">
        $(document).ready(function() {
            // Extend the namespace with a new viewclass.
            (function (app, $, undefined) {
                app.MediaItemMoreInfoPanel = cntmo.prtl.ViewClass.extend();
            }( cntmo.app = cntmo.app || {}, jQuery ));

            // Create a new instance of the viewclass that can
            // be switched to.
            cntmo.prtl.panelviews['GnmLibraryToolSRPanel'] = new cntmo.app.MediaItemMoreInfoPanel({el:$('#GnmLibraryToolSRPanel')});
        });
        </script>
    """

    def __init__(self):
        #print "init inlinejs"
        self.name = "MediaViewInLineJS"
        self.plugin_guid = '7e35bced-330f-456c-b472-e8263ad4236a'

    def return_string(self, tagname, *args):
        return {'guid': self.plugin_guid, 'string': self.jsstring}
Esempio n. 2
0
class GnmDownloadableLinkCSS(Plugin):
    """
    Injects CSS overrides into all Portal pages; in practise, it will only inject ones with items or collections
    in their context
    """
    implements(IPluginBlock)

    def __init__(self):
        self.name = "header_css_js"
        self.plugin_guid = '10031a8e-2e25-4753-9be5-f8e48ccf218b'
        log.warning('Initiated downloadable link CSS')

    def return_string(self, tagname, *args):
        """
        Returns a dictionary containing rendering information
        :param tagname: tag name
        :param args: passed in from Portal
        :return: dictionary of context, guid and template
        """
        import traceback
        ctx = {}

        return {
            'guid': self.plugin_guid,
            'template': 'gnmdownloadablelink/css_injection_template.html',
            'context': ctx
        }
Esempio n. 3
0
class FrameRateItemPage(Plugin):
    """
    This adds information to the item page.
    """
    implements(IPluginBlock)

    def __init__(self):
        self.name = "ItemTechMetadataPlugin"
        self.guid = "B56D051D-93BB-40E0-8DE2-3F80E219BD2A"

    def return_string(self, tagname, *args):
        extra_info = " "
        valid_item_types = (
            'sequence',
            'video',
        )
        context = args[1]
        item = context.get('item', None)
        if item is not None:
            if item.getItemType() in valid_item_types:
                extra_info += "<dl><dt>Framerate</dt><dd>"
                extra_info += item.getFramesPerSecond() + "fps"
                extra_info += "</dd></dl>"

        return {'guid': self.guid, 'template': extra_info}
Esempio n. 4
0
class SearchPageExportExampleExportSearchPlugin(Plugin):
    """
    Add an action to the search page gear menu
    """
    implements(IPluginBlock)

    def __init__(self):
        # The name of the plugin defines where the HTML gets rendered. This is in the large gear menu of the
        # search page, intended for actions on selection so disabled when no items are selected.
        # See
        # http://doc.cantemo.com/latest/DevelopmentGuide/modules/search_results.html
        # and http://doc.cantemo.com/latest/DevelopmentGuide/search.html?q=pluginblock
        # for more examples.
        self.name = "vs_collection_view_dropdown"
        self.plugin_guid = '50D46B4F-E993-4795-B1D3-7CCF5C308F02'

    def return_string(self, tagname, *args):
        """
        This function returns
        :param tagname: The plugin name where this is rendered - in this example always "vs_collection_view_dropdown"
        :param args: Arguments from the rendering - not needed in this example
        :return:
        """
        return {
            'guid': self.plugin_guid,
            'template': 'search_page_export_example/menu_item.html'
        }
Esempio n. 5
0
class FileSysArchiveBootstrap(Plugin):

    implements(IPluginBootstrap)

    def bootstrap(self):
        if is_app_enabled(app_id):
            from . import plugin
Esempio n. 6
0
class GnmSyndicationUrl(Plugin):
    implements(IPluginURL)

    name = 'GNM Syndication URL'
    urls = 'portal.plugins.gnmsyndication.urls'
    urlpattern = r'^gnmsyndication/'
    namespace = 'gnmsyndication'
    plugin_guid = 'e1e3f018-cf17-11e4-861b-60030890043a'
Esempio n. 7
0
class FileSysArchiveUrls(Plugin):
    implements(IPluginURL)

    def __init__(self):
        self.name = "Acts on FileSysArchive URLs for Item"
        self.urls = 'portal.plugins.filesysarchive_example.urls'
        self.urlpattern = ''
        self.namespace = 'filesysarchive_example'
        log.debug("Initiated FileSysArchiveUrls")
Esempio n. 8
0
class TaxonomytMenuNavigationPlugin(Plugin):
    implements(IPluginBlock)

    def __init__(self):
        self.name = "NavigationManagePlugin"
        self.plugin_guid = "9a21d34f-1714-4a02-bb83-c9dd327e57b3"

    def return_string(self, tagname, *args):
        return {'guid': self.plugin_guid, 'template': 'taxonomy/menuitem.html'}
Esempio n. 9
0
class GnmplutostatsAdminPlugin(Plugin):
    implements(IPluginBlock)

    def __init__(self):
        self.name = "AdminLeftPanelBottomPanePlugin"
        self.plugin_guid = '46492723-ffda-48d7-8ac9-6951ac5f1bb6'
        log.debug('initiated GNMPlutoStats admin panel')

    def return_string(self,tagname,*args):
        return {'guid': self.plugin_guid, 'template': 'gnmplutostats/navigation.html'}
Esempio n. 10
0
class GnmlibrarytoolAdminPlugin(Plugin):
    implements(IPluginBlock)

    def __init__(self):
        self.name = "AdminLeftPanelBottomPanePlugin"
        self.plugin_guid = '285f1254-de2a-11e5-99ff-60030840043a'
        log.debug('initiated GNMLibraryTool admin panel')

    def return_string(self,tagname,*args):
        return {'guid': self.plugin_guid, 'template': 'gnmlibrarytool/nav.html'}
Esempio n. 11
0
class GnmkinesisresponderPluginURL(Plugin):
    """ Adds a plugin handler which creates url handler for the index page """
    implements(IPluginURL)

    def __init__(self):
        self.name = "Kinesis responder base plugin"
        self.urls = 'portal.plugins.kinesisresponder.urls'
        self.urlpattern = r'^kinesisresponder/'
        self.namespace = r'kinesisresponder'
        self.plugin_guid = 'c6192389-f763-4ec5-bd1e-5ce050c9f24a'
Esempio n. 12
0
class GnmdownloadablelinkPluginURL(Plugin):
    """ Adds a plugin handler which creates url handler for the index page """
    implements(IPluginURL)

    def __init__(self):
        self.name = "Gnmdownloadablelink App"
        self.urls = 'portal.plugins.gnmdownloadablelink.urls'
        self.urlpattern = r'^gnmdownloadablelink/'
        self.namespace = r'gnmdownloadablelink'
        self.plugin_guid = '3b128671-1b81-4b16-bfa1-2752a5897576'
Esempio n. 13
0
class AtomResponderPluginURL(Plugin):
    """ Adds a plugin handler which creates url handler for the index page """
    implements(IPluginURL)

    def __init__(self):
        self.name = "Atom message responder"
        self.urls = 'portal.plugins.gnmatomresponder.urls'
        self.urlpattern = r'^gnmatomresponder/'
        self.namespace = r'gnmatomresponder'
        self.plugin_guid = 'cd74d14b-89d6-4317-a219-01efc880fc10'
Esempio n. 14
0
class GnmyoutubePluginURL(Plugin):
    """ Adds a plugin handler which creates url handler for the index page """
    implements(IPluginURL)

    def __init__(self):
        self.name = "Gnmyoutube App"
        self.urls = 'portal.plugins.gnmyoutube.urls'
        self.urlpattern = r'^gnmyoutube/'
        self.namespace = r'gnmyoutube'
        self.plugin_guid = '5e8deba5-884d-41ea-9e4e-aa4386b3884d'
        log.debug("Initiated Gnmyoutube App")
Esempio n. 15
0
class GnmpagerdutyPluginURL(Plugin):
    """ Adds a plugin handler which creates url handler for the index page """
    implements(IPluginURL)

    def __init__(self):
        self.name = "Gnmpagerduty App"
        self.urls = 'portal.plugins.gnmpagerduty.urls'
        self.urlpattern = r'^gnmpagerduty/'
        self.namespace = r'gnmpagerduty'
        self.plugin_guid = '455bd5h0-37e5-41db-9ad4-8e26927a1dc8'
        log.debug("Initiated Gnmpagerduty App")
Esempio n. 16
0
class GnmZeitgeistUrl(Plugin):
    implements(IPluginURL)

    name = 'GNM tag cloud app URL'
    urls = 'portal.plugins.gnmzeitgeist.urls'
    urlpattern = r'^gnmtagcloud/'
    namespace = 'gnmzeitgeist'
    plugin_guid = 'b598f7ae-d180-11e4-beea-60030890043a'

    def __init__(self):
        log.info(GnmZeitgeistUrl.name + ' initialized')
Esempio n. 17
0
class GnmSyndicationUrl(Plugin):
    implements(IPluginURL)

    name = 'GNM Syndication URL'
    urls = 'portal.plugins.gnmsyndication.urls'
    urlpattern = r'^gnmsyndication/'
    namespace = 'gnmsyndication'
    plugin_guid = 'e1e3f018-cf17-11e4-861b-60030890043a'

    def __init__(self):
        log.info(GnmSyndicationUrl.name + ' initialized')
Esempio n. 18
0
class TaxonomyBootstrap(Plugin):

    implements(IPluginBootstrap)

    def bootstrap(self):
        from portal.plugins.taxonomy.plistner import item_post_modify_handler, item_post_delete_handler
        from portal.vidispine.signals import vidispine_post_modify, vidispine_post_create, vidispine_post_delete

        vidispine_post_modify.connect(item_post_modify_handler)
        vidispine_post_create.connect(item_post_modify_handler)
        vidispine_post_delete.connect(item_post_delete_handler)
Esempio n. 19
0
class GnmplutoconverterPluginURL(Plugin):
    """ Adds a plugin handler which creates url handler for the index page """
    implements(IPluginURL)

    def __init__(self):
        self.name = "Gnmplutoconverter App"
        self.urls = 'portal.plugins.gnmplutoconverter.urls'
        self.urlpattern = r'^gnmplutoconverter/'
        self.namespace = r'gnmplutoconverter'
        self.plugin_guid = '09346faa-6818-4ec3-88aa-8a7c8dde054e'
        log.debug("Initiated Gnmplutoconverter App")
Esempio n. 20
0
class GNMPropagationUrl(Plugin):
    implements(IPluginURL)

    name = 'GNM Propagation URL'
    urls = 'portal.plugins.gnmpropagation.urls'
    urlpattern = r'^gnmpropagation/'
    namespace = 'gnmpropagation'
    plugin_guid = 'AB9F2C5E-B68D-4E17-BCF5-96327B0825A8'

    def __init__(self):
        log.info(GNMPropagationUrl.name + ' initialized')
Esempio n. 21
0
class HelloWorldUrl(Plugin):
    implements(IPluginURL)

    name = 'Hello World URL'
    urls = 'portal.plugins.helloworld.urls'
    urlpattern = r'^ag_helloworld/'
    namespace = 'helloworld'
    plugin_guid = '62cdef18-ce63-11e4-aab1-005056bc73c6'

    def __init__(self):
        log.info(HelloWorldUrl.name + ' initialized')
Esempio n. 22
0
class SessionRedirectPluginURL(Plugin):
    """ Adds a plugin handler which creates url handler for the index page """
    implements(IPluginURL)

    def __init__(self):
        self.name = "session_Redirect_Plugin App"
        self.urls = 'portal.plugins.session_redirect_plugin.urls'
        self.urlpattern = r'^session_redirect_plugin/'
        self.namespace = r'session_redirect_plugin'
        self.plugin_guid = '21d04896-1f7c-440e-b0a2-808abc45cc3e'
        log.debug("Initiated Session_Redirect_Plugin App")
Esempio n. 23
0
class GnmlibrarytoolPluginURL(Plugin):
    """ Adds a plugin handler which creates url handler for the index page """
    implements(IPluginURL)

    def __init__(self):
        self.name = "Gnmlibrarytool App"
        self.urls = 'portal.plugins.gnmlibrarytool.urls'
        self.urlpattern = r'^gnmlibrarytool/'
        self.namespace = r'gnmlibrarytool'
        self.plugin_guid = 'b430f578-edc5-4508-bd0d-2bd7493d2994'
        log.debug("Initiated Gnmlibrarytool App")
Esempio n. 24
0
class GnmplutostatsPluginURL(Plugin):
    """ Adds a plugin handler which creates url handler for the index page """
    implements(IPluginURL)

    def __init__(self):
        self.name = "Gnmplutostats App"
        self.urls = 'portal.plugins.gnmplutostats.urls'
        self.urlpattern = r'^gnmplutostats/'
        self.namespace = r'gnmplutostats'
        self.plugin_guid = '227c2ab9-e299-4537-99b4-c313a35d1b2e'
        log.debug("Initiated Gnmplutostats App")
Esempio n. 25
0
class GNMOptInUrl(Plugin):
    implements(IPluginURL)

    name = 'GNM Opt In URL'
    urls = 'portal.plugins.gnmoptin.urls'
    urlpattern = r'^gnmoptin/'
    namespace = 'gnmoptin'
    plugin_guid = 'AC9F2C5E-B78D-4E15-BCF5-91327B0825A8'

    def __init__(self):
        log.info(GNMOptInUrl.name + ' initialized')
Esempio n. 26
0
class GnmuploadprofilerPluginURL(Plugin):
    """ Adds a plugin handler which creates url handler for the index page """
    implements(IPluginURL)

    def __init__(self):
        self.name = "GNM Upload Profiler"
        self.urls = 'portal.plugins.gnmuploadprofiler.urls'
        self.urlpattern = r'^gnmuploadprofiler/'
        self.namespace = r'gnmuploadprofiler'
        self.plugin_guid = '100fb673-fc07-4f18-9e9c-f85717238936'
        log.debug("Initiated Gnmuploadprofiler App")
Esempio n. 27
0
class GnmgridintegrationAdminPlugin(Plugin):
    implements(IPluginBlock)

    def __init__(self):
        self.name = "AdminLeftPanelBottomPanePlugin"
        self.plugin_guid = '285f1224-de4a-11e5-99ff-60030890043a'
        log.debug('initiated GNMPurgeMeister admin panel')

    def return_string(self,tagname,*args):
        #raise StandardError("testing")
        return {'guid': self.plugin_guid, 'template': 'gnmgridintegration/navigation.html'}
Esempio n. 28
0
class LogSearchUrl(Plugin):
    implements(IPluginURL)

    name = 'GNM Advanced Log Search URL'
    urls = 'portal.plugins.gnmlogsearch.urls'
    urlpattern = r'^gnmlogsearch/'
    namespace = 'gnmlogsearch'
    plugin_guid = 'ad0f0f88-de96-11e4-9329-60030890043a'

    def __init__(self):
        log.info(LogSearchUrl.name + ' initialized')
Esempio n. 29
0
class GnmgridintegrationPluginURL(Plugin):
    """ Adds a plugin handler which creates url handler for the index page """
    implements(IPluginURL)

    def __init__(self):
        self.name = "Gnmgridintegration App"
        self.urls = 'portal.plugins.gnmgridintegration.urls'
        self.urlpattern = r'^gnmgridintegration/'
        self.namespace = r'gnmgridintegration'
        self.plugin_guid = '435bd5e0-17e5-41db-9cd9-8e26917a0dc2'
        log.debug("Initiated Gnmgridintegration App")
Esempio n. 30
0
class TaxonomyPluginURL(Plugin):
    """ Adds a plugin handler which creates url handler for the index page """
    implements(IPluginURL)

    def __init__(self):
        self.name = "Taxonomy App"
        self.urls = 'portal.plugins.taxonomy.urls'
        self.urlpattern = r'^taxonomy/'
        self.namespace = r'taxonomy'
        self.plugin_guid = '4edf9c96-ed31-47fa-b375-6ebb78900d00'
        log.debug("Initiated Taxonomy App")