diff --git a/Dockerfile b/Dockerfile index 2eb7818..d05162e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,6 @@ RUN npm install --production COPY .env /opt/.env COPY . /opt -COPY ./node_modules/@fatchan/haproxy-sdk/lib/_utils.js /opt/node_modules/@fatchan/haproxy-sdk/lib/_utils.js RUN npm run build diff --git a/api.js b/api.js index 0c8a755..646a704 100644 --- a/api.js +++ b/api.js @@ -20,7 +20,7 @@ function buildOptions(route, method, body) { export default async function ApiCall(route, method='get', body, stateCallback, errorCallback, finishProgress, router) { // Start progress bar - NProgress.start(); + NProgress.start(); // Build request options for fetch const requestOptions = buildOptions(route, method, body); diff --git a/controllers/maps.js b/controllers/maps.js index 5a750b7..40e3787 100644 --- a/controllers/maps.js +++ b/controllers/maps.js @@ -23,6 +23,7 @@ exports.mapData = async (req, res, next) => { switch (req.params.name) { case process.env.DDOS_MAP_NAME: showValues = true; + case process.env.BACKENDS_MAP_NAME: case process.env.HOSTS_MAP_NAME: if (process.env.CUSTOM_BACKENDS_ENABLED) { showValues = true; diff --git a/package-lock.json b/package-lock.json index bd58a82..e6ce978 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "AGPL-3.0-only", "dependencies": { - "@fatchan/haproxy-sdk": "^1.0.5", + "@fatchan/haproxy-sdk": "^1.0.6", "bcrypt": "^5.0.1", "body-parser": "^1.20.0", "bootstrap": "^5.1.3", @@ -102,9 +102,9 @@ "dev": true }, "node_modules/@fatchan/haproxy-sdk": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@fatchan/haproxy-sdk/-/haproxy-sdk-1.0.5.tgz", - "integrity": "sha512-O0NzzpAwOcJDKUgvkaGIxvXn+uozpAWbT1lncFEX5MGoJ/HmKGQCtARStQNk/d//Q1gm4ILiOmLa9XcJRq+cbQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@fatchan/haproxy-sdk/-/haproxy-sdk-1.0.6.tgz", + "integrity": "sha512-VJbQGtGuxNhpcmYQI9kXAKHpmWXqQ9hs0K+GzIDG7pJ2dwBwaDf71hcezvehFhgmQMqD7dDMZG+1QkMCJDbiMA==", "engines": { "node": ">=8.15.1", "npm": ">=6.4.1" @@ -8010,9 +8010,9 @@ } }, "@fatchan/haproxy-sdk": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@fatchan/haproxy-sdk/-/haproxy-sdk-1.0.5.tgz", - "integrity": "sha512-O0NzzpAwOcJDKUgvkaGIxvXn+uozpAWbT1lncFEX5MGoJ/HmKGQCtARStQNk/d//Q1gm4ILiOmLa9XcJRq+cbQ==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@fatchan/haproxy-sdk/-/haproxy-sdk-1.0.6.tgz", + "integrity": "sha512-VJbQGtGuxNhpcmYQI9kXAKHpmWXqQ9hs0K+GzIDG7pJ2dwBwaDf71hcezvehFhgmQMqD7dDMZG+1QkMCJDbiMA==" }, "@humanwhocodes/config-array": { "version": "0.9.5", diff --git a/package.json b/package.json index 3d418ca..a60c329 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "author": "Thomas Lynch (fatchan) ", "license": "AGPL-3.0-only", "dependencies": { - "@fatchan/haproxy-sdk": "^1.0.5", + "@fatchan/haproxy-sdk": "^1.0.6", "bcrypt": "^5.0.1", "body-parser": "^1.20.0", "bootstrap": "^5.1.3", diff --git a/pages/account.js b/pages/account.js index c45be0d..ec40be1 100644 --- a/pages/account.js +++ b/pages/account.js @@ -92,10 +92,10 @@ const Account = (props) => {
- Servers ({user.clusters[user.activeCluster].split(',').length}) - + Servers ({user.clusters.length === 0 ? 0 : user.clusters[user.activeCluster].split(',').length}) + {user.clusters.length > 0 && ( : {user.clusters[user.activeCluster].split(',').map(x => x.substring(0, x.length/2)+'...').join(', ')} - + )}
diff --git a/pages/map/[name].js b/pages/map/[name].js index 14026a2..e2f450b 100644 --- a/pages/map/[name].js +++ b/pages/map/[name].js @@ -10,7 +10,7 @@ import ApiCall from '../../api.js'; const MapPage = (props) => { const router = useRouter(); - + const { name: mapName } = router.query; const [mapData, setMapData] = useState(props); @@ -94,6 +94,16 @@ const MapPage = (props) => {