Skip to content

Commit f34b77f

Browse files
committed
aurora limitless
1 parent 0c52515 commit f34b77f

File tree

8 files changed

+345
-152
lines changed

8 files changed

+345
-152
lines changed

conf/api.core.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Environment=NODE_PORT=3002
99
Type=simple
1010
User=ec2-user
1111
WorkingDirectory=/aws/apps/server/
12-
ExecStart=/home/ec2-user/.nvm/versions/node/v20.11.0/bin/node api.core.js
12+
ExecStart=/home/ec2-user/.nvm/versions/node/v23.4.0/bin/node api.core.js
1313
Restart=on-failure
1414
RestartSec=5s
1515

conf/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ cd /aws/apps/server/; wget https://truststore.pki.rds.amazonaws.com/global/globa
4242
curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh --output install.sh
4343
sh install.sh
4444
. ~/.nvm/nvm.sh
45-
nvm install 20.11.0
45+
nvm install 23.4.0
4646

4747

4848
#NodeJS API Core Installation

frontend/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"react-apexcharts": "^1.4.1",
1919
"react-dom": "^18.2.0",
2020
"react-router-dom": "^6.11.1",
21-
"web-vitals": "^2.1.4"
21+
"web-vitals": "^2.1.4",
22+
"zustand": "^5.0.2"
2223
},
2324
"devDependencies": {
2425
"react-scripts": "^5.0.1"

frontend/src/components/ChartColumn01.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function ChartBar({ series, height, width="100%", title }) {
1717
animations: {
1818
enabled: false,
1919
},
20+
labels: series.categories,
2021
dynamicAnimation :
2122
{
2223
enabled: true,
@@ -32,7 +33,7 @@ function ChartBar({ series, height, width="100%", title }) {
3233
}
3334
},
3435
xaxis: {
35-
categories: series.categories,
36+
//categories: series.categories,
3637
labels : {
3738
formatter: function(val, index) {
3839

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
import {memo} from 'react';
2+
import Chart from 'react-apexcharts';
3+
4+
const ChartBar = memo(({ series, categories, height, width="100%", title }) => {
5+
6+
console.log(series,categories);
7+
var options = {
8+
chart: {
9+
type: 'bar',
10+
height: height,
11+
foreColor: '#9e9b9a',
12+
zoom: {
13+
enabled: false
14+
},
15+
animations: {
16+
enabled: false,
17+
},
18+
labels: JSON.parse(categories),
19+
dynamicAnimation :
20+
{
21+
enabled: true,
22+
},
23+
toolbar: {
24+
show: false,
25+
}
26+
},
27+
plotOptions: {
28+
bar: {
29+
borderRadius: 4,
30+
horizontal: true,
31+
}
32+
},
33+
xaxis: {
34+
categories: JSON.parse(categories),
35+
labels : {
36+
formatter: function(val, index) {
37+
38+
if(val === 0) return '0';
39+
if(val < 1000) return parseFloat(val).toFixed(0);
40+
41+
var k = 1000,
42+
sizes = ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'],
43+
i = Math.floor(Math.log(val) / Math.log(k));
44+
return parseFloat((val / Math.pow(k, i)).toFixed(1)) + ' ' + sizes[i];
45+
46+
},
47+
style: {
48+
fontSize: '11px',
49+
fontFamily: 'Lato',
50+
},
51+
52+
},
53+
},
54+
grid: {
55+
show: false,
56+
yaxis: {
57+
lines: {
58+
show: false
59+
}
60+
},
61+
xaxis: {
62+
lines: {
63+
show: false
64+
},
65+
}
66+
},
67+
tooltip: {
68+
theme: "dark",
69+
},
70+
dataLabels: {
71+
enabled: true,
72+
style: {
73+
fontSize: '11px',
74+
fontWeight: 'bold',
75+
fontFamily: 'Lato',
76+
},
77+
formatter: function(val, index) {
78+
79+
if(val === 0) return '0';
80+
if(val < 1000) return parseFloat(val).toFixed(0);
81+
82+
var k = 1000,
83+
sizes = ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'],
84+
i = Math.floor(Math.log(val) / Math.log(k));
85+
return parseFloat((val / Math.pow(k, i)).toFixed(1)) + ' ' + sizes[i];
86+
87+
},
88+
},
89+
90+
};
91+
92+
93+
return (
94+
<div>
95+
<Chart options={options} series={JSON.parse(series)} type="bar" width={width} height={height} />
96+
</div>
97+
);
98+
});
99+
100+
export default ChartBar;

0 commit comments

Comments
 (0)