from splunk.appserver.mrsparkle import *
import logging

logger = logging.getLogger('splunk.appserver.controllers.ifx')
    
class IFXController(BaseController):
    """/ifx"""

    @route('/')
    @expose_page(must_login=True, methods=['GET', 'POST'])
    def index(self, **kwargs):
        logger.warn('Handling a request to the legacy IFX controller, redirecting to the new AFX page.')
        app = kwargs.pop('namespace', 'search')
        return self.redirect_to_url(['app', app, 'field_extractor'], kwargs)