Merge branch 'develop' into feature/admin-retheme
This commit is contained in:
commit
8f96b35db1
12 changed files with 31 additions and 15 deletions
|
@ -163,7 +163,7 @@ class NodesController extends Controller
|
|||
|
||||
public function deallocateBlock(Request $request, $node)
|
||||
{
|
||||
$query = Models\Allocation::where('node', $node)->whereNull('server_id')->where('ip', $request->input('ip'))->delete();
|
||||
$query = Models\Allocation::where('node_id', $node)->whereNull('server_id')->where('ip', $request->input('ip'))->delete();
|
||||
if ((int) $query === 0) {
|
||||
Alert::danger('There was an error while attempting to delete allocations on that IP.')->flash();
|
||||
|
||||
|
@ -199,7 +199,7 @@ class NodesController extends Controller
|
|||
|
||||
public function getAllocationsJson(Request $request, $id)
|
||||
{
|
||||
$allocations = Models\Allocation::select('ip')->where('node', $id)->groupBy('ip')->get();
|
||||
$allocations = Models\Allocation::select('ip')->where('node_id', $id)->groupBy('ip')->get();
|
||||
|
||||
return response()->json($allocations);
|
||||
}
|
||||
|
|
|
@ -254,7 +254,7 @@ class ServersController extends Controller
|
|||
try {
|
||||
$res = $server->node->guzzleClient([
|
||||
'X-Access-Server' => $server->uuid,
|
||||
'X-Access-Token' => $node->daemonSecret,
|
||||
'X-Access-Token' => $server->node->daemonSecret,
|
||||
])->request('POST', '/server/rebuild');
|
||||
Alert::success('A rebuild has been queued successfully. It will run the next time this server is booted.')->flash();
|
||||
} catch (\GuzzleHttp\Exception\TransferException $ex) {
|
||||
|
|
|
@ -80,6 +80,7 @@ class APIController extends Controller
|
|||
return response('', 204);
|
||||
} catch (\Exception $ex) {
|
||||
Log::error($ex);
|
||||
|
||||
return response()->json([
|
||||
'error' => 'An error occured while attempting to remove this key.',
|
||||
], 503);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue