mirror of
https://github.com/pelican-dev/panel.git
synced 2025-06-11 16:09:00 +02:00
Replace $allocation->toString()
with $allocation->address
(#1431)
This commit is contained in:
parent
ece732d9e5
commit
e7a950ffcb
@ -77,7 +77,7 @@ class AllocationResource extends Resource
|
|||||||
|
|
||||||
Activity::event('server:allocation.delete')
|
Activity::event('server:allocation.delete')
|
||||||
->subject($allocation)
|
->subject($allocation)
|
||||||
->property('allocation', $allocation->toString())
|
->property('allocation', $allocation->address)
|
||||||
->log();
|
->log();
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
|
@ -32,7 +32,7 @@ class ListAllocations extends ListRecords
|
|||||||
|
|
||||||
Activity::event('server:allocation.create')
|
Activity::event('server:allocation.create')
|
||||||
->subject($allocation)
|
->subject($allocation)
|
||||||
->property('allocation', $allocation->toString())
|
->property('allocation', $allocation->address)
|
||||||
->log();
|
->log();
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
@ -62,7 +62,7 @@ class NetworkAllocationController extends ClientApiController
|
|||||||
if ($original !== $allocation->notes) {
|
if ($original !== $allocation->notes) {
|
||||||
Activity::event('server:allocation.notes')
|
Activity::event('server:allocation.notes')
|
||||||
->subject($allocation)
|
->subject($allocation)
|
||||||
->property(['allocation' => $allocation->toString(), 'old' => $original, 'new' => $allocation->notes])
|
->property(['allocation' => $allocation->address, 'old' => $original, 'new' => $allocation->notes])
|
||||||
->log();
|
->log();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ class NetworkAllocationController extends ClientApiController
|
|||||||
|
|
||||||
Activity::event('server:allocation.primary')
|
Activity::event('server:allocation.primary')
|
||||||
->subject($allocation)
|
->subject($allocation)
|
||||||
->property('allocation', $allocation->toString())
|
->property('allocation', $allocation->address)
|
||||||
->log();
|
->log();
|
||||||
|
|
||||||
return $this->fractal->item($allocation)
|
return $this->fractal->item($allocation)
|
||||||
@ -114,7 +114,7 @@ class NetworkAllocationController extends ClientApiController
|
|||||||
|
|
||||||
Activity::event('server:allocation.create')
|
Activity::event('server:allocation.create')
|
||||||
->subject($allocation)
|
->subject($allocation)
|
||||||
->property('allocation', $allocation->toString())
|
->property('allocation', $allocation->address)
|
||||||
->log();
|
->log();
|
||||||
|
|
||||||
return $this->fractal->item($allocation)
|
return $this->fractal->item($allocation)
|
||||||
@ -148,7 +148,7 @@ class NetworkAllocationController extends ClientApiController
|
|||||||
|
|
||||||
Activity::event('server:allocation.delete')
|
Activity::event('server:allocation.delete')
|
||||||
->subject($allocation)
|
->subject($allocation)
|
||||||
->property('allocation', $allocation->toString())
|
->property('allocation', $allocation->address)
|
||||||
->log();
|
->log();
|
||||||
|
|
||||||
return new JsonResponse([], JsonResponse::HTTP_NO_CONTENT);
|
return new JsonResponse([], JsonResponse::HTTP_NO_CONTENT);
|
||||||
|
@ -121,11 +121,6 @@ class Allocation extends Model
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function toString(): string
|
|
||||||
{
|
|
||||||
return $this->address;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets information for the server associated with this allocation.
|
* Gets information for the server associated with this allocation.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user