Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] dev from KelvinTegelaar:dev #20

Merged
merged 2 commits into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/pages/tenant/tools/tenantlookup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ApiGetCall } from "../../../../api/ApiCall";
const Page = () => {
const formControl = useForm({ mode: "onBlur" });
const domain = useWatch({ control: formControl.control, name: "domain" });
const getGeoIP = ApiGetCall({
const getTenant = ApiGetCall({
url: "/api/ListExternalTenantInfo",
data: { tenant: domain },
queryKey: `tenant-${domain}`,
Expand Down Expand Up @@ -52,7 +52,7 @@ const Page = () => {
<Grid item xs={4}>
<Button
type="submit"
onClick={() => getGeoIP.refetch()}
onClick={() => getTenant.refetch()}
variant="contained"
startIcon={<Search />}
>
Expand All @@ -64,7 +64,7 @@ const Page = () => {
</Grid>

{/* Results Card */}
{getGeoIP.isFetching ? (
{getTenant.isFetching ? (
<Grid item xs={8}>
<CippButtonCard title="Fetching Results">
<Grid container spacing={2}>
Expand All @@ -74,25 +74,25 @@ const Page = () => {
</Grid>
</CippButtonCard>
</Grid>
) : getGeoIP.data ? (
) : getTenant.data ? (
<Grid item xs={8}>
<CippButtonCard title="Geo IP Results">
<CippButtonCard title="Tenant Lookup Results">
<Grid container spacing={2}>
<Grid item xs={6}>
<Typography variant="body1">
<strong>Tenant Name:</strong> {domain}
</Typography>
<Typography variant="body1">
<strong>Tenant Id:</strong> {getGeoIP.data?.GraphRequest?.tenantId}
<strong>Tenant Id:</strong> {getTenant.data?.GraphRequest?.tenantId}
</Typography>
<Typography variant="body1">
<strong>Default Domain Name:</strong>{" "}
{getGeoIP.data?.GraphRequest?.defaultDomainName}
{getTenant.data?.GraphRequest?.defaultDomainName}
</Typography>
<Typography variant="body1">
<strong>Tenant Brand Name :</strong>{" "}
{getGeoIP.data?.GraphRequest?.federationBrandName
? getGeoIP.data?.GraphRequest?.federationBrandName
{getTenant.data?.GraphRequest?.federationBrandName
? getTenant.data?.GraphRequest?.federationBrandName
: "N/A"}
</Typography>
</Grid>
Expand All @@ -101,7 +101,7 @@ const Page = () => {
<strong>domains:</strong>
</Typography>
<Typography variant="body1">
{getGeoIP.data?.Domains?.map((domain) => (
{getTenant.data?.Domains?.map((domain) => (
<li>
<Link href={`https://${domain}`} target="_blank">
{domain}
Expand Down