Changed blocked instances to not be linked from instance page (#2121)

Co-authored-by: Beehaw Dev <dev@beehaw.dev>
Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
This commit is contained in:
Security-Chief-Odo 2023-09-12 15:56:22 -05:00 committed by GitHub
parent 5e91a4d9af
commit f9f8233d6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,7 +102,9 @@ export class Instances extends Component<any, InstancesState> {
active: isSelected,
})}
>
{this.itemList(instances[status])}
{status === "blocked"
? this.itemList(instances[status], false)
: this.itemList(instances[status])}
</div>
),
}))}
@ -128,7 +130,7 @@ export class Instances extends Component<any, InstancesState> {
);
}
itemList(items: Instance[]) {
itemList(items: Instance[], link = true) {
return items.length > 0 ? (
<div className="table-responsive">
<table id="instances_table" className="table table-sm table-hover">
@ -143,9 +145,13 @@ export class Instances extends Component<any, InstancesState> {
{items.map(i => (
<tr key={i.domain}>
<td>
<a href={`https://${i.domain}`} rel={relTags}>
{i.domain}
</a>
{link ? (
<a href={`https://${i.domain}`} rel={relTags}>
{i.domain}{" "}
</a>
) : (
<span>{i.domain}</span>
)}
</td>
<td>{i.software}</td>
<td>{i.version}</td>