Skip to content

Commit 8b3ac8c

Browse files
committed
modify build-deploy-zodiac.yml for deploy on zodiac
1 parent 0644260 commit 8b3ac8c

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

.github/workflows/build-deploy-zodiac.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
deploy:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-22.04
1414

1515
steps:
1616
- name: Check out the repository
@@ -26,14 +26,11 @@ jobs:
2626
id: get_branch
2727
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
2828

29-
- name: Copy files to the server via SCP
30-
run: |
31-
echo "Deploying to /var/www/html/dev/${{ env.BRANCH_NAME }}/"
32-
scp -r -o StrictHostKeyChecking=no ./build/* ${{ secrets.NEUROJ_SERVER_USER }}@${{ secrets.NEUROJ_SERVER }}:/var/www/html/dev/${{ env.BRANCH_NAME }}/
33-
34-
- name: Restart Server (Only in the deployed folder)
35-
run: |
36-
echo "Restarting services in /var/www/html/dev/${{ env.BRANCH_NAME }}/"
37-
ssh -o StrictHostKeyChecking=no ${{ secrets.NEUROJ_SERVER_USER }}@${{ secrets.NEUROJ_SERVER }} << EOF
38-
cd /var/www/html/dev/${{ env.BRANCH_NAME }}/ && pm2 restart all || echo "No PM2 processes found in this directory"
39-
EOF
29+
- name: Copy package to server
30+
uses: NeuroJSON/[email protected]
31+
with:
32+
server: ${{ secrets.NEUROJ_SERVER }}
33+
username: ${{ secrets.NEUROJ_SERVER_USER }}
34+
ssh_private_key: ${{ secrets.NEUROJ_SERVER_SSH_KEY }}
35+
local_path: "./build/*"
36+
remote_path: "${{ secrets.NEUROJ_CI_PATH }}/${{ env.BRANCH_NAME }}"

src/modules/universe/NeuroJsonGraph.tsx

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,22 @@ const NeuroJsonGraph: React.FC<{
3030

3131
// Define the datatype to color mapping
3232
const DATA_TYPE_COLORS: Record<string, [number, number, number]> = {
33-
mri: [79, 51, 130],
34-
fmri: [10, 81, 20],
35-
pet: [0, 105, 192],
36-
meg: [156, 57, 0],
37-
eeg: [134, 31, 55],
38-
ieeg: [18, 109, 62],
39-
beh: [12, 93, 210],
40-
fmap: [255, 255, 59],
41-
dwi: [200, 9, 12],
42-
fnirs: [255, 193, 7],
43-
phenotype: [255, 87, 34],
33+
// mri: [79, 51, 130], // deep purple
34+
mri: [160, 138, 233], // soft laender
35+
anat: [160, 138, 233],
36+
// fmri: [10, 81, 20], // dark green
37+
fmri: [152, 202, 32], // bright lime green
38+
func: [152, 202, 32],
39+
40+
pet: [0, 105, 192], // deep blue
41+
meg: [156, 57, 0], // dark reddish-brown
42+
eeg: [134, 31, 55], // dark red-pink
43+
ieeg: [18, 109, 62], // forest green
44+
beh: [12, 93, 210], // bright blue
45+
fmap: [255, 255, 59], // vivid yellow
46+
dwi: [200, 9, 12], // deep red
47+
fnirs: [255, 193, 7], // golden yellow
48+
phenotype: [255, 87, 34], // vibrant orange-red
4449
};
4550

4651
// Function to blend colors based on datatypes
@@ -64,9 +69,9 @@ const NeuroJsonGraph: React.FC<{
6469

6570
if (count === 0) count = 1; // Prevent division by zero
6671

67-
const avgR = Math.floor(totalR / count);
68-
const avgG = Math.floor(totalG / count);
69-
const avgB = Math.floor(totalB / count);
72+
let avgR = Math.floor(totalR / count);
73+
let avgG = Math.floor(totalG / count);
74+
let avgB = Math.floor(totalB / count);
7075

7176
return `rgb(${avgR}, ${avgG}, ${avgB})`;
7277
};
@@ -117,7 +122,7 @@ const NeuroJsonGraph: React.FC<{
117122
nodes: registry.map((db) => {
118123
const color = blendColors(db.datatype);
119124
let size =
120-
db.datasets > 100 ? Math.log(db.datasets) * 2.5 : db.datasets / 6;
125+
db.datasets > 100 ? Math.log(db.datasets) * 2.5 : db.datasets / 7;
121126
size = Math.max(size, 4);
122127

123128
return {
@@ -172,9 +177,9 @@ const NeuroJsonGraph: React.FC<{
172177
// Initialize 3D Force Graph
173178
const Graph = new ForceGraph3D(graphRef.current)
174179
.graphData(graphData)
175-
.nodeRelSize(2)
180+
.nodeRelSize(1)
176181
.nodeColor((node) => (node as NodeObject).color)
177-
.linkWidth(1)
182+
.linkWidth(2)
178183
.backgroundColor("rgba(0,0,0,0)")
179184
.nodeLabel("name")
180185
.onNodeHover((node) => {

0 commit comments

Comments
 (0)