Skip to content

Commit 2d6f8a9

Browse files
Feature/allow service rename (#40)
* feat: Implement service renaming feature * feat: Implement batch actions * fix: fix internal toggle with batch feature * fix: fix select box ui overlap * fix: fix bug for duplicate ports * fix: fix internal batching bug for ignore and note * fix: fix missing internal flag * fix: re-fix missing internal flag * fix: include protocol in docker collector port mapping * fix: refactor API calls to include protocol parameter for service names and notes * chore: update version to 1.0.7 and document changes in changelog * fix: fix migration issue
1 parent 8caa515 commit 2d6f8a9

27 files changed

+3123
-278
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes to Portracker will be documented in this file.
44

5+
## [1.0.7] - 2025-08-19
6+
7+
### Frontend
8+
- **Service renaming**: Allow renaming services from the UI.
9+
- **Batch actions**: Add selection and batch operations for services and ports (ignore, add note, etc.).
10+
- **Internal / Port display fixes**: Fix display issues so internal and published ports are shown correctly; fix select-box overlap.
11+
12+
### Backend
13+
- **Port protocol reporting**: Ensure ports include protocol information so reported mappings are accurate.
14+
515
## [1.0.6] - 2025-08-15
616

717
### Frontend

backend/collectors/docker_collector.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class DockerCollector extends BaseCollector {
164164

165165
const dockerPorts = await this._getDockerContainerPorts();
166166
dockerPorts.forEach((port) => {
167-
const key = `${port.host_ip}:${port.host_port}`;
167+
const key = `${port.host_ip}:${port.host_port}:${port.protocol}`;
168168
if (!dockerPortsMap.has(key)) {
169169
if (port.container_id) {
170170
port.created = containerCreationTimeMap.get(port.container_id) || null;
@@ -184,8 +184,8 @@ class DockerCollector extends BaseCollector {
184184

185185
if (container.internalPorts && container.internalPorts.length > 0) {
186186
container.internalPorts.forEach((internalPort) => {
187-
const publishedKey = `${internalPort.host_ip}:${internalPort.host_port}`;
188-
const internalKey = `${internalPort.host_ip}:${internalPort.host_port}:${container.id}:internal`;
187+
const publishedKey = `${internalPort.host_ip}:${internalPort.host_port}:${internalPort.protocol}`;
188+
const internalKey = `${internalPort.host_ip}:${internalPort.host_port}:${internalPort.protocol}:${container.id}:internal`;
189189

190190
if (!dockerPortsMap.has(publishedKey) && !dockerPortsMap.has(internalKey)) {
191191
internalPort.created = containerCreationTimeMap.get(container.id) || null;
@@ -344,7 +344,6 @@ class DockerCollector extends BaseCollector {
344344
const containerId = container.ID;
345345
const containerName = container.Names;
346346
const image = container.Image;
347-
348347
try {
349348
const [inspection, pids] = await Promise.all([
350349
this.dockerApi.inspectContainer(containerId),
@@ -360,7 +359,7 @@ class DockerCollector extends BaseCollector {
360359
const [port, protocol] = portDef.split('/');
361360
const portNum = parseInt(port, 10);
362361
if (!isNaN(portNum)) {
363-
internalPorts.push({
362+
const internalPort = {
364363
source: "docker",
365364
owner: containerName,
366365
protocol: protocol || "tcp",
@@ -370,7 +369,8 @@ class DockerCollector extends BaseCollector {
370369
container_id: containerId,
371370
app_id: containerName,
372371
internal: true
373-
});
372+
};
373+
internalPorts.push(internalPort);
374374
}
375375
});
376376
}

0 commit comments

Comments
 (0)