Merge branch 'done'
This commit is contained in:
commit
14bc65ae4e
|
@ -3,7 +3,9 @@
|
|||
<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/components/DashboardPage.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/DashboardPage.tsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/index.tsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/nws-api/calls.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/nws-api/calls.ts" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -33,7 +35,10 @@
|
|||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="nodejs_package_manager_path" value="npm" />
|
||||
<property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
|
||||
<property name="vue.rearranger.settings.migration" value="true" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
|
@ -65,6 +70,7 @@
|
|||
<workItem from="1673378530233" duration="327000" />
|
||||
<workItem from="1673538703809" duration="6147000" />
|
||||
<workItem from="1674698447115" duration="249000" />
|
||||
<workItem from="1688939993548" duration="1130000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Account, Namespace, Service} from "../nws-api/types";
|
||||
import {Account, Namespace, Service, SessionKey} from "../nws-api/types";
|
||||
import {
|
||||
useGetAccountNamespaces,
|
||||
useGetAccountServices,
|
||||
|
@ -7,6 +7,7 @@ import {
|
|||
useNWSAccount
|
||||
} from "../nws-api/hooks";
|
||||
import {useState} from "react";
|
||||
import {enableSSL} from "../nws-api/calls";
|
||||
|
||||
|
||||
export default function DashboardPage() {
|
||||
|
@ -44,6 +45,14 @@ 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");
|
||||
|
||||
if(rawSession != null) {
|
||||
let session: SessionKey = JSON.parse(rawSession);
|
||||
await enableSSL(account!.id!, e.serviceId, session);
|
||||
}
|
||||
}}>Enable SSL</a>
|
||||
</div>
|
||||
</div>);
|
||||
})}
|
||||
|
|
|
@ -27,10 +27,6 @@ function Layout (props: {children: any}) {
|
|||
return (
|
||||
<div>
|
||||
<header className={"w-100 sticky-top"}>
|
||||
<div className={"w-100 d-flex justify-content-center align-content-center text-center p-1 "} style={{backgroundColor: "#004C54", height: 30}} >
|
||||
<p className={"text-white fw-bold"}>Fly Eagles Fly</p>
|
||||
<img src={"https://logos-world.net/wp-content/uploads/2020/05/Philadelphia-Eagles-Logo.png"} style={{maxHeight: "100%", maxWidth: "100%"}}/>
|
||||
</div>
|
||||
<div className={"w-100"}>
|
||||
<Navbar sticky={"top"} expand="lg" className={"row justify-content-center m-0 p-0"} style={{backgroundColor: "#eee"}}>
|
||||
<div className={"row w-100"}>
|
||||
|
|
|
@ -49,3 +49,12 @@ export async function getNamespaces(accountId: string, skey: SessionKey): Promis
|
|||
let namespaces: Namespace[] = await response.json();
|
||||
return namespaces;
|
||||
}
|
||||
|
||||
export async function enableSSL(accountId: string, serviceId: string, skey: SessionKey) {
|
||||
await fetch('https://api-nws.nickorlow.com/'+accountId+'/services/'+serviceId+"/ssl", {
|
||||
headers: {
|
||||
Authorization: skey.id
|
||||
},
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue