"""Serves the single page app web ui."""

import json
import tornado.gen

from ndscheduler import settings
from ndscheduler import utils
from ndscheduler.server.handlers import base


class Handler(base.BaseHandler):
    """Index page request handler."""

    @tornado.gen.coroutine
    def get(self):
        """Serve up the single page app for scheduler dashboard."""

        meta_info = utils.get_all_available_jobs()
        self.render(settings.APP_INDEX_PAGE, jobs_meta_info=json.dumps(meta_info))

[((18, 20, 18, 50), 'ndscheduler.utils.get_all_available_jobs', 'utils.get_all_available_jobs', ({}, {}), '()', False, 'from ndscheduler import utils\n'), ((19, 60, 19, 81), 'json.dumps', 'json.dumps', ({(19, 71, 19, 80): 'meta_info'}, {}), '(meta_info)', False, 'import json\n')]