add host list

This commit is contained in:
Nicholas Orlowsky 2023-07-09 22:14:37 -04:00
parent e491b99b53
commit d1f552e8a5
3 changed files with 27 additions and 10 deletions

View file

@ -45,14 +45,23 @@ export default function DashboardPage() {
<h3>{e.serviceName}</h3>
<p><b>Application Id</b></p>
<p>{e.serviceId}</p>
<a onClick={async ()=> {
let rawSession: string | null = localStorage.getItem("session_key");
{e.hostnames.map((host)=>{
return (
<div className={"mb-2 p-2"}>
<a href={host.hostname}>{host.hostname}</a>
{host.isSslEnabled ? <a onClick={async () => {
let rawSession: string | null = localStorage.getItem("session_key");
if (rawSession != null) {
let session: SessionKey = JSON.parse(rawSession);
await enableSSL(account!.id!, e.serviceId, session);
}
}}>Enable SSL</a> : <p>SSL is enabled!</p>
}
</div>
)
})}
if(rawSession != null) {
let session: SessionKey = JSON.parse(rawSession);
await enableSSL(account!.id!, e.serviceId, session);
}
}}>Enable SSL</a>
</div>
</div>);
})}

View file

@ -48,12 +48,19 @@ export type Account = {
status?: string
};
export type Host = {
serviceId: string,
isSslEnabled: boolean,
hostname: string
};
export type Service = {
serviceId: string,
serviceName: string,
namespace: string,
containerUrl: string,
ownerId: string
ownerId: string,
hostnames: Host[]
}
export type ApiError = {