Skip to content

Commit

Permalink
Merge pull request #764 from AI4Bharat/master
Browse files Browse the repository at this point in the history
dev2 to master
  • Loading branch information
ishvindersethi22 authored Jul 26, 2024
2 parents 7b68448 + 26793c4 commit ad0755b
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Deploy
on:
push:
branches:
- master
- develop2
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
Expand All @@ -19,7 +19,7 @@ jobs:
npm install --legacy-peer-deps
npm run build
env:
REACT_APP_APIGW_BASE_URL: ${{ vars.REACT_APP_APIGW_BASE_URL }}
REACT_APP_APIGW_BASE_URL: ${{ vars.DEV__REACT_APP_APIGW_BASE_URL }}
CI: false

- name: Deploy 🚀
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Dev Environment - Build and Release React App
name: Prod Environment - Build and Release React App

on:
push:
branches: [develop2]
branches: [master]

env:
CI: false
NODE_OPTIONS: "--max_old_space_size=4096"
REACT_APP_APIGW_BASE_URL: ${{ vars.DEV__REACT_APP_APIGW_BASE_URL }}
AZURE_STORAGE_ACCOUNT_NAME: ${{ vars.DEV__AZURE_STORAGE_ACCOUNT_NAME }}
AZURE_STORAGEKEY: ${{ secrets.DEV__AZURE_STORAGEKEY }}
AZURE_CDN_PROFILE: ${{ vars.DEV__AZURE_CDN_PROFILE }}
AZURE_ENDPOINT_NAME: ${{ vars.DEV__AZURE_ENDPOINT_NAME }}
AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }}
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:
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Azure login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDS }}
creds: ${{ secrets.PROD_AZURE_CREDS }}

- name: Upload to blob storage
uses: azure/CLI@v1
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 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
2 changes: 1 addition & 1 deletion src/config/apiendpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const endpoints = {
task: "/task/",

//Transliteration
transliteration: "/api/generic/transliteration",
transliteration: "/api/generic/transliteration/",

//Glossary
glossary: "/glossary/",
Expand Down
38 changes: 37 additions & 1 deletion src/containers/Organization/Project/VideoList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const VideoList = ({ data, removeVideo }) => {
const [videoIdForDowload, setVideoIdForDowload] = useState("");
const [videoName, setVideoName] = useState("");
const [orgOwnerId, setOrgOwnerId] = useState("");
const [viewListColumns, setViewListColumns] = useState([]);

const userData = useSelector((state) => state.getLoggedInUserDetails.data);
const apiStatus = useSelector((state) => state.apiStatus);
Expand Down Expand Up @@ -111,6 +112,15 @@ const VideoList = ({ data, removeVideo }) => {
// eslint-disable-next-line
}, [apiStatus]);

useEffect(() => {
const data = localStorage.getItem("videoColDisplayFilter");
if(data){
setViewListColumns(JSON.parse(data));
}else{
setViewListColumns(videoListColumns);
}
}, []);

const handleVideoDialog = (item) => {
setOpen(true);
setCurrentVideoDetails([item]);
Expand Down Expand Up @@ -280,6 +290,29 @@ const VideoList = ({ data, removeVideo }) => {
);
};

function toggleDisplayExclude(label) {
return viewListColumns.map(column => {
if (column.name === label) {
if (column.options && column.options.display === "exclude") {
const { display, ...restOptions } = column.options;
return {
...column,
options: restOptions,
};
} else {
return {
...column,
options: {
...column.options,
display: "exclude",
},
};
}
}
return column;
});
}

const options = {
textLabels: {
body: {
Expand Down Expand Up @@ -319,14 +352,17 @@ const VideoList = ({ data, removeVideo }) => {
<VideoStatusTable headers={expandableTableHeader} status={rowData[4]} />
);
},
onViewColumnsChange: (changedColumn) => {
localStorage.setItem("videoColDisplayFilter", JSON.stringify(toggleDisplayExclude(changedColumn)));
},
};

return (
<>
<ThemeProvider theme={tableTheme}>
<MUIDataTable
data={result}
columns={getColumns(videoListColumns)}
columns={getColumns(viewListColumns)}
options={options}
/>
</ThemeProvider>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Organization/Video/RightPanel.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useCallback, useEffect, useState, useRef, memo } from "react";
import { IndicTransliterate } from "indic-transliterate";
import { IndicTransliterate } from "@ai4bharat/indic-transliterate";
import { useDispatch, useSelector } from "react-redux";
import { useNavigate, useParams } from "react-router-dom";
import subscript from "config/subscript";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
MenuItem,
useMediaQuery,
} from "@mui/material";
import { IndicTransliterate } from "indic-transliterate";
import { IndicTransliterate } from "@ai4bharat/indic-transliterate";
import ButtonComponent from "./components/ButtonComponent";
import SettingsButtonComponent from "./components/SettingsButtonComponent";
import Pagination from "./components/Pagination";
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Organization/Video/VoiceOverRightPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Box, CardContent, Grid, Typography } from "@mui/material";
import SettingsButtonComponent from "./components/SettingsButtonComponent";
import ButtonComponent from "./components/ButtonComponent";
import Pagination from "./components/Pagination";
import { IndicTransliterate } from "indic-transliterate";
import { IndicTransliterate } from "@ai4bharat/indic-transliterate";
import subscript from "config/subscript";
import superscriptMap from "config/superscript";
import {
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Organization/Video/VoiceOverRightPanel1.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import TaskAltIcon from "@mui/icons-material/TaskAlt";
import { Box, CardContent, CircularProgress, Grid, IconButton, Menu, Tooltip, Typography } from "@mui/material";
import SettingsButtonComponent from "./components/SettingsButtonComponent";
import Pagination from "./components/Pagination";
import { IndicTransliterate } from "indic-transliterate";
import { IndicTransliterate } from "@ai4bharat/indic-transliterate";
import subscript from "config/subscript";
import superscriptMap from "config/superscript";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ const SettingsButtonComponent = ({
</>
)}

{!taskData?.task_type?.includes("VOICEOVER") && (
<>
<Tooltip title="Merge Next" placement="bottom">
<IconButton
className={classes.rightPanelBtnGrp}
Expand Down Expand Up @@ -210,6 +212,8 @@ const SettingsButtonComponent = ({
<SplitscreenIcon className={classes.rightPanelSvg} />
</IconButton>
</Tooltip>
</>)
}

<Tooltip title="Expand Timestamp" placement="bottom">
<IconButton
Expand Down

0 comments on commit ad0755b

Please sign in to comment.