Skip to content

Commit

Permalink
Merge pull request #3989 from CannonLock/generalize-caches
Browse files Browse the repository at this point in the history
Generalize cache service names for Pelican
  • Loading branch information
matyasselmeci authored Jun 26, 2024
2 parents c2984f6 + 2fa105e commit d18df64
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/templates/iframe.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ will want to adjust the Map.data which populates the select input and legend.
this.isCompute = this.calcIsCompute();
this.isStorage = this.calcIsStorage()
this.isNetwork = this.calcIsNetwork();
this.isOSDFCache = this.calcIsOSDFCache();
this.isOSDFOrigin = this.calcIsOSDFOrigin();
this.isCache = this.calcIsCache();
this.isOrigin = this.calcIsOrigin();
}
calcIsEDU () {
Expand All @@ -327,12 +327,12 @@ will want to adjust the Map.data which populates the select input and legend.
return this.services.some(({Name: name}) => network_services.has(name))
}
calcIsOSDFCache () {
return this.services.some(({Name: name}) => name === "XRootD cache server")
calcIsCache () {
return this.services.some(({Name: name}) => name === "XRootD cache server" || name === "Pelican cache")
}
calcIsOSDFOrigin () {
return this.services.some(({Name: name}) => name === "XRootD origin server")
calcIsOrigin () {
return this.services.some(({Name: name}) => name === "XRootD origin server" || name === "Pelican origin")
}
}
Expand Down Expand Up @@ -390,11 +390,11 @@ will want to adjust the Map.data which populates the select input and legend.
}
} else if(view === "OpenScienceDataFederation") {
if (this.isOSDFOrigin && this.isOSDFCache) {
if (this.isOrigin && this.isCache) {
icon = cacheAndOriginIcon
} else if (this.isOSDFOrigin) {
} else if (this.isOrigin) {
icon = originIcon
} else if (this.isOSDFCache) {
} else if (this.isCache) {
icon = cacheIcon
}
Expand Down Expand Up @@ -493,7 +493,7 @@ will want to adjust the Map.data which populates the select input and legend.
} else if(view === "CCStar"){
return resource.isCCStar
} else if(view === "OpenScienceDataFederation") {
return resource.isOSDFCache || resource.isOSDFOrigin
return resource.isCache || resource.isOrigin
} else if(view === "OSPool"){
return this.resourceIsInOSPool(resource)
}
Expand Down Expand Up @@ -522,12 +522,12 @@ will want to adjust the Map.data which populates the select input and legend.
return Object.values(this.resources).some(x => x.isNetwork)
}
get isOSDFCache() {
return Object.values(this.resources).some(x => x.isOSDFCache)
get isCache() {
return Object.values(this.resources).some(x => x.isCache)
}
get isOSDFOrigin(){
return Object.values(this.resources).some(x => x.isOSDFOrigin)
get isOrigin(){
return Object.values(this.resources).some(x => x.isOrigin)
}
get isOSPool () {
Expand Down

0 comments on commit d18df64

Please sign in to comment.