File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 11<script >
22 import StatusBadge from ' $lib/components/jobs/StatusBadge.svelte' ;
33 import { displayStandardErrorAlert } from ' $lib/common/errors' ;
4+ import { page } from ' $app/stores' ;
45 import Modal from ' ../common/Modal.svelte' ;
56
67 /** @type {{id: number, name: string}[]} */
7374< Modal id= " workflowJobInfoModal" bind: this = {modal} size= " lg" >
7475 < svelte: fragment slot= " header" >
7576 < h1 class = " h5 modal-title flex-grow-1" > Workflow Job #{workflowJobId}< / h1>
76- < button class = " btn btn-light me-3" on: click= {fetchJob}>
77- < i class = " bi-arrow-clockwise" / >
78- < / button>
77+ {#if job && job .user_email === $page .data .userInfo .email && job .project_id !== null }
78+ < button class = " btn btn-light me-3" on: click= {fetchJob}>
79+ < i class = " bi-arrow-clockwise" / >
80+ < / button>
81+ {/ if }
7982 < / svelte: fragment>
8083 < svelte: fragment slot= " body" >
8184 < div class = " row mb-3" >
Original file line number Diff line number Diff line change 1616 export let columnsToHide = [];
1717 /** @type {boolean} */
1818 export let showFilters = true ;
19+ /** @type {boolean} */
20+ export let hideCancelJobButton = false ;
1921
2022 /** @type {JobInfoModal} */
2123 let jobInfoModal;
288290 <i class =" bi-list-columns-reverse" />
289291 Logs
290292 </button >
291- {#if row .project_id !== null }
293+ {#if row .project_id !== null && row . user_email === $page . data . userInfo . email }
292294 <a
293295 class =" btn btn-light"
294296 href ={` /api/v1/project/${row .project_id }/job/${row .id }/download ` }
298300 </a >
299301 {/if }
300302 {/if }
301- {#if row .status === ' running' }
303+ {#if row .status === ' running' && ! hideCancelJobButton }
302304 <button class ="btn btn-danger" on:click ={() => handleJobCancel (row )}>
303305 <i class =" bi-x-circle" /> Cancel
304306 </button >
Original file line number Diff line number Diff line change 359359 < div id= " searchError" class = " mt-3" / >
360360
361361 < div class: d- none= {! searched}>
362- < JobsList {jobUpdater} bind: this = {jobsListComponent} showFilters= {false }>
362+ < JobsList {jobUpdater} bind: this = {jobsListComponent} showFilters= {false } hideCancelJobButton = { true } >
363363 < svelte: fragment slot= " buttons" >
364364 < button class = " btn btn-outline-secondary" on: click= {downloadCSV}>
365365 < i class = " bi-download" / > Download CSV
You can’t perform that action at this time.
0 commit comments