Merge branch 'done'

This commit is contained in:
Nicholas Orlowsky 2023-07-09 18:23:49 -04:00
commit 14bc65ae4e
4 changed files with 25 additions and 5 deletions

View file

@ -3,7 +3,9 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="03fafda4-e2c1-4602-a731-a2f96e84badd" name="Default Changelist" comment=""> <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$/.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/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> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -33,7 +35,10 @@
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent"> <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="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
<property name="vue.rearranger.settings.migration" value="true" />
</component> </component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
@ -65,6 +70,7 @@
<workItem from="1673378530233" duration="327000" /> <workItem from="1673378530233" duration="327000" />
<workItem from="1673538703809" duration="6147000" /> <workItem from="1673538703809" duration="6147000" />
<workItem from="1674698447115" duration="249000" /> <workItem from="1674698447115" duration="249000" />
<workItem from="1688939993548" duration="1130000" />
</task> </task>
<servers /> <servers />
</component> </component>

View file

@ -1,4 +1,4 @@
import {Account, Namespace, Service} from "../nws-api/types"; import {Account, Namespace, Service, SessionKey} from "../nws-api/types";
import { import {
useGetAccountNamespaces, useGetAccountNamespaces,
useGetAccountServices, useGetAccountServices,
@ -7,6 +7,7 @@ import {
useNWSAccount useNWSAccount
} from "../nws-api/hooks"; } from "../nws-api/hooks";
import {useState} from "react"; import {useState} from "react";
import {enableSSL} from "../nws-api/calls";
export default function DashboardPage() { export default function DashboardPage() {
@ -44,6 +45,14 @@ export default function DashboardPage() {
<h3>{e.serviceName}</h3> <h3>{e.serviceName}</h3>
<p><b>Application Id</b></p> <p><b>Application Id</b></p>
<p>{e.serviceId}</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>
</div>); </div>);
})} })}

View file

@ -27,10 +27,6 @@ function Layout (props: {children: any}) {
return ( return (
<div> <div>
<header className={"w-100 sticky-top"}> <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"}> <div className={"w-100"}>
<Navbar sticky={"top"} expand="lg" className={"row justify-content-center m-0 p-0"} style={{backgroundColor: "#eee"}}> <Navbar sticky={"top"} expand="lg" className={"row justify-content-center m-0 p-0"} style={{backgroundColor: "#eee"}}>
<div className={"row w-100"}> <div className={"row w-100"}>

View file

@ -49,3 +49,12 @@ export async function getNamespaces(accountId: string, skey: SessionKey): Promis
let namespaces: Namespace[] = await response.json(); let namespaces: Namespace[] = await response.json();
return namespaces; 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"
});
}