diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a72b8f2..76c717d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -167,6 +167,12 @@ jobs: with: name: build path: build/* + - name: Generate GitHub App Token + id: generate_token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.GH_APP_ID }} + private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} - name: Commit Version Bump # If building an alpha, release candidate, or release then we commit the version bump back to the repo if: | @@ -174,10 +180,13 @@ jobs: steps.rc.conclusion == 'success' || steps.release.conclusion == 'success' run: | - git config user.name "${GITHUB_ACTOR}" + git config user.name "PODAAC-CICD" git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + echo "machine github.com login x-access-token password ${{ steps.generate_token.outputs.token }}" > ~/.netrc git commit -am "/version ${{ env.software_version }}" git push + env: + GH_APP_TOKEN: ${{ steps.generate_token.outputs.token }} - name: Push Tag if: | steps.alpha.conclusion == 'success' || diff --git a/package-lock.json b/package-lock.json index 01c986d..4121754 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "swodlr-ui", - "version": "1.0.0", + "version": "1.0.1-1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "swodlr-ui", - "version": "1.0.0", + "version": "1.0.1-1", "dependencies": { "@hexagon/base64": "^1.1.28", "@reduxjs/toolkit": "^1.9.5", diff --git a/package.json b/package.json index 933df60..5f31da9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swodlr-ui", - "version": "1.0.0", + "version": "1.0.1-1", "private": true, "engines": { "node": ">=18.0.0" diff --git a/src/components/app/App.css b/src/components/app/App.css index a624a4c..51a5113 100644 --- a/src/components/app/App.css +++ b/src/components/app/App.css @@ -229,7 +229,8 @@ CUSTOMIZE PRODUCT CONTAINER left: 0; z-index: 1000; padding-top: 125px; - padding-bottom: 58px + padding-bottom: 58px; + /* overflow-y: auto; */ } .sidebar-resize { @@ -419,7 +420,14 @@ ABOUT PAGE .about-page { max-height: 82vh; - /* overflow-y: auto; */ + background-color: #3d5d82; + overflow-y: scroll; +} + +.my-data-page { + max-height: 82vh; + background-color: #3d5d82; + /* overflow-y: scroll; */ } .about-card { diff --git a/src/components/history/GeneratedProductHistory.tsx b/src/components/history/GeneratedProductHistory.tsx index a6acd37..729617f 100644 --- a/src/components/history/GeneratedProductHistory.tsx +++ b/src/components/history/GeneratedProductHistory.tsx @@ -11,7 +11,7 @@ import HistoryFilters from "./HistoryFilters"; import { Adjust, FilterParameters, OutputGranuleExtentFlagOptions, OutputSamplingGridType, RasterResolution } from "../../types/historyPageTypes"; import { setShowReGenerateProductModalTrue } from "../sidebar/actions/modalSlice"; import ReGenerateProductsModal from "./ReGenerateProductsModal"; -import { setAllUserProducts, setGranulesToReGenerate, setUserProducts, setWaitingForMyDataFiltering } from "../sidebar/actions/productSlice"; +import { setAllUserProducts, setGranulesToReGenerate, setUserProducts, setWaitingForMyDataFiltering, setWaitingForProductsToLoad } from "../sidebar/actions/productSlice"; export const productPassesFilterCheck = (currentFilters: FilterParameters, cycle: number, pass: number, scene: number, outputGranuleExtentFlag: boolean, status: string, outputSamplingGridType: string, rasterResolution: number, dateGenerated: string, utmZoneAdjust?: number, mgrsBandAdjust?: number): boolean => { let productPassesFilter = true @@ -58,6 +58,8 @@ const GeneratedProductHistory = () => { const colorModeClass = useAppSelector((state) => state.navbar.colorModeClass) const userProducts = useAppSelector((state) => state.product.userProducts) const currentFilters = useAppSelector((state) => state.product.currentFilters) + const waitingForProductsToLoad = useAppSelector((state) => state.product.waitingForProductsToLoad) + const waitingForMyDataFiltering = useAppSelector((state) => state.product.waitingForMyDataFiltering) const { search } = useLocation() const navigate = useNavigate() const [totalNumberOfProducts, setTotalNumberOfProducts] = useState(0) @@ -66,11 +68,12 @@ const GeneratedProductHistory = () => { const [allChecked, setAllChecked] = useState(false) useEffect(() => { - dispatch(setWaitingForMyDataFiltering(true)) // get the data for the first page // go through all the user product data to get the id of each one so that const fetchData = async () => { + if(!waitingForMyDataFiltering) dispatch(setWaitingForProductsToLoad(true)) await getUserProducts({limit: '1000000'}).then(response => { + dispatch(setWaitingForProductsToLoad(false)) // filter products for what is in the filter const allProducts = response.products as Product[] setTotalNumberOfProducts(allProducts.length) @@ -161,16 +164,12 @@ const GeneratedProductHistory = () => { const downloadUrlList = checkedProducts.map(product => product.granules.map(granule => granule.uri)).flat() return ( - {} - - + {}
{ - totalNumberOfProducts === 0 ? - {productHistoryAlert()} - :<> + <> {checkedProducts.length} Actions}> @@ -226,21 +225,23 @@ const GeneratedProductHistory = () => { }
{} + {!waitingForProductsToLoad && userProducts.length === 0 ? {productHistoryAlert()} : null} + {waitingForProductsToLoad ? waitingForProductsToLoadSpinner() : null}
) - } + } const productHistoryAlert = () => { - const alertMessage = 'No products have been generated. Go to the Product Customization page to generate products.' - return navigate(`/generatedProductHistory${search}`)} style={{cursor: 'pointer'}}>{alertMessage} + const alertMessage = 'No products generated with these filters. Click here or go to the Product Customization page to generate products.' + return navigate(`/customizeProduct/configureOptions${search}`)} style={{cursor: 'pointer'}}>{alertMessage} } const waitingForProductsToLoadSpinner = () => { return (
-
Loading Data Table...
+
Loading Product Data...
Loading... @@ -258,10 +259,10 @@ const GeneratedProductHistory = () => { return ( <> -

Generated Products Data

- - {totalNumberOfProducts === 0 ? waitingForProductsToLoadSpinner() : renderProductHistoryViews()} - +

Generated Products Data

+ + {renderProductHistoryViews()} + ); } diff --git a/src/components/history/HistoryFilters.tsx b/src/components/history/HistoryFilters.tsx index dbbf17c..bdb748f 100644 --- a/src/components/history/HistoryFilters.tsx +++ b/src/components/history/HistoryFilters.tsx @@ -1,7 +1,7 @@ import { Accordion, Button, Col, Form, Row, Spinner } from "react-bootstrap"; import { ProductState } from "../../types/graphqlTypes"; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; -import { setCurrentFilter } from "../sidebar/actions/productSlice"; +import { setCurrentFilter, setWaitingForMyDataFiltering } from "../sidebar/actions/productSlice"; import { defaultFilterParameters, defaultSpatialSearchEndDate, defaultSpatialSearchStartDate, inputBounds, parameterOptionValues, rasterResolutionOptions } from "../../constants/rasterParameterConstants"; import { useState } from "react"; import { OutputGranuleExtentFlagOptions, OutputSamplingGridType, RasterResolution, Adjust, FilterParameters, FilterAction } from "../../types/historyPageTypes"; @@ -124,6 +124,11 @@ const HistoryFilters = () => { setCurrentFilters(currentFiltersToModify) } + const handleApplyFilters = () => { + dispatch(setCurrentFilter(currentFilters)) + dispatch(setWaitingForMyDataFiltering(true)) + } + const statusOptions = ['NEW', 'UNAVAILABLE', 'GENERATING', 'ERROR', 'READY', 'AVAILABLE'] const outputGranuleExtentFlagOptions = ['128 x 128', '256 x 128'] const outputSamplingGridTypeOptions = parameterOptionValues.outputSamplingGridType.values.map(value => { @@ -314,7 +319,7 @@ const HistoryFilters = () => { -