mirror of
				https://github.com/ClusterCockpit/cc-backend
				synced 2025-11-04 09:35:07 +01:00 
			
		
		
		
	Merge branch 'master' into import-data-sanitation
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
<!-- 
 | 
			
		||||
<!--
 | 
			
		||||
    @component
 | 
			
		||||
 | 
			
		||||
    Properties:
 | 
			
		||||
@@ -31,7 +31,11 @@
 | 
			
		||||
        <span class="fw-bold"><a href="/monitoring/job/{job.id}" target="_blank">{job.jobId}</a> ({job.cluster})</span>
 | 
			
		||||
        {#if job.metaData?.jobName}
 | 
			
		||||
            <br/>
 | 
			
		||||
            {job.metaData.jobName}
 | 
			
		||||
            {#if job.metaData?.jobName.length <= 25}
 | 
			
		||||
                <div>{job.metaData.jobName}</div>
 | 
			
		||||
            {:else}
 | 
			
		||||
                <div class="truncate" style="cursor:help; width:230px;" title={job.metaData.jobName}>{job.metaData.jobName}</div>
 | 
			
		||||
            {/if}
 | 
			
		||||
        {/if}
 | 
			
		||||
        {#if job.arrayJobId}
 | 
			
		||||
            Array Job: <a href="/monitoring/jobs/?arrayJobId={job.arrayJobId}&cluster={job.cluster}" target="_blank">#{job.arrayJobId}</a>
 | 
			
		||||
@@ -48,12 +52,20 @@
 | 
			
		||||
        {/if}
 | 
			
		||||
        {#if job.project && job.project != 'no project'}
 | 
			
		||||
            <br/>
 | 
			
		||||
            <Icon name="people-fill"/> {job.project}
 | 
			
		||||
            <Icon name="people-fill"/> 
 | 
			
		||||
            <a class="fst-italic" href="/monitoring/jobs/?project={job.project}&projectMatch=eq" target="_blank">
 | 
			
		||||
                {scrambleNames ? scramble(job.project) : job.project}
 | 
			
		||||
            </a>
 | 
			
		||||
        {/if}
 | 
			
		||||
    </p>
 | 
			
		||||
 | 
			
		||||
    <p>
 | 
			
		||||
        {job.numNodes} <Icon name="pc-horizontal"/>
 | 
			
		||||
        {#if job.numNodes == 1}
 | 
			
		||||
            {job.resources[0].hostname}
 | 
			
		||||
        {:else}
 | 
			
		||||
            {job.numNodes}
 | 
			
		||||
        {/if}
 | 
			
		||||
        <Icon name="pc-horizontal"/>
 | 
			
		||||
        {#if job.exclusive != 1}
 | 
			
		||||
            (shared)
 | 
			
		||||
        {/if}
 | 
			
		||||
@@ -63,6 +75,8 @@
 | 
			
		||||
        {#if job.numHWThreads > 0}
 | 
			
		||||
            , {job.numHWThreads} <Icon name="cpu"/>
 | 
			
		||||
        {/if}
 | 
			
		||||
        <br/>
 | 
			
		||||
        {job.subCluster}
 | 
			
		||||
    </p>
 | 
			
		||||
 | 
			
		||||
    <p>
 | 
			
		||||
@@ -86,3 +100,11 @@
 | 
			
		||||
        {/each}
 | 
			
		||||
    </p>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<style>
 | 
			
		||||
    .truncate {
 | 
			
		||||
      overflow: hidden;
 | 
			
		||||
      text-overflow: ellipsis;
 | 
			
		||||
      white-space: nowrap;
 | 
			
		||||
    }
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -27,13 +27,14 @@
 | 
			
		||||
    let itemsPerPage = ccconfig.plot_list_jobsPerPage
 | 
			
		||||
    let page = 1
 | 
			
		||||
    let paging = { itemsPerPage, page }
 | 
			
		||||
    let filter = []
 | 
			
		||||
 | 
			
		||||
    const jobs = operationStore(`
 | 
			
		||||
    query($filter: [JobFilter!]!, $sorting: OrderByInput!, $paging: PageRequest! ){
 | 
			
		||||
        jobs(filter: $filter, order: $sorting, page: $paging) {
 | 
			
		||||
            items {
 | 
			
		||||
                id, jobId, user, project, cluster, subCluster, startTime,
 | 
			
		||||
                duration, numNodes, numHWThreads, numAcc, walltime,
 | 
			
		||||
                id, jobId, user, project, jobName, cluster, subCluster, startTime,
 | 
			
		||||
                duration, numNodes, numHWThreads, numAcc, walltime, resources { hostname },
 | 
			
		||||
                SMT, exclusive, partition, arrayJobId,
 | 
			
		||||
                monitoringStatus, state,
 | 
			
		||||
                tags { id, type, name }
 | 
			
		||||
@@ -45,7 +46,7 @@
 | 
			
		||||
    }`, {
 | 
			
		||||
        paging,
 | 
			
		||||
        sorting,
 | 
			
		||||
        filter: []
 | 
			
		||||
        filter,
 | 
			
		||||
    }, {
 | 
			
		||||
        pause: true
 | 
			
		||||
    })
 | 
			
		||||
@@ -68,7 +69,7 @@
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            $jobs.variables.filter = filters
 | 
			
		||||
            console.log('filters:', ...filters.map(f => Object.entries(f)).flat(2))
 | 
			
		||||
            // console.log('filters:', ...filters.map(f => Object.entries(f)).flat(2))
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        page = 1
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user