now the ports cannot be assigned twice, also simmilar application names work
This commit is contained in:
parent
e5300424ef
commit
e9d1f985ae
7 changed files with 57 additions and 106 deletions
|
@ -297,13 +297,13 @@
|
|||
return;
|
||||
}
|
||||
|
||||
const response = await fetch(`/api/servers/${serverId}/suggest_port`);
|
||||
const response = await fetch(`/api/server/${serverId}/free-port`);
|
||||
const data = await response.json();
|
||||
|
||||
if (data.port) {
|
||||
if (data.success && data.port) {
|
||||
addPortRow(data.port);
|
||||
} else {
|
||||
showNotification('No available ports found', 'warning');
|
||||
showNotification(data.error || 'No available ports found', 'warning');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error generating random port:', error);
|
||||
|
|
|
@ -325,7 +325,7 @@
|
|||
<!-- Bootstrap JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- HTMX for dynamic content -->
|
||||
<script src="https://unpkg.com/htmx.org@1.9.2"></script>
|
||||
<!-- <script src="https://unpkg.com/htmx.org@1.9.2"></script> -->
|
||||
<!-- Custom JS -->
|
||||
<script src="{{ url_for('static', filename='js/app.js') }}"></script>
|
||||
<script>
|
||||
|
@ -618,4 +618,4 @@
|
|||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue