admin(ui): add node configuration page
This commit is contained in:
parent
b8788d1af1
commit
46759ba967
4 changed files with 65 additions and 2 deletions
|
@ -14,10 +14,15 @@ class NodeConfigurationController extends ApplicationApiController
|
|||
* to remote machines so long as an API key is provided to the machine to make the request
|
||||
* with, and the node is known.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
*/
|
||||
public function __invoke(GetNodeRequest $request, Node $node)
|
||||
{
|
||||
if ($request->query('format') === 'yaml') {
|
||||
return $node->getYamlConfiguration();
|
||||
}
|
||||
|
||||
return new JsonResponse($node->getConfiguration());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue