Skip to content

Commit

Permalink
Integrated workbox with database w/ proper entities instead of JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
mlhaufe committed Oct 1, 2024
1 parent 417a55f commit 9baaecf
Show file tree
Hide file tree
Showing 126 changed files with 2,202 additions and 549 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/azure-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
nuxtAuthTenantId="${{ secrets.NUXT_AUTH_TENANT_ID }}"
nuxtAuthAuthorityDomain="${{ secrets.NUXT_AUTH_AUTHORITY_DOMAIN }}"
nuxtAuthPrimaryUserFlow="${{ secrets.NUXT_AUTH_PRIMARY_USER_FLOW }}"
nuxtAzureOpenaiApiKey="${{ secrets.NUXT_AZURE_OPENAI_API_KEY }}"
nuxtAzureOpenaiApiVersion="${{ secrets.NUXT_AZURE_OPENAI_API_VERSION }}",
nuxtAzureOpenaiEndpoint="${{ secrets.NUXT_AZURE_OPENAI_ENDPOINT }}"
scope: 'resourcegroup'
deploymentMode: 'Incremental'
failOnStdErr: false
Expand Down Expand Up @@ -99,6 +102,9 @@ jobs:
echo "SLACK_ADMIN_MEMBER_ID=${{secrets.SLACK_ADMIN_MEMBER_ID}}" >> .env
echo "SLACK_BOT_TOKEN=${{secrets.SLACK_BOT_TOKEN}}" >> .env
echo "SLACK_SIGNING_SECRET=${{secrets.SLACK_SIGNING_SECRET}}" >> .env
echo "NUXT_AZURE_OPENAI_API_KEY=${{secrets.NUXT_AZURE_OPENAI_API_KEY}}" >> .env
echo "NUXT_AZURE_OPENAI_API_VERSION=${{secrets.NUXT_AZURE_OPENAI_API_VERSION}}" >> .env
echo "NUXT_AZURE_OPENAI_ENDPOINT=${{secrets.NUXT_AZURE_OPENAI_ENDPOINT}}" >> .env
- name: Build Application
run: npm run build
- name: Generate PWA Assets
Expand Down Expand Up @@ -152,6 +158,9 @@ jobs:
nuxtAuthTenantId="${{ secrets.NUXT_AUTH_TENANT_ID }}"
nuxtAuthAuthorityDomain="${{ secrets.NUXT_AUTH_AUTHORITY_DOMAIN }}"
nuxtAuthPrimaryUserFlow="${{ secrets.NUXT_AUTH_PRIMARY_USER_FLOW }}"
nuxtAzureOpenaiApiKey="${{ secrets.NUXT_AZURE_OPENAI_API_KEY }}"
nuxtAzureOpenaiApiVersion="${{ secrets.NUXT_AZURE_OPENAI_API_VERSION }}",
nuxtAzureOpenaiEndpoint="${{ secrets.NUXT_AZURE_OPENAI_ENDPOINT }}"
scope: 'resourcegroup'
failOnStdErr: false
- name: logout
Expand Down Expand Up @@ -220,6 +229,9 @@ jobs:
echo "SLACK_ADMIN_MEMBER_ID=${{secrets.SLACK_ADMIN_MEMBER_ID}}" >> .env
echo "SLACK_BOT_TOKEN=${{secrets.SLACK_BOT_TOKEN}}" >> .env
echo "SLACK_SIGNING_SECRET=${{secrets.SLACK_SIGNING_SECRET}}" >> .env
echo "NUXT_AZURE_OPENAI_API_KEY=${{secrets.NUXT_AZURE_OPENAI_API_KEY}}" >> .env
echo "NUXT_AZURE_OPENAI_API_VERSION=${{secrets.NUXT_AZURE_OPENAI_API_VERSION}}" >> .env
echo "NUXT_AZURE_OPENAI_ENDPOINT=${{secrets.NUXT_AZURE_OPENAI_ENDPOINT}}" >> .env
- name: Login to Azure
uses: azure/login@v2
with:
Expand Down
9 changes: 9 additions & 0 deletions azure/bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ param nuxtAuthTenantId string
param nuxtAuthAuthorityDomain string
@secure()
param nuxtAuthPrimaryUserFlow string
@secure()
param nuxtAzureOpenaiApiKey string
@secure()
param nuxtAzureOpenaiApiVersion string
@secure()
param nuxtAzureOpenaiEndpoint string

module appInsights './modules/appInsights.bicep' = {
name: 'appInsights'
Expand Down Expand Up @@ -91,5 +97,8 @@ module appService './modules/appService.bicep' = {
nuxtAuthTenantName: nuxtAuthTenantName
nuxtOrigin: nuxtOrigin
nuxtSessionPassword: nuxtSessionPassword
nuxtAzureOpenaiApiKey: nuxtAzureOpenaiApiKey
nuxtAzureOpenaiApiVersion: nuxtAzureOpenaiApiVersion
nuxtAzureOpenaiEndpoint: nuxtAzureOpenaiEndpoint
}
}
18 changes: 18 additions & 0 deletions azure/bicep/modules/appService.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ param nuxtAuthTenantId string
param nuxtAuthAuthorityDomain string
@secure()
param nuxtAuthPrimaryUserFlow string
@secure()
param nuxtAzureOpenaiApiKey string
@secure()
param nuxtAzureOpenaiApiVersion string
@secure()
param nuxtAzureOpenaiEndpoint string

resource appServicePlan 'Microsoft.Web/serverfarms@2023-12-01' = {
name: toLower('plan-${name}')
Expand Down Expand Up @@ -179,6 +185,18 @@ resource appService 'Microsoft.Web/sites@2023-12-01' = {
name: 'NUXT_AUTH_PRIMARY_USER_FLOW'
value: nuxtAuthPrimaryUserFlow
}
{
name: 'NUXT_AZURE_OPENAI_API_KEY'
value: nuxtAzureOpenaiApiKey
}
{
name: 'NUXT_AZURE_OPENAI_API_VERSION'
value: nuxtAzureOpenaiApiVersion
}
{
name: 'NUXT_AZURE_OPENAI_ENDPOINT'
value: nuxtAzureOpenaiEndpoint
}
]
}
}
Expand Down
13 changes: 6 additions & 7 deletions components/WorkboxDataView.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
<script lang="ts" setup>
import type { Requirement } from '~/server/domain/requirements/Requirement';
import type { ParsedRequirement } from '~/server/domain/requirements/ParsedRequirement.js';
type RowType = { type: string; id: string; name: string; }
const props = defineProps<{
parsedRequirements: {
id: string,
jsonResult: {
[type: string]: RowType[]
}
},
parsedRequirement: ParsedRequirement,
onApprove: (parentId: string, itemId: string) => Promise<void>,
onReject: (parentId: string, itemId: string) => Promise<void>
}>()
const confirm = useConfirm()
const requirements = Object.values(props.parsedRequirements.jsonResult)
const requirements: Requirement[][] = Object.values(props.parsedRequirement).filter(Array.isArray)
const onReject = (parentId: string, item: RowType) => new Promise<void>((resolve, _reject) => {
confirm.require({
Expand Down Expand Up @@ -45,12 +42,14 @@ const onReject = (parentId: string, item: RowType) => new Promise<void>((resolve
</template>
<Column v-for="col of Object.keys(requirements[0])" :key="col" :field="col" :header="col">
</Column>
<!--
<Column header="Actions" frozen align-frozen="right">
<template #body="{ data }">
<Button icon="pi pi-eye" class="text rounded mr-2" />
<Button icon="pi pi-trash" text rounded severity="danger" />
</template>
</Column>
-->
</DataTable>
</div>
</template>
Expand Down
Loading

0 comments on commit 9baaecf

Please sign in to comment.