Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dcellar-web-ui): disable selection of SPs with invalid status in … #365

Merged
merged 4 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/dcellar-web-ui/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint'],
ignorePatterns: ['next.config.js', 'public/wasm/**.js'],
ignorePatterns: ['next.config.js', 'public/wasm/**.js', 'scripts/**.js'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
Expand Down
5 changes: 3 additions & 2 deletions apps/dcellar-web-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": false,
"scripts": {
"dev": "next dev -p 3101",
"dev": "node ./scripts/dev.js -p 3200",
"build": "next build",
"start": "next start",
"lint": "next lint",
Expand Down Expand Up @@ -56,7 +56,8 @@
"react-dnd-html5-backend": "16.0.1",
"viem": "~1.19.11",
"@wagmi/core": "~1.4.10",
"set-interval-async": "~3.0.3"
"set-interval-async": "~3.0.3",
"radash": "~12.1.0"
},
"devDependencies": {
"@commitlint/cli": "^17.4.3",
Expand Down
40 changes: 40 additions & 0 deletions apps/dcellar-web-ui/scripts/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env node

const { execSync } = require('child_process');

const args = process.argv.slice(2);

let port = 3200; // Default port is 3200

// Parsing command line arguments
for (let i = 0; i < args.length; i++) {
const arg = args[i];
if (arg === '-p' || arg === '--port') {
const nextArg = args[i + 1];
if (nextArg && !isNaN(nextArg)) {
port = parseInt(nextArg, 10);
} else {
console.error('Invalid port number. Please provide a valid port number.');
process.exit(1);
}
}
}

function getNextAvailablePort(port) {
const command = `lsof -ti:${port}`;
try {
execSync(command);
return getNextAvailablePort(port + 1);
} catch (error) {
return port;
}
}

function startNextServer(port) {
const command = `next dev -p ${port}`;
console.log(`Starting Next.js server on port ${port}`);
execSync(command, { stdio: 'inherit' });
}

const availablePort = getNextAvailablePort(port);
startNextServer(availablePort);
313 changes: 0 additions & 313 deletions apps/dcellar-web-ui/src/modules/bucket/components/SPSelector.tsx

This file was deleted.

Loading
Loading