diff --git a/public/theme/src/components/ReCast/Login.vue b/public/theme/src/components/ReCast/Login.vue index ab73e29..b3b337f 100644 --- a/public/theme/src/components/ReCast/Login.vue +++ b/public/theme/src/components/ReCast/Login.vue @@ -1,48 +1,38 @@ diff --git a/public/theme/src/main.js b/public/theme/src/main.js index 0a6cc98..e02755e 100644 --- a/public/theme/src/main.js +++ b/public/theme/src/main.js @@ -4,6 +4,8 @@ import App from './App.vue' import axios from 'axios' import VueAxios from 'vue-axios' import VueAuth from '@websanova/vue-auth' +import VueNotify from 'vue-notifyjs' +import 'vue-notifyjs/themes/default.css' // router setup @@ -25,6 +27,7 @@ Vue.router = router; axios.defaults.baseURL = `http://streamer.miku/api`; Vue.use(VueAxios, axios); +Vue.use(VueNotify); Vue.use(VueAuth, { auth: { request: function (req, token) { diff --git a/public/theme/static/img/bg.jpg b/public/theme/static/img/bg.jpg new file mode 100644 index 0000000..0e2803a Binary files /dev/null and b/public/theme/static/img/bg.jpg differ diff --git a/src/Controller/Dashboard.php b/src/Controller/Dashboard.php index fac4771..5596988 100644 --- a/src/Controller/Dashboard.php +++ b/src/Controller/Dashboard.php @@ -3,6 +3,7 @@ namespace App\Controller; +use App\Component\ServiceManager; use Doctrine\DBAL\Connection; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; @@ -19,16 +20,17 @@ class Dashboard extends Controller * @Route(path="/stats") * @author Soner Sayakci * @param Connection $connection + * @param ServiceManager $manager * @return JsonResponse * @throws \Doctrine\DBAL\DBALException */ - public function index(Connection $connection) + public function index(Connection $connection, ServiceManager $manager) { $data = []; $data['streams'] = $connection->fetchColumn('SELECT COUNT(*) FROM streams'); $data['liveStreams'] = $connection->fetchColumn('SELECT COUNT(*) FROM streams WHERE live = 1'); $data['users'] = $connection->fetchColumn('SELECT COUNT(*) FROM `user`'); - $data['endpoints'] = $connection->fetchColumn('SELECT COUNT(*) FROM endpoint'); + $data['endpoints'] = \count($manager->getTemplateData()); return new JsonResponse($data); }