本文整理汇总了Python中splunk.models.saved_search.SavedSearch.setSummarizationDetails方法的典型用法代码示例。如果您正苦于以下问题:Python SavedSearch.setSummarizationDetails方法的具体用法?Python SavedSearch.setSummarizationDetails怎么用?Python SavedSearch.setSummarizationDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类splunk.models.saved_search.SavedSearch
的用法示例。
在下文中一共展示了SavedSearch.setSummarizationDetails方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: new
# 需要导入模块: from splunk.models.saved_search import SavedSearch [as 别名]
# 或者: from splunk.models.saved_search.SavedSearch import setSummarizationDetails [as 别名]
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: create
# 需要导入模块: from splunk.models.saved_search import SavedSearch [as 别名]
# 或者: from splunk.models.saved_search.SavedSearch import setSummarizationDetails [as 别名]
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))