Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarika-padmanaban committed Jul 26, 2024
2 parents 34bee6e + b405f9d commit 1f6dece
Show file tree
Hide file tree
Showing 29 changed files with 1,422 additions and 225 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/deploy-prod-azure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Prod Environment - Build and Release React App

on:
push:
branches: [master]

env:
CI: false
NODE_OPTIONS: "--max_old_space_size=4096"
REACT_APP_APIGW_BASE_URL: ${{ vars.PROD__REACT_APP_APIGW_BASE_URL }}
AZURE_STORAGE_ACCOUNT_NAME: ${{ vars.PROD__AZURE_STORAGE_ACCOUNT_NAME }}
AZURE_STORAGEKEY: ${{ secrets.PROD__AZURE_STORAGEKEY }}
AZURE_CDN_PROFILE: ${{ vars.PROD__AZURE_CDN_PROFILE }}
AZURE_ENDPOINT_NAME: ${{ vars.PROD__AZURE_ENDPOINT_NAME }}
AZURE_RESOURCE_GROUP: ${{ vars.PROD__AZURE_RESOURCE_GROUP }}

jobs:
cicd:
name: DEV__CICD
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v2

- name: Install NPM packages
run: npm install --legacy-peer-deps

- name: Build project
run: npm run build

- name: Azure login
uses: azure/login@v1
with:
creds: ${{ secrets.PROD_AZURE_CREDS }}

- name: Upload to blob storage
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob upload-batch --account-name ${{ env.AZURE_STORAGE_ACCOUNT_NAME }} --account-key ${{ env.AZURE_STORAGEKEY }} -d '$web' -s ./build --overwrite
- name: Purge CDN endpoint
uses: azure/CLI@v1
with:
inlineScript: |
az cdn endpoint purge --no-wait --content-paths "/*" --profile-name ${{ env.AZURE_CDN_PROFILE }} --name ${{ env.AZURE_ENDPOINT_NAME }} --resource-group ${{ env.AZURE_RESOURCE_GROUP }}
- name: Azure logout
run: |
az logout
if: always()
216 changes: 169 additions & 47 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@ai4bharat/indic-transliterate": "^1.3.2",
"@ai4bharat/indic-transliterate": "^1.3.6",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@mui/icons-material": "^5.10.6",
Expand Down Expand Up @@ -42,6 +42,7 @@
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.4.1",
"styled-components": "^6.1.11",
"web-vitals": "^2.1.4",
"wfplayer": "^2.2.5"
},
Expand Down
29 changes: 19 additions & 10 deletions src/common/ExportDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ import {
FormControlLabel,
IconButton,
Radio,
Checkbox,
RadioGroup,
Typography,
FormGroup,
} from "@mui/material";
import CloseIcon from "@mui/icons-material/Close";
import { speakerInfoOptions, bgMusicOptions } from "config";
Expand All @@ -27,6 +29,7 @@ const ExportDialog = ({
exportTypes,
handleExportSubmitClick,
handleExportRadioButtonChange,
handleExportCheckboxChange,
isBulkTaskDownload,
currentSelectedTasks,
}) => {
Expand Down Expand Up @@ -83,37 +86,43 @@ const ExportDialog = ({
{currentTaskType?.includes("TRANSCRIPTION") ? (
<DialogActions sx={{ mb: 1, mt: 1 }}>
<FormControl>
<RadioGroup row>
<FormGroup row>
{transcriptExportTypes?.map((item, index) => (
<FormControlLabel
key={index}
value={item}
control={<Radio />}
checked={transcription === item}
control={
<Checkbox
checked={transcription.includes(item)}
onChange={(event) => handleExportCheckboxChange(event)}
/>
}
label={item}
name="transcription"
onClick={(event) => handleExportRadioButtonChange(event)}
/>
))}
</RadioGroup>
</FormGroup>
</FormControl>
</DialogActions>
) : currentTaskType?.includes("TRANSLATION") && task_type !== "VO" ? (
<DialogActions sx={{ mb: 1, mt: 1 }}>
<FormControl>
<RadioGroup row>
<FormGroup row>
{translationExportTypes?.map((item, index) => (
<FormControlLabel
key={index}
value={item}
control={<Radio />}
checked={translation === item}
control={
<Checkbox
checked={translation.includes(item)}
onChange={(event) => handleExportCheckboxChange(event)}
/>
}
label={item}
name="translation"
onClick={(event) => handleExportRadioButtonChange(event)}
/>
))}
</RadioGroup>
</FormGroup>
</FormControl>
</DialogActions>
) : (
Expand Down
Loading

0 comments on commit 1f6dece

Please sign in to comment.