Skip to content

Only use the simplified Git fields

https://redmine.teklia.com/issues/5720

The simplified fields for Git repos and revisions introduced in backend#1775 (closed) must be used exclusively, and not the old fields that are being deleted in backend#1805 (closed).

  • Update the Worker, WorkerVersion, WorkerRun, CreateWorkerVersionPayload and ListWorkersParameters TypeScript types

  • Update the isWorker type guard to use repository_url

  • Remove the RevisionWithRefs and GitRef types

  • Remove the GitRefType enum

  • Remove the GIT_REF_COLORS constant in config.ts

  • Rename REVISION_STATE_COLORS to WORKER_VERSION_STATE_COLORS

  • Display truncated version IDs instead of revision hashes in the filter bar, just like what we do in WorkerRun summaries in the backend

  • Update src/components/Process/Workers/Versions/Details.vue

    • Remove the hasRevision, refsCount, shortHash computed properties
    • Remove the Author and References rows
    • Remove the is-uid CSS class
    • Add a Tag row which shows the version's tag or a em-dash
    • The Commit row is renamed Revision and its link opens the revision_url
  • Update src/components/Process/Workers/Versions/List.vue and Row.vue

    • When there is a revision URL, the columns are now ID, Revision, Created, State, Actions. The Revision column shows the clickable URL, truncated using CSS so it will at most fill up the table without going on multiple lines.
    • When there is a version number, the columns are now ID, Version, Created, State, Actions
  • Update src/components/Process/Workers/Versions/Summary.vue

    • When there is a revision URL, show the clickable URL, truncated using CSS
  • Update WorkerRunDetails.vue

    • Remove the refsClass method
    • The Git revision is now renamed Revision and shows a clickable truncated URL
  • Update src/views/Process/Workers/Version.vue

    • Remove the shortHash computed property
    • Remove the Author and References rows
    • Rename the Commit field to Revision and have it show a clickable, non-truncated URL
  • Update src/views/Process/Workers/Manage.vue

    • Add a new Repository field displaying the repository_url as a clickable URL
  • Update src/components/Process/Workers/Versions/CreateForm.vue

    • Update repository_id to repository_url in the repo check.
    • Creating worker versions on workers with repo URLs is still forbidden from the frontend, even though it might be allowed by the API.
Edited by Erwan Rouchet