Пример #1
0
    def new(self, app, action, **params):
        owner = splunk.auth.getCurrentUser()['name']
        params['name'] = params.get('name', '')


        saved_search = SavedSearch(app, owner, **params)
        saved_search.setSummarizationDetails()

        return self.render_template('savesearchwizard/new.html', dict(app=app, saved_search=saved_search))
Пример #2
0
    def create(self, app, action, **params):
        owner = splunk.auth.getCurrentUser()['name']
        params['name'] = params.get('name', '')
        saved_search = SavedSearch(app, owner, **params)
        saved_search.metadata.sharing = params.get('sharing', 'user')
        
 
        #TODO: remove this
        #saved_search.auto_summarize.cron_schedule = '*/10 * * * *'

        if saved_search.passive_save():
            raise cherrypy.HTTPRedirect(self.make_url(['savesearchwizard', app, 'success'], _qs=dict(id=saved_search.id)), 303)

        saved_search.setSummarizationDetails()
        return self.render_template('savesearchwizard/new.html', dict(app=app, saved_search=saved_search))