beat.web.experiments.admin module¶
-
class
beat.web.experiments.admin.ExperimentModelForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None)[source]¶ Bases:
django.forms.models.ModelForm-
class
Meta[source]¶ Bases:
object-
model¶
-
exclude= []¶
-
widgets= {'short_description': <django.forms.widgets.TextInput object>}¶
-
-
base_fields= {'author': <django.forms.models.ModelChoiceField object>, 'declaration_file': <beat.web.ui.forms.CodeMirrorJSONFileField object>, 'description_file': <beat.web.ui.forms.CodeMirrorRSTFileField object>, 'end_date': <django.forms.fields.DateTimeField object>, 'hash': <django.forms.fields.CharField object>, 'name': <beat.web.ui.forms.NameField object>, 'referenced_algorithms': <django.forms.models.ModelMultipleChoiceField object>, 'referenced_datasets': <django.forms.models.ModelMultipleChoiceField object>, 'shared_with': <django.forms.models.ModelMultipleChoiceField object>, 'shared_with_team': <django.forms.models.ModelMultipleChoiceField object>, 'sharing': <django.forms.fields.TypedChoiceField object>, 'short_description': <django.forms.fields.CharField object>, 'start_date': <django.forms.fields.DateTimeField object>, 'status': <django.forms.fields.TypedChoiceField object>, 'toolchain': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields= {'declaration_file': <beat.web.ui.forms.CodeMirrorJSONFileField object>, 'description_file': <beat.web.ui.forms.CodeMirrorRSTFileField object>, 'name': <beat.web.ui.forms.NameField object>}¶
-
media¶
-
class
-
class
beat.web.experiments.admin.BlockInline(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline-
model¶
-
extra= 0¶
-
readonly_fields= ['execution_order', 'link', 'algorithm', 'analyzer', 'status']¶
-
ordering= ['execution_order']¶
-
fields= ['execution_order', 'link', 'algorithm', 'analyzer', 'status']¶
-
has_delete_permission(request, obj=None)[source]¶ Returns True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
has_add_permission(request)[source]¶ Returns True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
media¶
-
-
class
beat.web.experiments.admin.Experiment(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('id', 'author', 'toolchain', 'name', 'creation_date', 'start_date', 'end_date', 'status', 'sharing')¶
-
search_fields= ['author__username', 'toolchain__name', 'toolchain__author__username', 'name', 'short_description']¶
-
readonly_fields= ('hash', 'referenced_datasets', 'referenced_algorithms', 'short_description')¶
-
list_display_links= ('id',)¶
-
actions= [<function rehash_experiment>, <function reset_experiment>, <function cancel_experiment>]¶
-
form¶ alias of
ExperimentModelForm
-
filter_horizontal= ['shared_with', 'shared_with_team']¶
-
inlines= [<class 'beat.web.experiments.admin.BlockInline'>]¶
-
fieldsets= ((None, {'fields': ('name', 'author', 'toolchain')}), ('Status and dates', {'classes': ('collapse',), 'fields': ('start_date', 'end_date', 'status')}), ('Documentation', {'classes': ('collapse',), 'fields': ('short_description', 'description_file')}), ('References (read-only)', {'classes': ('collapse',), 'fields': ('referenced_datasets', 'referenced_algorithms')}), ('Sharing', {'classes': ('collapse',), 'fields': ('sharing', 'shared_with', 'shared_with_team')}), ('Source code', {'fields': ('hash', 'declaration_file')}))¶
-
media¶
-
-
class
beat.web.experiments.admin.BlockInputInline(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline-
model¶
-
verbose_name= 'Input'¶
-
verbose_name_plural= 'Inputs'¶
-
extra= 0¶
-
ordering= ['database', 'cache']¶
-
readonly_fields= ['input', 'channel']¶
-
fields= ['input', 'channel']¶
-
has_delete_permission(request, obj=None)[source]¶ Returns True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
has_add_permission(request)[source]¶ Returns True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
media¶
-
-
class
beat.web.experiments.admin.CachedFileInline(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline-
model¶ alias of
beat.web.experiments.models.cached_file.CachedFile_blocks
-
verbose_name= 'Output'¶
-
verbose_name_plural= 'Outputs'¶
-
extra= 0¶
-
readonly_fields= ['output']¶
-
fields= ['output']¶
-
has_delete_permission(request, obj=None)[source]¶ Returns True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
has_add_permission(request)[source]¶ Returns True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
media¶
-
-
class
beat.web.experiments.admin.BlockDependentsInline(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline-
model¶ alias of
beat.web.experiments.models.block.Block_dependencies
-
verbose_name= 'Dependent'¶
-
verbose_name_plural= 'Dependents'¶
-
fk_name= 'to_block'¶
-
extra= 0¶
-
readonly_fields= ['order', 'name', 'algorithm', 'analyzer', 'status']¶
-
ordering= ['id']¶
-
fields= ['order', 'name', 'algorithm', 'analyzer', 'status']¶
-
has_delete_permission(request, obj=None)[source]¶ Returns True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
has_add_permission(request)[source]¶ Returns True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
media¶
-
-
class
beat.web.experiments.admin.BlockDependenciesInline(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline-
model¶ alias of
beat.web.experiments.models.block.Block_dependencies
-
verbose_name= 'Dependency'¶
-
verbose_name_plural= 'Dependencies'¶
-
fk_name= 'from_block'¶
-
extra= 0¶
-
readonly_fields= ['order', 'name', 'algorithm', 'analyzer', 'status']¶
-
ordering= ['id']¶
-
fields= ['order', 'name', 'algorithm', 'analyzer', 'status']¶
-
has_delete_permission(request, obj=None)[source]¶ Returns True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
has_add_permission(request)[source]¶ Returns True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
media¶
-
-
class
beat.web.experiments.admin.BlockModelForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None)[source]¶ Bases:
django.forms.models.ModelForm-
base_fields= {'algorithm': <django.forms.models.ModelChoiceField object>, 'analyzer': <django.forms.fields.BooleanField object>, 'channel': <django.forms.fields.CharField object>, 'command': <beat.web.ui.forms.CodeMirrorJSONCharField object>, 'dependencies': <django.forms.models.ModelMultipleChoiceField object>, 'end_date': <django.forms.fields.DateTimeField object>, 'environment': <django.forms.models.ModelChoiceField object>, 'execution_order': <django.forms.fields.IntegerField object>, 'experiment': <django.forms.models.ModelChoiceField object>, 'name': <django.forms.fields.CharField object>, 'queue': <django.forms.models.ModelChoiceField object>, 'required_slots': <django.forms.fields.IntegerField object>, 'start_date': <django.forms.fields.DateTimeField object>, 'status': <django.forms.fields.TypedChoiceField object>}¶
-
declared_fields= {'command': <beat.web.ui.forms.CodeMirrorJSONCharField object>}¶
-
media¶
-
-
class
beat.web.experiments.admin.Block(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('id', 'author', 'toolchain', 'xp', 'execution_order', 'name', 'algorithm', 'analyzer', 'status', 'ins', 'outs', 'environment', 'q')¶
-
search_fields= ['name', 'experiment__author__username', 'experiment__toolchain__author__username', 'experiment__toolchain__name', 'experiment__name', 'algorithm__author__username', 'algorithm__name', 'environment__name', 'environment__version']¶
-
list_display_links= ('id', 'name')¶
-
inlines= [<class 'beat.web.experiments.admin.BlockDependenciesInline'>, <class 'beat.web.experiments.admin.BlockInputInline'>, <class 'beat.web.experiments.admin.CachedFileInline'>, <class 'beat.web.experiments.admin.BlockDependentsInline'>]¶
-
exclude= ['dependencies']¶
-
get_queryset(request)[source]¶ Returns a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.
-
has_delete_permission(request, obj=None)[source]¶ Returns True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
has_add_permission(request)[source]¶ Returns True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
form¶ alias of
BlockModelForm
-
fieldsets= ((None, {'fields': ('id', 'name', 'experiment')}), ('Status and dates', {'fields': ('creation_date', 'start_date', 'end_date', 'status')}), ('Code', {'classes': ('collapse',), 'fields': ('algorithm', 'analyzer')}), ('Backend', {'classes': ('collapse',), 'fields': ('environment', 'queue', 'required_slots', 'channel')}), ('Command', {'classes': ('collapse',), 'fields': ('command',)}))¶
-
media¶
-
-
class
beat.web.experiments.admin.Result(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('id', 'cache', 'name', 'type', 'primary', 'data_value')¶
-
search_fields= ['name', 'cache__hash']¶
-
list_display_links= ('id', 'name')¶
-
has_delete_permission(request, obj=None)[source]¶ Returns True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
has_add_permission(request)[source]¶ Returns True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
media¶
-
-
beat.web.experiments.admin.delete_file_on_fs(modeladmin, request, queryset)[source]¶ Delete the files contained in the cache
-
beat.web.experiments.admin.cascading_delete_file_on_fs(modeladmin, request, queryset)[source]¶ Delete the files contained in the cache
-
class
beat.web.experiments.admin.CachedFile(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
search_fields= ['hash', 'blocks__name', 'blocks__experiment__name']¶
-
list_display= ('id', 'hash', 'status', 'date', 'blocks_url')¶
-
list_display_links= ('id', 'hash')¶
-
list_filter= ('status',)¶
-
raw_id_fields= ('blocks',)¶
-
actions= [<function delete_file_on_fs>, <function cascading_delete_file_on_fs>]¶
-
get_queryset(request)[source]¶ Returns a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.
-
get_actions(request)[source]¶ Return a dictionary mapping the names of all actions for this ModelAdmin to a tuple of (callable, name, description) for each action.
-
fieldsets= ((None, {'fields': ('hash', 'status', 'blocks')}), ('Logging', {'fields': ('error_report', 'stderr', 'stdout')}), ('Performance', {'classes': ('collapse',), 'fields': ('linear_execution_time', 'speed_up_real', 'speed_up_maximal', 'cpu_time', 'max_memory', 'queuing_time', 'data_read_time', 'data_read_size', 'data_read_nb_blocks', 'data_written_time', 'data_written_size', 'data_written_nb_blocks')}))¶
-
readonly_fields= ['blocks']¶
-
has_delete_permission(request, obj=None)[source]¶ Returns True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
has_add_permission(request)[source]¶ Returns True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
media¶
-