controllers

package
v0.0.0-...-b94456c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: BSD-2-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbortWithErrorHTML

func AbortWithErrorHTML(c *gin.Context, status int, err error)

func AbortWithErrorJSON

func AbortWithErrorJSON(c *gin.Context, status int, err error)

func AbortWithErrorModal

func AbortWithErrorModal(c *gin.Context, status int, err error)

func AboutShow

func AboutShow(c *gin.Context)

GET /about

func AlreadySelectedTargets

func AlreadySelectedTargets(job *core.Job) []string

func AppSettingDelete

func AppSettingDelete(c *gin.Context)

DELETE /app_settings/delete/:id POST /app_settings/delete/:id

func AppSettingEdit

func AppSettingEdit(c *gin.Context)

GET /app_settings/edit/:id

func AppSettingIndex

func AppSettingIndex(c *gin.Context)

GET /app_settings

func AppSettingNew

func AppSettingNew(c *gin.Context)

GET /app_settings/new

func AppSettingSave

func AppSettingSave(c *gin.Context)

PUT /app_settings/edit/:id POST /app_settings/edit/:id POST /app_settings/new

func BagItProfileCreate

func BagItProfileCreate(c *gin.Context)

BagItProfileCreate creates a new Profile. Handles submission of new Profile form. POST /profiles/new

func BagItProfileCreateTagFile

func BagItProfileCreateTagFile(c *gin.Context)

POST /profiles/new_tag_file/:profile_id

func BagItProfileDelete

func BagItProfileDelete(c *gin.Context)

PUT /profiles/delete/:id POST /profiles/delete/:id

func BagItProfileDeleteTag

func BagItProfileDeleteTag(c *gin.Context)

POST /profiles/delete_tag/:profile_id/:tag_id PUT /profiles/delete_tag/:profile_id/:tag_id

func BagItProfileDeleteTagFile

func BagItProfileDeleteTagFile(c *gin.Context)

POST /profiles/delete_tag_file/:profile_id PUT /profiles/delete_tag_file/:profile_id

func BagItProfileEdit

func BagItProfileEdit(c *gin.Context)

GET /profiles/edit/:id

func BagItProfileEditTag

func BagItProfileEditTag(c *gin.Context)

GET /profiles/edit_tag/:profile_id/:tag_id

func BagItProfileExport

func BagItProfileExport(c *gin.Context)

GET /profiles/export/:id

func BagItProfileImport

func BagItProfileImport(c *gin.Context)

POST /profiles/import

func BagItProfileImportStart

func BagItProfileImportStart(c *gin.Context)

GET /profiles/import_start

func BagItProfileIndex

func BagItProfileIndex(c *gin.Context)

GET /profiles

func BagItProfileNew

func BagItProfileNew(c *gin.Context)

GET /profiles/new

func BagItProfileNewTag

func BagItProfileNewTag(c *gin.Context)

GET /profiles/new_tag/:profile_id/:tag_file

func BagItProfileNewTagFile

func BagItProfileNewTagFile(c *gin.Context)

GET /profiles/new_tag_file/:profile_id

func BagItProfileSave

func BagItProfileSave(c *gin.Context)

PUT /profiles/edit/:id POST /profiles/edit/:id

func BagItProfileSaveTag

func BagItProfileSaveTag(c *gin.Context)

POST /profiles/edit_tag/:profile_id/:tag_id PUT /profiles/edit_tag/:profile_id/:tag_id

func DashboardGetReport

func DashboardGetReport(c *gin.Context)

DashboardGetReport returns a report from a remote repository. This is an AJAX call. We want the dashboard page to display first, and then we'll load and display these reports as they become available.

Params are RemoteRepoID and ReportName.

GET /dashboard/report

func DashboardShow

func DashboardShow(c *gin.Context)

DashboardShow shows the DART dashboard. This is essentially DART's homepage.

GET /

func DefaultTemplateData

func DefaultTemplateData(c *gin.Context) gin.H

func ExportSettingsIndex

func ExportSettingsIndex(c *gin.Context)

ExportSettingsIndex displays a list of ExportSettings objects.

GET /settings/export

func GetAvailableUploadTargets

func GetAvailableUploadTargets(selectedTargets []string) ([]core.Choice, error)

func GetDirList

func GetDirList(dirname string) ([]*util.ExtendedFileInfo, error)

func GetFlashCookie

func GetFlashCookie(c *gin.Context) string

func GetHelpUrl

func GetHelpUrl(c *gin.Context) string

func GetJobAndDirList

func GetJobAndDirList(jobId, dirname string) (*core.Job, []*util.ExtendedFileInfo, error)

func GetParentDir

func GetParentDir(dirName string) (string, string)

func GetUploadTargetsForm

func GetUploadTargetsForm(job *core.Job) (*core.Form, error)

func InitFileChooser

func InitFileChooser(c *gin.Context) (gin.H, error)

func InternalSettingIndex

func InternalSettingIndex(c *gin.Context)

GET /internal_settings

func JobAddFile

func JobAddFile(c *gin.Context)

POST /jobs/add_file/:id

func JobAddTag

func JobAddTag(c *gin.Context)

GET /jobs/add_tag/:id

func JobArtifactShow

func JobArtifactShow(c *gin.Context)

GET /jobs/artifact/:id

func JobArtifactsList

func JobArtifactsList(c *gin.Context)

GET /jobs/artifacts/list/:job_id

func JobDelete

func JobDelete(c *gin.Context)

PUT /jobs/delete/:id POST /jobs/delete/:id

func JobDeleteFile

func JobDeleteFile(c *gin.Context)

POST /jobs/delete_file/:id

func JobDeleteTag

func JobDeleteTag(c *gin.Context)

POST /jobs/delete_tag/:id

func JobIndex

func JobIndex(c *gin.Context)

GET /jobs

func JobNew

func JobNew(c *gin.Context)

GET /jobs/new

func JobRunExecute

func JobRunExecute(c *gin.Context)

GET /jobs/run/:id

By REST standards, this should be a POST. However, the Server Sent Events standard for JavaScript only supports GET, so GET it is.

func JobRunShow

func JobRunShow(c *gin.Context)

GET /jobs/summary/:id

func JobSaveMetadata

func JobSaveMetadata(c *gin.Context)

POST /jobs/metadata/:id

func JobSavePackaging

func JobSavePackaging(c *gin.Context)

POST /jobs/packaging/:id

func JobSaveTag

func JobSaveTag(c *gin.Context)

POST /jobs/add_tag/:id

func JobSaveUpload

func JobSaveUpload(c *gin.Context)

POST /jobs/upload/:id

func JobShowFiles

func JobShowFiles(c *gin.Context)

GET /jobs/files/:id

func JobShowJson

func JobShowJson(c *gin.Context)

JobShowJson displays a job's raw JSON data. Note that this mimics JobArtifactShow and even uses the same template. This method converts the Job JSON into a mock artifact to simplify the front-end display. We do not save the mock artifact because job records belong only in the dart table, not in the artifacts table.

GET /jobs/show_json/:id

func JobShowMetadata

func JobShowMetadata(c *gin.Context)

GET /jobs/metadata/:id

func JobShowPackaging

func JobShowPackaging(c *gin.Context)

GET /jobs/packaging/:id

func JobShowUpload

func JobShowUpload(c *gin.Context)

GET /jobs/upload/:id

func OpenDataFolder

func OpenDataFolder(c *gin.Context)

GET /open_data_folder

func OpenExternalUrl

func OpenExternalUrl(c *gin.Context)

GET /open_external This is an AJAX call. TODO: Make context-sensitive. Go to the right page!

func OpenLog

func OpenLog(c *gin.Context)

GET /open_log

func OpenLogFolder

func OpenLogFolder(c *gin.Context)

GET /open_log_folder

func RemoteRepositoryDelete

func RemoteRepositoryDelete(c *gin.Context)

GET /remote_repositories/delete/:id POST /remote_repositories/delete/:id

func RemoteRepositoryEdit

func RemoteRepositoryEdit(c *gin.Context)

GET /remote_repositories/edit/:id

func RemoteRepositoryIndex

func RemoteRepositoryIndex(c *gin.Context)

GET /remote_repositories

func RemoteRepositoryNew

func RemoteRepositoryNew(c *gin.Context)

GET /remote_repositories/new

func RemoteRepositorySave

func RemoteRepositorySave(c *gin.Context)

PUT /remote_repositories/edit/:id POST /remote_repositories/edit/:id POST /remote_repositories/new

func RemoteRepositoryTestConnection

func RemoteRepositoryTestConnection(c *gin.Context)

RemoteRepositoryTestConnection tests a connection to a remote repository, so user can be sure they have everything configured correctly.

POST /remote_repositories/test/:id

func SetFlashCookie

func SetFlashCookie(c *gin.Context, message string)

func SettingsExportDelete

func SettingsExportDelete(c *gin.Context)

SettingsExportDelete deletes the ExportSettings record with the specified ID.

POST /settings/export/delete/:id

func SettingsExportDeleteQuestion

func SettingsExportDeleteQuestion(c *gin.Context)

SettingsExportDeleteQuestion deletes a question from ExportSettings.

POST /settings/export/questions/delete/:settings_id/:question_id

func SettingsExportEdit

func SettingsExportEdit(c *gin.Context)

SettingsExportEdit shows a form on which user can edit the specified ExportSettings.

GET /settings/export/edit/:id

func SettingsExportEditQuestion

func SettingsExportEditQuestion(c *gin.Context)

SettingsExportEditQuestion shows a form to edit a question from ExportSettings.

GET /settings/export/questions/edit/:settings_id/:question_id

func SettingsExportNew

func SettingsExportNew(c *gin.Context)

SettingsExportNew creates a new ExportSettings object and then redirects to the edit form.

GET /settings/export/new

func SettingsExportNewQuestion

func SettingsExportNewQuestion(c *gin.Context)

SettingsExportNewQuestion show a new, empty question form. The front end displays this in a modal dialog.

GET /settings/export/questions/new/:id

func SettingsExportSave

func SettingsExportSave(c *gin.Context)

SettingsExportSave saves ExportSettings.

POST /settings/export/save/:id

func SettingsExportSaveQuestion

func SettingsExportSaveQuestion(c *gin.Context)

SettingsExportSaveQuestion saves questions attached to the specified ExportSettings object.

POST /settings/export/questions/:id

func SettingsExportShowJson

func SettingsExportShowJson(c *gin.Context)

SettingsExportShowJson shows the JSON representation of an ExportSettings object. This is the value a user will copy to share settings with others.

GET /settings/export/show_json/:id

func SettingsImportAnswers

func SettingsImportAnswers(c *gin.Context)

SettingsImportAnswers receives the user's answers to settings questions and applies them to the proper objects and fields before saving the settings.

POST /settings/import/answers

func SettingsImportRun

func SettingsImportRun(c *gin.Context)

SettingsImportRun actually runs the import, saving whatever export settings are submitted in the form or fetched from the URL.

If the settings include questions, the user will have to answer those before we actually do the import.

POST /settings/import

func SettingsImportShow

func SettingsImportShow(c *gin.Context)

SettingsImportShow shows a form on which user can specify a URL from which to import settings, or a blob of JSON to be imported directly.

GET /settings/import

func ShowFileChooser

func ShowFileChooser(c *gin.Context)

GET /files/choose

func StorageServiceDelete

func StorageServiceDelete(c *gin.Context)

GET /storage_services/delete/:id POST /storage_services/delete/:id

func StorageServiceEdit

func StorageServiceEdit(c *gin.Context)

GET /storage_services/edit/:id

func StorageServiceIndex

func StorageServiceIndex(c *gin.Context)

GET /storage_services

func StorageServiceNew

func StorageServiceNew(c *gin.Context)

GET /storage_services/new

func StorageServiceSave

func StorageServiceSave(c *gin.Context)

PUT /storage_services/edit/:id POST /storage_services/edit/:id POST /storage_services/new

func StorageServiceTestConnection

func StorageServiceTestConnection(c *gin.Context)

POST /storage_services/test/:id

func TagErrorsExist

func TagErrorsExist(tags []*core.TagDefinition) bool

func UploadJobAddFile

func UploadJobAddFile(c *gin.Context)

POST /upload_jobs/add_file/:id

func UploadJobDeleteFile

func UploadJobDeleteFile(c *gin.Context)

POST /upload_jobs/delete_file/:id

func UploadJobNew

func UploadJobNew(c *gin.Context)

GET /upload_jobs/new

func UploadJobReview

func UploadJobReview(c *gin.Context)

GET /upload_jobs/review/:id

func UploadJobRun

func UploadJobRun(c *gin.Context)

GET /upload_jobs/run/:id

By REST standards, this should be a POST. However, the Server Send Events standard for JavaScript only supports GET.

func UploadJobSaveTarget

func UploadJobSaveTarget(c *gin.Context)

POST /upload_jobs/targets/:id

func UploadJobShowFiles

func UploadJobShowFiles(c *gin.Context)

GET /upload_jobs/files/:id

func UploadJobShowTargets

func UploadJobShowTargets(c *gin.Context)

GET /upload_jobs/targets/:id

func ValidateTagValue

func ValidateTagValue(tagDef *core.TagDefinition) string

func ValidationJobAddFile

func ValidationJobAddFile(c *gin.Context)

POST /validation_jobs/add_file/:id

func ValidationJobDeleteFile

func ValidationJobDeleteFile(c *gin.Context)

POST /validation_jobs/delete_file/:id

func ValidationJobNew

func ValidationJobNew(c *gin.Context)

GET /validation_jobs/new

func ValidationJobReview

func ValidationJobReview(c *gin.Context)

GET /validation_jobs/review/:id

func ValidationJobRun

func ValidationJobRun(c *gin.Context)

GET /validation_jobs/run/:id

By REST standards, this should be a POST. However, the Server Send Events standard for JavaScript only supports GET.

func ValidationJobSaveProfile

func ValidationJobSaveProfile(c *gin.Context)

POST /validation_jobs/profiles/:id

func ValidationJobShowFiles

func ValidationJobShowFiles(c *gin.Context)

GET /validation_jobs/files/:id

func ValidationJobShowProfiles

func ValidationJobShowProfiles(c *gin.Context)

GET /validation_jobs/profiles/:id

func WorkflowBatchValidate

func WorkflowBatchValidate(c *gin.Context)

POST /workflows/batch/validate

func WorkflowCreateFromJob

func WorkflowCreateFromJob(c *gin.Context)

WorkflowCreateFromJob creates a new Workflow. Handles submission of new Workflow form. POST /workflows/from_job/:jobId

func WorkflowDelete

func WorkflowDelete(c *gin.Context)

PUT /workflows/delete/:id POST /workflows/delete/:id

func WorkflowEdit

func WorkflowEdit(c *gin.Context)

GET /workflows/edit/:id

func WorkflowExport

func WorkflowExport(c *gin.Context)

GET /workflows/export/:id

func WorkflowIndex

func WorkflowIndex(c *gin.Context)

GET /workflows

func WorkflowNew

func WorkflowNew(c *gin.Context)

GET /workflow/new

func WorkflowRun

func WorkflowRun(c *gin.Context)

POST /workflows/run/:id

func WorkflowRunBatch

func WorkflowRunBatch(c *gin.Context)

GET /workflows/batch/run

func WorkflowSave

func WorkflowSave(c *gin.Context)

PUT /workflows/edit/:id POST /workflows/edit/:id

func WorkflowShowBatchForm

func WorkflowShowBatchForm(c *gin.Context)

GET /workflows/batch/choose

Types

type DashboardReport

type DashboardReport struct {
	RepositoryID      string `json:"repositoryId"`
	RepositoryName    string `json:"repositoryName"`
	ReportName        string `json:"reportName"`
	ReportDescription string `json:"reportDescription"`
}

type JobListItem

type JobListItem struct {
	Job       *core.Job
	Artifacts []core.NameIDPair
}

type Pager

type Pager struct {
	TotalItems       int
	ItemsInResultSet int
	ItemFirst        int
	ItemLast         int
	Page             int
	PerPage          int
	QueryOffset      int
	PreviousLink     string
	NextLink         string
	URL              *url.URL
}

func NewPager

func NewPager(c *gin.Context, baseURL string, defaultPerPage int) (*Pager, error)

func (*Pager) SetCounts

func (pager *Pager) SetCounts(totalItems, itemsInResultSet int)

type Request

type Request struct {
	Action         string
	Errors         []error
	Handler        string
	ObjType        string
	Path           string
	PathAndQuery   string
	QueryResult    *core.QueryResult
	IsListResponse bool
	TemplateData   gin.H
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest(c *gin.Context) *Request

func (*Request) HasErrors

func (r *Request) HasErrors() bool

func (*Request) QueryParamAsInt

func (r *Request) QueryParamAsInt(paramName string, defaultValue int) int

type TagFileForms

type TagFileForms struct {
	Name   string
	Fields []*core.Field
}

This struct holds all the tag form inputs for a tag file. This is used on the metadata page.

func GetTagFileForms

func GetTagFileForms(job *core.Job, withErrors bool) []TagFileForms

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL