def ListActions(self, error=None):
"""Handler for get requests to datastore_admin/confirm_delete."""
use_stats_kinds = False
kinds = []
more_kinds = False
try:
kinds, more_kinds = self.GetKinds()
if not kinds:
use_stats_kinds = True
logging.warning('Found no kinds. Using datastore stats instead.')
except datastore_errors.Error, e:
logging.exception(e)
use_stats_kinds = True
last_stats_update, kind_stats = _GetDatastoreStats(
kinds, use_stats_kinds=use_stats_kinds)
template_params = {
'run_as_a_service': self.request.get('run_as_a_service'),
'datastore_admin_home': utils.GenerateHomeUrl(None),
'offer_service': (self.request.get('service') and not
self.request.get('run_as_a_service')),
'kind_stats': kind_stats,
'more_kinds': more_kinds,
'last_stats_update': last_stats_update,
'app_id': self.request.get('app_id'),
'hosting_app_id': app_identity.get_application_id(),
'has_namespace': self.request.get('namespace', None) is not None,
'namespace': self.request.get('namespace'),
'action_list': sorted(ENTITY_ACTIONS.keys()),
'backup_action_list': sorted(BACKUP_ACTIONS.keys()),
'pending_backup_action_list': sorted(PENDING_BACKUP_ACTIONS.keys()),
'error': error,
'completed_operations': self.GetOperations(active=False),
'active_operations': self.GetOperations(active=True),
'pending_backups': self.GetPendingBackups(),
'backups': self.GetBackups(),
'map_reduce_path': config.MAPREDUCE_PATH + '/detail'
}
utils.RenderToResponse(self, 'list_actions.html', template_params)
评论列表
文章目录