grr/server/grr_response_server/gui/api_plugins/artifact.py
def Handle(self, args, token=None):
    """Get available artifact information for rendering."""

    # Get all artifacts that aren't Bootstrap and aren't the base class.
    artifacts_list = sorted(
        artifact_registry.REGISTRY.GetArtifacts(
            reload_datastore_artifacts=True),
        key=lambda art: art.name)

    total_count = len(artifacts_list)

    if args.count:
      artifacts_list = artifacts_list[args.offset:args.offset + args.count]
    else:
      artifacts_list = artifacts_list[args.offset:]

    descriptors = self.BuildArtifactDescriptors(artifacts_list)
    return ApiListArtifactsResult(items=descriptors, total_count=total_count)
Get available artifact information for rendering.
Get available artifact information for rendering.
Get available artifact information for rendering .
def Handle(self, args, token=None):
    artifacts_list = sorted(
        artifact_registry.REGISTRY.GetArtifacts(
            reload_datastore_artifacts=True),
        key=lambda art: art.name)
    total_count = len(artifacts_list)
    if args.count:
      artifacts_list = artifacts_list[args.offset:args.offset + args.count]
    else:
      artifacts_list = artifacts_list[args.offset:]
    descriptors = self.BuildArtifactDescriptors(artifacts_list)
    return ApiListArtifactsResult(items=descriptors, total_count=total_count)
def Handle ( self , args , token = None ) : artifacts_list = sorted ( artifact_registry . REGISTRY . GetArtifacts ( reload_datastore_artifacts = True ) , key = lambda art : art . name ) total_count = len ( artifacts_list ) if args . count : artifacts_list = artifacts_list [ args . offset : args . offset + args . count ] else : artifacts_list = artifacts_list [ args . offset : ] descriptors = self . BuildArtifactDescriptors ( artifacts_list ) return ApiListArtifactsResult ( items = descriptors , total_count = total_count )
Get available artifact information for rendering.
Get available artifact information for rendering .
"""Get available artifact information for rendering.""" # Get all artifacts that aren't Bootstrap and aren't the base class.
self
args
token