diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18726222..c253005d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: App build on: push: branches: - - "build" + - "update-value-multiple-cells" defaults: run: @@ -49,7 +49,7 @@ jobs: - name: Install Pareto locally working-directory: ../ - run: git clone https://github.com/project-pareto/project-pareto.git && cd project-pareto && git fetch --all --tags && git checkout 0.9.0rc0 && pip install --progress-bar off . + run: git clone https://github.com/project-pareto/project-pareto.git && cd project-pareto && git fetch --all --tags && git checkout 0.9.0rc1 && pip install --progress-bar off . - name: Install numpy 1.24.3 run: | @@ -69,7 +69,7 @@ jobs: - name: Sign Windows Distribution run: | - AzureSignTool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v electron/dist/ParetoUI-23.10.06-win64.exe + AzureSignTool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v electron/dist/ParetoUI-23.11.02-win64.exe - name: Upload artifact for windows build uses: actions/upload-artifact@v3 @@ -77,7 +77,7 @@ jobs: with: name: windows-pareto-dist path: | - electron/dist/ParetoUI-23.10.06-win64.exe + electron/dist/ParetoUI-23.11.02-win64.exe # windows-build: # name: Windows Build @@ -126,4 +126,4 @@ jobs: # with: # name: windows-pareto-dist # path: | - # electron/dist/ParetoUI-23.10.06-win64.exe \ No newline at end of file + # electron/dist/ParetoUI-23.11.02-win64.exe \ No newline at end of file diff --git a/electron/package.json b/electron/package.json index 3f63ac48..8d43c041 100644 --- a/electron/package.json +++ b/electron/package.json @@ -1,6 +1,6 @@ { "name": "pareto-ui", - "version": "23.10.06", + "version": "23.11.02", "author": "Michael Pesce", "private": true, "main": "build/main.js", @@ -74,10 +74,10 @@ "nsis": { "oneClick": false, "allowToChangeInstallationDirectory": true, - "artifactName": "ParetoUI-23.10.06-win64.exe" + "artifactName": "ParetoUI-23.11.02-win64.exe" }, "dmg": { - "artifactName": "ParetoUI-23.10.06-arm64.dmg" + "artifactName": "ParetoUI-23.11.02-arm64.dmg" }, "deb": { "depends": [ @@ -86,7 +86,7 @@ "liblapack3", "libblas3" ], - "artifactName": "ParetoUI-23.10.06-amd64.deb" + "artifactName": "ParetoUI-23.11.02-amd64.deb" }, "directories": { "buildResources": "assets" @@ -106,7 +106,7 @@ "win": { "target": "nsis", "icon": "build/pareto-logo.ico", - "artifactName": "ParetoUI-23.10.06-win64.exe" + "artifactName": "ParetoUI-23.11.02-win64.exe" }, "linux": { "target": "Deb", diff --git a/electron/ui/public/notarize.js b/electron/ui/public/notarize.js index 77079ed7..ee37140d 100644 --- a/electron/ui/public/notarize.js +++ b/electron/ui/public/notarize.js @@ -36,7 +36,8 @@ module.exports = async function (params) { appPath: appPath, appleId: process.env.APPLE_ID, appleIdPassword: process.env.APPLE_ID_PASSWORD, - tool: "notarytool", + tool: process.env.NOTARIZE_TOOL, + teamId: process.env.TEAM_ID, }) } catch (error) { console.error(error) diff --git a/electron/ui/src/components/DataTable/DataTable.js b/electron/ui/src/components/DataTable/DataTable.js index f216ea24..800768a9 100644 --- a/electron/ui/src/components/DataTable/DataTable.js +++ b/electron/ui/src/components/DataTable/DataTable.js @@ -4,9 +4,14 @@ import { Table, TableBody, TableCell, TableHead, TableRow, TableContainer, TextF import OverrideTable from '../OverrideTable/OverrideTable'; import ParetoDictionary from '../../assets/ParetoDictionary.json' import CategoryNames from '../../assets/CategoryNames.json' +import PopupModal from '../../components/PopupModal/PopupModal' export default function DataTable(props) { const [showOverrideTables, setShowOverrideTables] = useState(false) + const [ rowValue, setRowValue ] = useState(0) + const [ doubleClickIndex, setDoubleClickIndex ] = useState(null) + const [ showRowValueInput, setShowRowValueInput ] = useState(false) + useEffect(()=>{ if(props.scenario.override_values === undefined) { console.log('override values were not defined') @@ -66,16 +71,10 @@ const handleDoubleClick = (ind, index) => { index: column number, starting at 0 */ if (['Optimized','Draft','failure', 'Not Optimized'].includes(props.scenario.results.status)) { - if(index === 0) //when double clicking column index, set all numerical values in that row to 0 + if(index === 0) //when double clicking column index, allow user to input value to apply to that entire row { - let tempScenario = {...props.scenario} - Object.entries(props.scenario.data_input.df_parameters[props.category]).map(([key, value], i) => { - if (i > 0 && value[ind] !== "" && !isNaN(value[ind])) { - value[ind] = 0 - } - }) - props.handleEditInput(true) - props.setScenario(tempScenario) + setShowRowValueInput(true) + setDoubleClickIndex(ind) }else { if(!props.editDict[""+ind+":"+index]) { let tempEditDict = {...props.editDict} @@ -91,6 +90,27 @@ const handleDoubleClick = (ind, index) => { } } + const handleEditRowValue = (event) => { + if (isNaN(event.target.value)) { + setRowValue(event.target.value) + }else { + setRowValue(Number(event.target.value)) + } + } + + const handleUpdateRowValues = () => { + let tempScenario = {...props.scenario} + Object.entries(props.scenario.data_input.df_parameters[props.category]).map(([key, value], i) => { + if (i > 0 && !isNaN(value[doubleClickIndex])) { + value[doubleClickIndex] = rowValue + } + }) + props.handleEditInput(true) + props.setScenario(tempScenario) + setShowRowValueInput(false) + setRowValue(0) + } + const handleKeyDown = (e) => { if (e.key === "Enter") { e.preventDefault(); @@ -353,6 +373,19 @@ const renderInputDeltaTable = () => { {props.section === "input" && renderInputTable()} {props.section === "output" && renderOutputTable()} {props.section === "compare" && renderInputDeltaTable()} + setShowRowValueInput(false)} + text={rowValue} + textLabel='Update all values in this row' + handleEditText={handleEditRowValue} + handleSave={handleUpdateRowValues} + buttonText='Update' + buttonColor='primary' + buttonVariant='contained' + width={400} + /> ); diff --git a/electron/ui/src/views/LandingPage/LandingPage.js b/electron/ui/src/views/LandingPage/LandingPage.js index 862cd38f..bf9e42bc 100644 --- a/electron/ui/src/views/LandingPage/LandingPage.js +++ b/electron/ui/src/views/LandingPage/LandingPage.js @@ -58,7 +58,7 @@ export default function LandingPage(props) { -

v23.10.06 (PARETO v0.9.0)

+

v23.11.02 (PARETO v0.9.0)