Skip to content

Commit

Permalink
Merge Split Branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Automatic preview publish committed Aug 20, 2024
2 parents e27e9bd + 7028e4e commit 4853283
Show file tree
Hide file tree
Showing 5 changed files with 1,494 additions and 1,416 deletions.
105 changes: 98 additions & 7 deletions preview-pr-page/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ <h1 class="text-center">
const elasticSearch = new ElasticSearchQuery(SUMMARY_INDEX, ENDPOINT)

async function getUsage(){
let usageQueryResult = await elasticSearch.search({
let voUsageQueryResult = await elasticSearch.search({
size: 0,
query: {
bool: {
Expand All @@ -1530,6 +1530,7 @@ <h1 class="text-center">
}
}
}
// Filter out all documents that have a VOName that is not cms, igwn, gluex, or dune
]
},
},
Expand Down Expand Up @@ -1560,9 +1561,9 @@ <h1 class="text-center">
}
})

let projectBuckets = usageQueryResult.aggregations.projects.buckets
let voProjectBuckets = voUsageQueryResult.aggregations.projects.buckets

let usage = projectBuckets.reduce((p, v) => {
let voUsage = voProjectBuckets.reduce((p, v) => {
p[v['key']] = {
cpuHours: Math.floor(v['projectCpuUse']['value']),
cpu: v['projectCpuUse']['value'] != 0,
Expand All @@ -1573,14 +1574,74 @@ <h1 class="text-center">
return p
}, {})

console.log(usage)

return usage
let projectUsageQueryResult = await elasticSearch.search({
size: 0,
query: {
bool: {
filter: [
{
term: {ResourceType: "Payload"}
},
{
range: {
EndTime: {
lte: DATE_RANGE['now'],
gte: DATE_RANGE['oneYearAgo']
}
}
}
]
},
},
aggs: {
projects: {
"terms": {
field: "ProjectName",
size: 99999999
},
aggs: {
projectCpuUse: {
sum: {
field: "CoreHours"
}
},
projectGpuUse: {
sum: {
field: "GPUHours"
}
},
projectJobsRan: {
sum: {
field: "Njobs"
}
}
}
}
}
})

let projectProjectBuckets = projectUsageQueryResult.aggregations.projects.buckets

let projectUsage = projectProjectBuckets.reduce((p, v) => {
p[v['key']] = {
cpuHours: Math.floor(v['projectCpuUse']['value']),
cpu: v['projectCpuUse']['value'] != 0,
gpuHours: Math.floor(v['projectGpuUse']['value']),
gpu: v['projectGpuUse']['value'] != 0,
jobs: Math.floor(v['projectJobsRan']['value'])
}
return p
}, {})

console.log(projectUsage, voUsage)

return {...projectUsage, ...voUsage}
}

function updateCollaborationUsageValues() {
let usages = getUsage()
let collaborations = [{"name":"REDTOP","ids":["REDTOP"]},{"name":"IceCube","ids":["IceCube"]},{"name":"IGWN","ids":["LIGO","ligo","IGWN_Staff"]},{"name":"South Pole Telescope","ids":["spt.all"]},{"name":"Xenon","ids":["xenon"]},{"name":"Future Colliders","ids":["snowmass21.futurecolliders"]},{"name":"KOTO","ids":["KOTO"]},{"name":"CLAS12","ids":["CLAS12"]},{"name":"GLUEX","ids":["gluex","GLUEX"]},{"name":"EIC","ids":["EIC"]},{"name":"MOLLER","ids":["MOLLER"]},{"name":"DUNE","ids":["dune"]},{"name":"EHT","ids":["eht"]},{"name":"ePIC","ids":["ePIC"]},{"name":"CMS","ids":["cms"]}]
let collaborations = [{"name":"REDTOP","ids":["REDTOP"]},{"name":"IceCube","ids":["icecube"]},{"name":"IGWN","ids":["ligo"]},{"name":"South Pole Telescope","ids":["spt.all"]},{"name":"Xenon","ids":["xenon"]},{"name":"Future Colliders","ids":["snowmass21","snowmass21.futurecolliders","snowmass21.energy","snowmass21.en-prod"]},{"name":"KOTO","ids":["KOTO"]},{"name":"CLAS12","ids":["CLAS12"]},{"name":"GLUEX","ids":["gluex","GLUEX"]},{"name":"EIC","ids":["EIC"]},{"name":"MOLLER","ids":["MOLLER"]},{"name":"DUNE","ids":["dune"]},{"name":"EHT","ids":["eht"]},{"name":"ePIC","ids":["ePIC"]},{"name":"CMS","ids":["cms"]},{"name":"ATLAS","ids":["ATLAS","atlas"]}]

// Using the usages object get all the usages for the collaborations
// each collaboration has a list of ids that should be summed for final usage
Expand Down Expand Up @@ -1626,9 +1687,15 @@ <h1 class="text-center">
</h1>
<p class="text-center text-secondary fs-5">
Scientific collaborations from across the globe rely upon HTCSS to advance their research.
Statistics from these pools generated in the last 365 days.
</p>
</div>
<div class="container pb-2">
<div class="row justify-content-center">
<div class="col-auto">
Statistics from these pools generated in the last 365 days.
</div>
</div>
</div>
<div class="container-xxl pb-5">
<div class="row justify-content-center gx-1 gy-1">

Expand Down Expand Up @@ -1992,6 +2059,30 @@ <h4 class="text-center fw-bold">
</div>
</div>

<div class="col-3 d-flex">
<div class="rounded bg-white p-2 flex-grow w-100 d-flex flex-column shadow">
<div>
<h4 class="text-center fw-bold">
ATLAS
</h4>
</div>
<div class="mb-auto">
<div class="d-flex justify-content-between">
<div class="text-end">
<div id="ATLAS-jobs" class="fs-3">Loading</div>
<div id="ATLAS-cpu" class="fs-3">Loading</div>
<div id="ATLAS-gpu" class="fs-3 ATLAS-gpu">Loading</div>
</div>
<div class="text-end flex-grow">
<div class="fs-6 d-flex" style="height: 47px"><span class="ms-auto my-auto">Jobs</span></div>
<div class="fs-6 d-flex" style="height: 47px"><span class="ms-auto my-auto">CPU Core Hours</span></div>
<div class="fs-6 ATLAS-gpu" style="height: 47px; display: flex;"><span class="ms-auto my-auto">GPU Hours</span></div>
</div>
</div>
</div>
</div>
</div>

</div>
</div>

Expand Down
Binary file added preview-pr-page/assets/images/filler_image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview-pr-page/assets/images/filler_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 17 additions & 30 deletions preview-pr-page/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,6 @@ <h5><a class="text-decoration-none" href="/web-preview/preview-pr-page/descripti









Expand Down Expand Up @@ -1665,41 +1662,31 @@ <h3>Junior researchers advance black hole research with OSPool open capacity</h3
</div>
<div class="mb-3 bg-light">
<div class="container-xxl">
<h4 class="p-5 text-center">HTCondor Software Suite (HTCSS) provides an array of services for automating and managing High Throughput workloads and computing capacity.</h4>
<h4 class="py-4 px-5 text-center">HTCondor Software Suite (HTCSS) provides an array of services for automating and managing High Throughput workloads and computing capacity.</h4>
</div>
</div>
<div class="container-xxl">
<div class="row">
<div class="col-12 col-md-6 col-lg-4 mb-4 order-lg-1 order-3 d-none d-lg-block">
<div class="col-12 col-md-6 col-lg-4 mb-4 order-lg-2 order-3">
<div class="h-100">




<div>
<a href="/web-preview/preview-pr-page/featured-users/2024-06-13-noaa-on-the-ospool.html">
<div class="card h-100">

<img alt="NOAA Sonar Banner" src="https://raw.githubusercontent.com/CHTC/Articles/main/images/noaa-banner.png" class="card-img-top">

<div class="card-body border-top">
<h3><a class="text-decoration-none" href="/web-preview/preview-pr-page/featured-users/2024-06-13-noaa-on-the-ospool.html">NOAA funded marine scientist uses OSPool access to high throughput computing to explode her boundaries of research</a></h3>
<div>
<span class="text-muted">June 13, 2024</span>
</div>
<hr/>
<p>
NOAA funded marine scientist uses OSPool access to high throughput computing to explode her boundaries of research.

</p>
</div>
</div>
</a>
<div class="card h-100 shadow-lg border-secondary border-3">
<div class="card-body border-top bg-light">
<h3>
<a class="text-decoration-none" href="/web-preview/preview-pr-page/about">
HTCSS' Impact
</a>
<hr/>
</h3>
<p>
View HTCSS' impact on the world of computing and the projects that have adopted it across the globe.
</p>
<a class="btn btn-secondary" href="/web-preview/preview-pr-page/about">Read About HTCSS' Impact</a>
</div>

<img height="200" alt="Filler Image" src="/web-preview/preview-pr-page/assets/images/filler_image.jpg" class="card-img-bottom">
</div>
</div>
</div>
<div class="col-12 col-md-6 col-lg-4 mb-4 order-lg-2 order-2">
<div class="col-12 col-md-6 col-lg-4 mb-4 order-lg-1 order-2 d-none d-lg-block">



Expand Down
Loading

0 comments on commit 4853283

Please sign in to comment.