Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f98a604
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 8, 2025
e177370
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 8, 2025
0edda49
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 8, 2025
4b6fffc
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 8, 2025
fff4916
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 9, 2025
d828d26
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 9, 2025
cc90855
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 9, 2025
f8ec962
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 9, 2025
eb98a71
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 10, 2025
197158f
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 10, 2025
9ec3c13
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 10, 2025
672c1a6
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 10, 2025
5435979
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 11, 2025
58f8fec
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 11, 2025
d5278e5
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 11, 2025
b18be7c
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 11, 2025
8bfc98a
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 11, 2025
13895fa
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 11, 2025
7c7c400
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 11, 2025
5415390
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 11, 2025
c4665da
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 12, 2025
b06e571
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 12, 2025
878b083
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 12, 2025
dc38064
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 12, 2025
d946b8e
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 12, 2025
5c09a58
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 12, 2025
33ec325
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 12, 2025
a78e56d
Clean up control of clearing data #869
cugarteblair Dec 15, 2025
c528ea0
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 16, 2025
1ff5f65
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 16, 2025
200beb8
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 17, 2025
d624045
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 17, 2025
028fb98
cleanup
cugarteblair Dec 17, 2025
5df42df
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 17, 2025
917b881
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 17, 2025
72dd0ad
Add OAuth-2 login via GitHub to query SlideRuleEarth membership #866
cugarteblair Dec 17, 2025
3f0f1ac
cleanup
cugarteblair Dec 18, 2025
cb85d27
cleanup - stub out login for now
cugarteblair Dec 18, 2025
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
1 change: 1 addition & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
BASE_URL=http://localhost:5173

1 change: 1 addition & 0 deletions .env.prod
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
BASE_URL=https://client.slideruleearth.io

1 change: 0 additions & 1 deletion .env.test

This file was deleted.

10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# compiled output
**/dist

# Python
**/__pycache__/
**/*.pyc
**/*.pyo
**/global-s3-assets
**/regional-s3-assets
**/open-source
Expand All @@ -25,7 +30,7 @@ witch.zip
# misc
**/npm-debug.log
**/testem.log
**/.env
**/.env*
# package-lock.json
**/.vscode/settings.json
**/setenv.sh
Expand Down Expand Up @@ -68,6 +73,9 @@ override.tf.json
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

# Infracost cache
.infracost/

# Playwright
node_modules/
/test-results/
Expand Down
Binary file removed .infracost/pricing.gob
Binary file not shown.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ verify-s3-assets-testsliderule:


live-update-testsliderule: ## Update the web client at testsliderule.org with new build
make live-update S3_BUCKET=testsliderule-webclient DOMAIN_APEX=testsliderule.org DOMAIN=testsliderule.org
make live-update S3_BUCKET=testsliderule-webclient DOMAIN_APEX=testsliderule.org DOMAIN=testsliderule.org

# live-update-demo-dot-slideruleearth: ## Update the web client at demo.slideruleearth.io with new build
# make live-update S3_BUCKET=slideruleearth-demo-dot DOMAIN_APEX=slideruleearth.io DOMAIN=demo.slideruleearth.io

live-update-client-dot-slideruleearth: ## Update the web client at client.slideruleearth.io with new build
make live-update S3_BUCKET=slideruleearth-webclient-dot DOMAIN_APEX=slideruleearth.io DOMAIN=client.slideruleearth.io
make live-update S3_BUCKET=slideruleearth-webclient-dot DOMAIN_APEX=slideruleearth.io DOMAIN=client.slideruleearth.io

convert-icons: ## Convert Maki SVG icons in src/assets/maki-svg to PNGs in public/icons
@echo "🔄 Converting Maki SVG icons to PNGs..."
Expand Down Expand Up @@ -124,13 +124,13 @@ destroy: # Destroy the web client

deploy-client-to-testsliderule: ## Deploy the web client to the testsliderule.org cloudfront and update the s3 bucket
make deploy DOMAIN=testsliderule.org S3_BUCKET=testsliderule-webclient && \
make live-update DOMAIN=testsliderule.org S3_BUCKET=testsliderule-webclient DOMAIN_APEX=testsliderule.org
make live-update DOMAIN=testsliderule.org S3_BUCKET=testsliderule-webclient DOMAIN_APEX=testsliderule.org

destroy-client-testsliderule: ## Destroy the web client from the testsliderule.org cloudfront and remove the S3 bucket
make destroy DOMAIN=testsliderule.org S3_BUCKET=testsliderule-webclient DOMAIN_APEX=testsliderule.org

release-live-update-to-testsliderule: src-tag-and-push ## Release the web client to the live environment NEEDS VERSION
make live-update DOMAIN=testsliderule.org S3_BUCKET=testsliderule-webclient DOMAIN_APEX=testsliderule.org
make live-update DOMAIN=testsliderule.org S3_BUCKET=testsliderule-webclient DOMAIN_APEX=testsliderule.org

# deploy-client-to-demo-dot-slideruleearth: ## Deploy the web client to the demo.slideruleearth.io cloudfront and update the s3 bucket
# make deploy DOMAIN=demo.slideruleearth.io S3_BUCKET=slideruleearth-demo-dot DOMAIN_APEX=slideruleearth.io && \
Expand Down Expand Up @@ -222,7 +222,8 @@ check-vars:
@echo " DOMAIN_APEX = $(DOMAIN_APEX)"
@echo " S3_BUCKET = $(S3_BUCKET)"
@echo " DISTRIBUTION_ID = $(DISTRIBUTION_ID)"



help: ## That's me!
@printf "\033[37m%-30s\033[0m %s\n" "#-----------------------------------------------------------------------------------------"
@printf "\033[37m%-30s\033[0m %s\n" "# Makefile Help "
Expand Down
37 changes: 21 additions & 16 deletions web-client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { useRecTreeStore } from '@/stores/recTreeStore'
import { useRoute } from 'vue-router'
import SrClearCache from '@/components/SrClearCache.vue'
import { useSysConfigStore } from '@/stores/sysConfigStore'
import { useJwtStore } from '@/stores/SrJWTStore'
import { useLegacyJwtStore } from '@/stores/SrLegacyJwtStore'
import { useAuthDialogStore } from '@/stores/authDialogStore'
import { useGoogleApiKeyStore } from '@/stores/googleApiKeyStore'
import SrJsonDisplayDialog from '@/components/SrJsonDisplayDialog.vue'
Expand All @@ -30,6 +30,8 @@ import { useTourStore } from '@/stores/tourStore.js'
import { useViewportHeight } from '@/composables/useViewportHeight'
import { useSlideruleDefaults } from '@/stores/defaultsStore'
import { createLogger } from '@/utils/logger'
import { usePrivacyConsentStore } from '@/stores/privacyConsentStore'
import SrConsentBanner from '@/components/SrConsentBanner.vue'

const logger = createLogger('App')

Expand All @@ -39,9 +41,10 @@ const toast = useToast()
const deviceStore = useDeviceStore()
const tourStore = useTourStore()
const sysConfigStore = useSysConfigStore()
const jwtStore = useJwtStore()
const legacyJwtStore = useLegacyJwtStore()
const authDialogStore = useAuthDialogStore()
const googleApiKeyStore = useGoogleApiKeyStore()
const privacyConsentStore = usePrivacyConsentStore()
const route = useRoute()

// Global login dialog state
Expand All @@ -66,16 +69,16 @@ const checkUnsupported = () => {
}

const checkPrivateClusterAuth = () => {
const domain = sysConfigStore.getDomain()
const org = sysConfigStore.getOrganization()
const domain = sysConfigStore.domain
const org = sysConfigStore.cluster

// Skip check for public cluster
if (org === 'sliderule') {
return
}

// Check if user has valid credentials for this private cluster
const jwt = jwtStore.getCredentials()
const jwt = legacyJwtStore.getCredentials()
if (!jwt) {
toast.add({
severity: 'warn',
Expand All @@ -89,10 +92,10 @@ const checkPrivateClusterAuth = () => {
}

async function fetchOrgInfo(): Promise<void> {
const psHost = `https://ps.${sysConfigStore.getDomain()}`
const psHost = `https://ps.${sysConfigStore.domain}`
try {
const response = await authenticatedFetch(
`${psHost}/api/org_num_nodes/${sysConfigStore.getOrganization()}/`,
`${psHost}/api/org_num_nodes/${sysConfigStore.cluster}/`,
{
method: 'GET',
headers: {
Expand All @@ -105,10 +108,10 @@ async function fetchOrgInfo(): Promise<void> {
if (response.ok) {
const result = await response.json()
logger.debug('fetchOrgInfo result', { result })
sysConfigStore.setMinNodes(result.min_nodes)
sysConfigStore.setCurrentNodes(result.current_nodes)
sysConfigStore.setMaxNodes(result.max_nodes)
sysConfigStore.setVersion(result.version)
sysConfigStore.min_nodes = result.min_nodes
sysConfigStore.current_nodes = result.current_nodes
sysConfigStore.max_nodes = result.max_nodes
sysConfigStore.version = result.version
} else {
logger.error('Failed to fetch org info', { status: response.status })
}
Expand All @@ -120,8 +123,8 @@ async function fetchOrgInfo(): Promise<void> {
}

async function handleGlobalLogin(): Promise<void> {
const orgName = sysConfigStore.getOrganization()
const psHost = `https://ps.${sysConfigStore.getDomain()}`
const orgName = sysConfigStore.cluster
const psHost = `https://ps.${sysConfigStore.domain}`
logger.debug('handleGlobalLogin', { username: loginUsername.value, orgName })

const body = JSON.stringify({
Expand All @@ -145,7 +148,7 @@ async function handleGlobalLogin(): Promise<void> {
refreshToken: result.refresh,
expiration: result.expiration
}
jwtStore.setJwt(sysConfigStore.getDomain(), sysConfigStore.getOrganization(), jwt)
legacyJwtStore.setJwt(sysConfigStore.domain, sysConfigStore.cluster, jwt)
await fetchOrgInfo()
toast.add({
severity: 'success',
Expand Down Expand Up @@ -180,7 +183,7 @@ async function handleGlobalLogin(): Promise<void> {
}

async function resetToPublicCluster() {
jwtStore.clearAllJwts()
legacyJwtStore.clearAllJwts()
sysConfigStore.$reset()
loginUsername.value = ''
loginPassword.value = ''
Expand Down Expand Up @@ -348,6 +351,7 @@ onMounted(async () => {
checkUnsupported()
checkPrivateClusterAuth()
tourStore.checkSeen()
privacyConsentStore.initializeOnStartup()
await nextTick()

if (!tourStore.hasSeenIntro) {
Expand Down Expand Up @@ -694,6 +698,7 @@ async function handleLongTourButtonClick() {
<div class="sliderule-content">
<RouterView />
</div>
<SrConsentBanner />

<!-- Dialog for displaying version information -->
<Dialog
Expand Down Expand Up @@ -834,7 +839,7 @@ async function handleLongTourButtonClick() {
>
<form class="sr-global-login-form" @submit.prevent="handleGlobalLogin">
<p class="sr-login-org-info">
Logging in to: <strong>{{ sysConfigStore.getOrganization() }}</strong>
Logging in to: <strong>{{ sysConfigStore.cluster }}</strong>
</p>
<div class="sr-login-field">
<label for="global-username">Username</label>
Expand Down
Loading