Skip to content

Commit 5ffd534

Browse files
committed
SnmpController: fix redirections
1 parent 9b7ea15 commit 5ffd534

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

application/controllers/SnmpController.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,18 @@ public function deviceAction(): void
171171
'delay' => 3,
172172
]), Loop::get());
173173
Notification::success('Device has been submitted');
174-
$this->redirectNow('imedge/snmp/devices#!imedge/snmp/device?uuid=' . $deviceUuid->toString());
174+
$this->redirectNow('imedge/snmp/devices#!' . Url::fromPath('imedge/snmp/device', [
175+
'uuid' => $deviceUuid->toString()
176+
]));
175177
} catch (Exception $exception) {
176178
Notification::error($exception->getMessage());
177179
}
178180
});
179181
$form->handleRequest($this->getServerRequest());
182+
if ($form->hasBeenDeleted()) {
183+
$this->redirectNow('imedge/snmp/devices#!__CLOSE__');
184+
}
185+
180186
$this->content()->add($form);
181187
return;
182188
} else {

0 commit comments

Comments
 (0)