public function createDatabase(Request $request)
    {
        $dbName = $request->request->get('new_dbname', '');
        /** @var DataboxService $databoxService */
        $databoxService = $this->app['databox.service'];
        $dataTemplate = $request->request->get('new_data_template');


        try {
            $connectionSettings = $this->buildSettingsFromRequest($request);
            $databox = $databoxService->createDatabox(
                $dbName,
                $dataTemplate,
                $this->getAuthenticatedUser(),
                $connectionSettings
            );

            return $this->app->redirectPath('admin_database', [
                'databox_id'  => $databox->get_sbas_id(),
                'success'     => 1,
                'reload-tree' => 1
            ]);
        }
        catch (\InvalidArgumentException $exception) {
            return $this->handleInvalidArgument($exception);
        }
        catch (DBALException $e) {
            return $this->app->redirectPath('admin_databases', ['success' => 0, 'error' => 'database-failed']);
        }
        catch (\Exception $e) {
            return $this->app->redirectPath('admin_databases', [
                'success' => 0,
                'error' => 'base-failed'
            ]);
        }
    }