admin(ui): add node configuration page

This commit is contained in:
Matthew Penner 2021-02-24 18:28:24 -07:00
parent b8788d1af1
commit 46759ba967
4 changed files with 65 additions and 2 deletions

View file

@ -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());
}
}