add host list
This commit is contained in:
parent
e491b99b53
commit
d1f552e8a5
|
@ -3,7 +3,8 @@
|
|||
<component name="ChangeListManager">
|
||||
<list default="true" id="03fafda4-e2c1-4602-a731-a2f96e84badd" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/nws-api/calls.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/nws-api/calls.ts" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/components/DashboardPage.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/DashboardPage.tsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/nws-api/types.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/nws-api/types.ts" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -68,7 +69,7 @@
|
|||
<workItem from="1673378530233" duration="327000" />
|
||||
<workItem from="1673538703809" duration="6147000" />
|
||||
<workItem from="1674698447115" duration="249000" />
|
||||
<workItem from="1688939993548" duration="2065000" />
|
||||
<workItem from="1688939993548" duration="2649000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
|
|
@ -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 ()=> {
|
||||
{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) {
|
||||
if (rawSession != null) {
|
||||
let session: SessionKey = JSON.parse(rawSession);
|
||||
await enableSSL(account!.id!, e.serviceId, session);
|
||||
}
|
||||
}}>Enable SSL</a>
|
||||
}}>Enable SSL</a> : <p>SSL is enabled!</p>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
|
||||
</div>
|
||||
</div>);
|
||||
})}
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue