Skip to content

Commit

Permalink
- Extended statement field size
Browse files Browse the repository at this point in the history
- updated bicep+pipeline env vars
- updated workbox schema for display
- added API defaults for priorities
  • Loading branch information
mlhaufe committed Oct 1, 2024
1 parent 9baaecf commit df08679
Show file tree
Hide file tree
Showing 21 changed files with 203 additions and 79 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/azure-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ jobs:
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 }}"
nuxtAzureOpenaiEndpoint="${{ secrets.NUXT_AZURE_OPENAI_ENDPOINT }}",
nuxtAzureOpenaiDeploymentId="${{ secrets.NUXT_AZURE_OPENAI_DEPLOYMENT_ID }}"
scope: 'resourcegroup'
deploymentMode: 'Incremental'
failOnStdErr: false
Expand Down Expand Up @@ -105,6 +106,7 @@ jobs:
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
echo "NUXT_AZURE_OPENAI_DEPLOYMENT_ID=${{secrets.NUXT_AZURE_OPENAI_DEPLOYMENT_ID}}" >> .env
- name: Build Application
run: npm run build
- name: Generate PWA Assets
Expand Down Expand Up @@ -160,7 +162,8 @@ jobs:
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 }}"
nuxtAzureOpenaiEndpoint="${{ secrets.NUXT_AZURE_OPENAI_ENDPOINT }}",
nuxtAzureOpenaiDeploymentId="${{ secrets.NUXT_AZURE_OPENAI_DEPLOYMENT_ID }}"
scope: 'resourcegroup'
failOnStdErr: false
- name: logout
Expand Down Expand Up @@ -232,6 +235,7 @@ jobs:
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
echo "NUXT_AZURE_OPENAI_DEPLOYMENT_ID=${{secrets.NUXT_AZURE_OPENAI_DEPLOYMENT_ID}}" >> .env
- name: Login to Azure
uses: azure/login@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions azure/bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ param nuxtAzureOpenaiApiKey string
param nuxtAzureOpenaiApiVersion string
@secure()
param nuxtAzureOpenaiEndpoint string
@secure()
param nuxtAzureOpenaiDeploymentId string

module appInsights './modules/appInsights.bicep' = {
name: 'appInsights'
Expand Down Expand Up @@ -100,5 +102,6 @@ module appService './modules/appService.bicep' = {
nuxtAzureOpenaiApiKey: nuxtAzureOpenaiApiKey
nuxtAzureOpenaiApiVersion: nuxtAzureOpenaiApiVersion
nuxtAzureOpenaiEndpoint: nuxtAzureOpenaiEndpoint
nuxtAzureOpenaiDeploymentId: nuxtAzureOpenaiDeploymentId
}
}
6 changes: 6 additions & 0 deletions azure/bicep/modules/appService.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ param nuxtAzureOpenaiApiKey string
param nuxtAzureOpenaiApiVersion string
@secure()
param nuxtAzureOpenaiEndpoint string
@secure()
param nuxtAzureOpenaiDeploymentId string

resource appServicePlan 'Microsoft.Web/serverfarms@2023-12-01' = {
name: toLower('plan-${name}')
Expand Down Expand Up @@ -197,6 +199,10 @@ resource appService 'Microsoft.Web/sites@2023-12-01' = {
name: 'NUXT_AZURE_OPENAI_ENDPOINT'
value: nuxtAzureOpenaiEndpoint
}
{
name: 'NUXT_AZURE_OPENAI_DEPLOYMENT_ID'
value: nuxtAzureOpenaiDeploymentId
}
]
}
}
Expand Down
18 changes: 11 additions & 7 deletions components/WorkboxDataView.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts" setup>
import type { Requirement } from '~/server/domain/requirements/Requirement';
import type { ParsedRequirement } from '~/server/domain/requirements/ParsedRequirement.js';
import type { ParsedRequirement } from '~/server/domain/requirements/ParsedRequirement';
type RowType = { type: string; id: string; name: string; }
type RowType = { id: string; name: string; }
const props = defineProps<{
parsedRequirement: ParsedRequirement,
Expand All @@ -12,7 +12,11 @@ const props = defineProps<{
const confirm = useConfirm()
const requirements: Requirement[][] = Object.values(props.parsedRequirement).filter(Array.isArray)
type RequirementType = { type: string, items: Requirement[] }
const requirements: RequirementType[] = Object.entries(props.parsedRequirement)
.filter(([_, value]) => Array.isArray(value) && value.length > 0)
.map(([key, value]) => ({ type: key, items: value as Requirement[] }))
const onReject = (parentId: string, item: RowType) => new Promise<void>((resolve, _reject) => {
confirm.require({
Expand All @@ -32,15 +36,15 @@ const onReject = (parentId: string, item: RowType) => new Promise<void>((resolve
<template>
<ConfirmDialog></ConfirmDialog>
<DataView :value="requirements" :data-key="undefined">
<template #list="{ items }">
<template #list="{ items }: { items: RequirementType[] }">
<div v-for="(requirements, index) in items" :key="index" :value="requirements">
<DataTable :value="requirements">
<DataTable :value="requirements.items">
<template #header>
<div class="flex flex-wrap align-items-center justify-content-between gap-2">
<span class="text-xl text-900 font-bold">{{ requirements[0].type }}</span>
<span class="text-xl text-900 font-bold">{{ requirements.type }}</span>
</div>
</template>
<Column v-for="col of Object.keys(requirements[0])" :key="col" :field="col" :header="col">
<Column v-for="col of Object.keys(requirements.items[0])" :key="col" :field="col" :header="col">
</Column>
<!--
<Column header="Actions" frozen align-frozen="right">
Expand Down
Loading

0 comments on commit df08679

Please sign in to comment.