Skip to content

Commit e1e5897

Browse files
authored
Merge pull request #14 from CIAT-DAPA/develop
Develop
2 parents 5c6a7e1 + a758753 commit e1e5897

File tree

20 files changed

+322
-152
lines changed

20 files changed

+322
-152
lines changed

.github/workflows/pipeline.yml

+59-67
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,16 @@ name: Devops GapAnalysis
22

33
on:
44
push:
5-
branches: [ "stage" ]
5+
branches: ["stage"]
66
tags:
7-
- 'v*'
8-
7+
- "v*"
98

109
permissions:
1110
contents: read
1211

1312
jobs:
13+
# ------- START FRONT PROCCESS -------- #
1414

15-
16-
17-
18-
# ------- START FRONT PROCCESS -------- #
19-
20-
2115
TestFront:
2216
runs-on: ubuntu-latest
2317
steps:
@@ -31,11 +25,10 @@ jobs:
3125
ls
3226
npm install
3327
npm test
34-
3528
36-
# ------- END FRONT PROCCESS -------- #
29+
# ------- END FRONT PROCCESS -------- #
3730

38-
# ------- START MERGE PROCCESS -------- #
31+
# ------- START MERGE PROCCESS -------- #
3932

4033
MergeMainFront:
4134
needs: [TestFront]
@@ -53,76 +46,75 @@ jobs:
5346
target_branch: main
5447
github_token: ${{ github.token }}
5548

56-
# ------- END MERGE PROCCESS -------- #
49+
# ------- END MERGE PROCCESS -------- #
5750

58-
# ------- START RELEASE PROCCESS -------- #
51+
# ------- START RELEASE PROCCESS -------- #
5952

6053
PostRelease:
6154
needs: MergeMainFront
6255
name: Create Release
6356
runs-on: ubuntu-latest
6457
permissions: write-all
6558
steps:
66-
- uses: actions/checkout@v3
67-
with:
68-
fetch-depth: '0'
69-
- uses: actions/setup-node@v3
70-
with:
59+
- uses: actions/checkout@v3
60+
with:
61+
fetch-depth: "0"
62+
- uses: actions/setup-node@v3
63+
with:
7164
node-version: 18
72-
# Front Zip
73-
- name: Install packages
74-
run: |
65+
# Front Zip
66+
- name: Install packages
67+
run: |
7568
cd ./src
7669
ls
7770
npm install
7871
npm run build
7972
80-
- name: Zip artifact front for deployment
81-
run: |
73+
- name: Zip artifact front for deployment
74+
run: |
8275
cd ./src/build
8376
ls
8477
zip releaseFront.zip ./* -r
85-
86-
# Upload Artifacts
87-
- name: Upload Front artifact for deployment job
88-
uses: actions/upload-artifact@v3
89-
with:
90-
name: Frontend
91-
path: releaseFront.zip
92-
# Generate Tagname
93-
- name: Generate Tagname for release
94-
id: taggerDryRun
95-
uses: anothrNick/github-tag-action@1.61.0
96-
env:
97-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98-
WITH_V: true
99-
DRY_RUN: true
100-
DEFAULT_BUMP: patch
101-
RELEASE_BRANCHES : stage,main
102-
BRANCH_HISTORY: last
103-
# Create release
104-
- name: Create Release
105-
id: create_release
106-
uses: actions/create-release@v1
107-
env:
108-
GITHUB_TOKEN: ${{ github.token }}
109-
with:
110-
tag_name: ${{ steps.taggerDryRun.outputs.new_tag }}
111-
release_name: Release ${{ steps.taggerDryRun.outputs.new_tag }}
112-
#body_path: ./body.md
113-
body: ${{ github.event.head_commit.message }}
114-
draft: false
115-
prerelease: false
116-
# Upload Assets to release
117-
- name: Upload Release Asset Front
118-
id: upload-front-release-asset
119-
uses: actions/upload-release-asset@v1
120-
env:
121-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
122-
with:
123-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
124-
asset_path: ./src/build/releaseFront.zip
125-
asset_name: releaseFront.zip
126-
asset_content_type: application/zip
12778
128-
# ------- END RELEASE PROCCESS -------- #
79+
# Upload Artifacts
80+
- name: Upload Front artifact for deployment job
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: Frontend
84+
path: releaseFront.zip
85+
# Generate Tagname
86+
- name: Generate Tagname for release
87+
id: taggerDryRun
88+
uses: anothrNick/github-tag-action@1.61.0
89+
env:
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
WITH_V: true
92+
DRY_RUN: true
93+
DEFAULT_BUMP: patch
94+
RELEASE_BRANCHES: stage,main
95+
BRANCH_HISTORY: last
96+
# Create release
97+
- name: Create Release
98+
id: create_release
99+
uses: actions/create-release@v1
100+
env:
101+
GITHUB_TOKEN: ${{ github.token }}
102+
with:
103+
tag_name: ${{ steps.taggerDryRun.outputs.new_tag }}
104+
release_name: Release ${{ steps.taggerDryRun.outputs.new_tag }}
105+
#body_path: ./body.md
106+
body: ${{ github.event.head_commit.message }}
107+
draft: false
108+
prerelease: false
109+
# Upload Assets to release
110+
- name: Upload Release Asset Front
111+
id: upload-front-release-asset
112+
uses: actions/upload-release-asset@v1
113+
env:
114+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115+
with:
116+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
117+
asset_path: ./src/build/releaseFront.zip
118+
asset_name: releaseFront.zip
119+
asset_content_type: application/zip
120+
# ------- END RELEASE PROCCESS -------- #

src/src/assets/icons/amaranth.png

194 KB
Loading

src/src/assets/icons/bambara.png

79.1 KB
Loading

src/src/assets/icons/baobab.png

123 KB
Loading

src/src/assets/icons/jackfruit.png

52.2 KB
Loading

src/src/assets/icons/jute.png

19 KB
Loading

src/src/assets/icons/moringa.png

84 KB
Loading

src/src/assets/icons/pumpkin.png

95.3 KB
Loading

src/src/assets/icons/sesame.png

99.9 KB
Loading

src/src/assets/icons/sweetberry.png

59 KB
Loading

src/src/assets/icons/turkey.png

71.3 KB
Loading

src/src/assets/icons/white.png

108 KB
Loading

src/src/components/LayersMarkers/LayersMarkers.jsx

+29-16
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,24 @@ const LayersMarkers=({option1Checked,option2Checked,accessions,
106106
{option1Checked == false &&
107107
option2Checked == true &&
108108
layerr.length > 0 &&
109-
layerr.map((layerr, index) => (
110-
<WMSTileLayer
111-
key={layerr}
112-
url={Configuration.get_geoserver_url()+Configuration.get_geoserver_service()}
113-
layers={`${Configuration.get_gap_worspace()}:${layerr}`}
114-
format="image/png"
115-
transparent={true}
116-
zIndex={1000 + index}
117-
styles={`Gap` + index}
118-
/>
119-
))}
109+
layerr.map((layerr, index) => {
110+
const geoserverUrl = Configuration.get_geoserver_url() + Configuration.get_geoserver_service();
111+
const layerName = `${Configuration.get_gap_worspace()}:${layerr}`;
112+
113+
//console.log("GeoServer URL:", geoserverUrl);
114+
//console.log("Loading Layer:", layerName);
115+
return (
116+
<WMSTileLayer
117+
key={layerr}
118+
url={geoserverUrl}
119+
layers={layerName}
120+
format="image/png"
121+
transparent={true}
122+
zIndex={1000 + index}
123+
styles={`Gap` + index}
124+
/>
125+
);
126+
})}
120127

121128
{option1Checked == true && option2Checked == true && (
122129
<>
@@ -186,17 +193,23 @@ const LayersMarkers=({option1Checked,option2Checked,accessions,
186193
) : null
187194
)}
188195
{layerr.length > 0 &&
189-
layerr.map((layerr, index) => (
196+
layerr.map((layerr, index) => {
197+
const geoserverUrl = Configuration.get_geoserver_url() + Configuration.get_geoserver_service();
198+
const layerName = `${Configuration.get_gap_worspace()}:${layerr}`;
199+
200+
//console.log("GeoServer URL:", geoserverUrl);
201+
//console.log("Loading Layer:", layerName);
202+
return (
190203
<WMSTileLayer
191204
key={layerr}
192-
url={Configuration.get_geoserver_url()+Configuration.get_geoserver_service()}
193-
layers={`${Configuration.get_gap_worspace()}:${layerr}`}
205+
url={geoserverUrl}
206+
layers={layerName}
194207
format="image/png"
195208
transparent={true}
196209
zIndex={1000 + index}
197210
styles={`Gap` + index}
198-
/>
199-
))}
211+
/> );
212+
})}
200213
</>
201214
)}
202215
{accesionsInput &&

0 commit comments

Comments
 (0)