Displays the dashboard. Includes the main
        navigation that the user has permission for as well
        as the cms log for those sections. The log list can
        be filtered by those same sections
        and is paginated.
439583
def index(self, request, extra_context=None):
        

        dashboard = self.get_dashboard_urls(request)
        dash_blocks = self.get_dashboard_blocks(request)

        sections, titles = self._get_allowed_sections(dashboard)
        choices = zip(sections, titles)
        choices.sort(key=lambda tup: tup[1])
        choices.insert(0, ('', 'All'))

        class SectionFilterForm(BaseFilterForm):
            section = forms.ChoiceField(required=False, choices=choices)

        form = SectionFilterForm(request.GET)
        filter_kwargs = form.get_filter_kwargs()

        if not filter_kwargs and not request.user.is_superuser:
            filter_kwargs['section__in'] = sections
        cms_logs = models.CMSLog.objects.filter(**filter_kwargs
                                                ).order_by('-when')

        template = self.dashboard_template or 'cms/dashboard.html'

        paginator = Paginator(cms_logs[:20 * 100], 20,
                              allow_empty_first_page=True)
        page_number = request.GET.get('page') or 1
        try:
            page_number = int(page_number)
        except ValueError:
            page_number = 1

        page = paginator.page(page_number)

        return TemplateResponse(request, [template], {
            'dashboard': dashboard, 'blocks': dash_blocks,
            'page': page, 'bundle': self._registry.values()[0],
            'form': form},)
358529
public function route()
    {
        $this->dashboardRouting($this->relativeCmsUri);
        $this->logOffRouting($this->request, $this->relativeCmsUri);
        $this->apiRouting($this->relativeCmsUri);
        $this->documentRouting($this->userRights, $this->relativeCmsUri);
        $this->valuelistsRouting($this->userRights, $this->relativeCmsUri);
        $this->sitemapRouting($this->userRights, $this->relativeCmsUri);
        $this->redirectRouting($this->userRights, $this->relativeCmsUri);
        $this->imageRouting($this->userRights, $this->relativeCmsUri);
        $this->filesRouting($this->userRights, $this->relativeCmsUri);
        $this->configurationRouting($this->userRights, $this->relativeCmsUri);
        $this->searchRouting($this->relativeCmsUri);
    }
996098
public function init() {

		parent::init();

		// Permissions
		$this->crudPermission	= CoreGlobal::PERM_ADMIN;

		// Check Layout for Public and Private pages
		if ( Yii::$app->user->isGuest ) {

			$this->layout	= AdminGlobalCore::LAYOUT_PUBLIC;
		}

		// Breadcrumbs
		$this->breadcrumbs	= [
			'index' => [ [ 'label' => 'Dashboard' ] ],
			'login' => [ [ 'label' => 'Login' ] ],
			'dashboard' => [ [ 'label' => 'Dashboard' ] ]
		];
	}
788854
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        // add a hidden field so we can check if this list was submitted on
        // the process step
        $this->getForm()->addHiddenField($this->id . '_submitted', 1);

        if (count($this->pages) === 1) {
            $this->displaySinglePage(reset($this->pages));
        } else {
            $table = new SwatHtmlTag('table');
            $table->id = $this->id;
            $table->class = 'swat-radio-note-book';
            $table->open();

            echo '<tbody>';

            $count = 0;
            foreach ($this->pages as $page) {
                if (!$page->visible) {
                    continue;
                }

                $count++;

                $this->displayPage($page, $count);
            }

            echo '</tbody>';

            $table->close();

            Swat::displayInlineJavaScript($this->getInlineJavaScript());
        }
    }
791376
void displayInheritedPermissions() {

        // store all parent folder ids together with path in a map
        m_parents = new HashMap<CmsUUID, String>();
        String sitePath = m_cms.getSitePath(m_resource);
        String path = CmsResource.getParentFolder(sitePath);
        List<CmsResource> parentResources = new ArrayList<CmsResource>();
        try {
            // get all parent folders of the current file
            parentResources = m_cms.readPath(path, CmsResourceFilter.IGNORE_EXPIRATION);
        } catch (CmsException e) {
            // can usually be ignored
            if (LOG.isInfoEnabled()) {
                LOG.info(e.getLocalizedMessage());
            }
        }
        Iterator<CmsResource> k = parentResources.iterator();
        while (k.hasNext()) {
            // add the current folder to the map
            CmsResource curRes = k.next();
            m_parents.put(curRes.getResourceId(), curRes.getRootPath());
        }

        ArrayList<CmsAccessControlEntry> inheritedEntries = new ArrayList<CmsAccessControlEntry>();
        try {
            Iterator<CmsAccessControlEntry> itAces = m_cms.getAccessControlEntries(path, true).iterator();
            while (itAces.hasNext()) {
                CmsAccessControlEntry curEntry = itAces.next();
                inheritedEntries.add(curEntry);
            }
        } catch (CmsException e) {
            // can usually be ignored
            if (LOG.isInfoEnabled()) {
                LOG.info(e.getLocalizedMessage());
            }
        }
        addEntryTableToLayout(inheritedEntries, m_inheritedPermissions, false, true);

        //        buildInheritedList(inheritedEntries, parents);
    }
179851
public function showDashboard()
    {
        $components = Component::orderBy('order')->get();
        $incidents = $this->getIncidents();
        $subscribers = $this->getSubscribers();

        $componentGroups = $this->getVisibleGroupedComponents();
        $ungroupedComponents = Component::ungrouped()->get();

        $welcomeUser = !Auth::user()->welcomed;
        if ($welcomeUser) {
            execute(new WelcomeUserCommand(Auth::user()));
        }

        $entries = null;
        if ($feed = $this->feed->latest()) {
            if (is_object($feed)) {
                $entries = array_slice($feed->channel->item, 0, 5);
            }
        }

        return View::make('dashboard.index')
            ->withPageTitle(trans('dashboard.dashboard'))
            ->withComponents($components)
            ->withIncidents($incidents)
            ->withSubscribers($subscribers)
            ->withEntries($entries)
            ->withComponentGroups($componentGroups)
            ->withUngroupedComponents($ungroupedComponents)
            ->withWelcomeUser($welcomeUser);
    }
213785
public function showMetrics()
    {
        $metrics = Metric::orderBy('order')->orderBy('id')->get();

        return View::make('dashboard.metrics.index')
            ->withPageTitle(trans('dashboard.metrics.metrics').' - '.trans('dashboard.dashboard'))
            ->withMetrics($metrics);
    }
290642
public function index()
    {
        $this->authorize(PermissionsPolicy::PERMISSION_LIST);

        $permissions = $this->permission->with(['group'])
            ->withCount(['roles'])
            ->orderBy('group_id')
            ->paginate($this->perPage);

        $this->setTitle($title = trans('auth::permissions.titles.permissions-list'));
        $this->addBreadcrumb($title);

        return $this->view('admin.permissions.index', compact('permissions'));
    }
842052
public function display()
    {
        \http_response_code($this->getResponseCode());
        if ($this->contentType) {
            header('Content-Type: ' . $this->contentType);
        }
        //        header('Content-Length: ' . strlen($this->content));
        if ($this->redirection) {
            header('Location: ' . $this->redirection);
        }
        Events::dispatch('beforeResponseSend', array($this));
        session_write_close();
        print $this->content;
        Profiler::dump();
        Events::dispatch('afterResponseSend', array($this));
    }
532600
def tenant_dashboard(request, group_slug, tenant_slug):
    """"""
    groups = get_user_groups(request.user)
    group = get_object_or_404(groups, slug=group_slug)
    tenants = get_user_tenants(request.user, group)
    tenant = get_object_or_404(tenants, slug=tenant_slug)
    can_edit_tenant = request.user.has_perm('multitenancy.change_tenant', tenant)
    context = {
        'group': group,
        'tenant': tenant,
        'can_edit_tenant': can_edit_tenant,
    }
    return render(request, 'multitenancy/tenant-detail.html', context)
919385
public function index()
    {
        $stats     = $this->logViewer->statsTable();
        $chartData = $this->prepareChartData($stats);
        $percents  = $this->calcPercentages($stats->footer(), $stats->header());

        return $this->view('dashboard', compact('chartData', 'percents'));
    }
1364220
public function frontpage() {
        global $CFG, $SITE;

        $output = '';

        if (isloggedin() and !isguestuser() and isset($CFG->frontpageloggedin)) {
            $frontpagelayout = $CFG->frontpageloggedin;
        } else {
            $frontpagelayout = $CFG->frontpage;
        }

        foreach (explode(',', $frontpagelayout) as $v) {
            switch ($v) {
                // Display the main part of the front page.
                case FRONTPAGENEWS:
                    if ($SITE->newsitems) {
                        // Print forums only when needed.
                        require_once($CFG->dirroot .'/mod/forum/lib.php');
                        if (($newsforum = forum_get_course_forum($SITE->id, 'news')) &&
                                ($forumcontents = $this->frontpage_news($newsforum))) {
                            $newsforumcm = get_fast_modinfo($SITE)->instances['forum'][$newsforum->id];
                            $output .= $this->frontpage_part('skipsitenews', 'site-news-forum',
                                $newsforumcm->get_formatted_name(), $forumcontents);
                        }
                    }
                    break;

                case FRONTPAGEENROLLEDCOURSELIST:
                    $mycourseshtml = $this->frontpage_my_courses();
                    if (!empty($mycourseshtml)) {
                        $output .= $this->frontpage_part('skipmycourses', 'frontpage-course-list',
                            get_string('mycourses'), $mycourseshtml);
                    }
                    break;

                case FRONTPAGEALLCOURSELIST:
                    $availablecourseshtml = $this->frontpage_available_courses();
                    $output .= $this->frontpage_part('skipavailablecourses', 'frontpage-available-course-list',
                        get_string('availablecourses'), $availablecourseshtml);
                    break;

                case FRONTPAGECATEGORYNAMES:
                    $output .= $this->frontpage_part('skipcategories', 'frontpage-category-names',
                        get_string('categories'), $this->frontpage_categories_list());
                    break;

                case FRONTPAGECATEGORYCOMBO:
                    $output .= $this->frontpage_part('skipcourses', 'frontpage-category-combo',
                        get_string('courses'), $this->frontpage_combo_list());
                    break;

                case FRONTPAGECOURSESEARCH:
                    $output .= $this->box($this->course_search_form('', 'short'), 'mdl-align');
                    break;

            }
            $output .= '<br />';
        }

        return $output;
    }
1076501
public function showSetupView()
    {
        $this->subMenu['setup']['active'] = true;

        Session::flash('redirect_to', $this->subMenu['setup']['url']);

        return View::make('dashboard.settings.app-setup')
            ->withPageTitle(trans('dashboard.settings.app-setup.app-setup').' - '.trans('dashboard.dashboard'))
            ->withSubMenu($this->subMenu)
            ->withRawAppAbout(Config::get('setting.app_about'));
    }
1014372
public function listReportRoute()
    {
        $this->setTitleListReportRoute();
        $this->setBreadcrumbListReportRoute();
        $this->setFilterListReportRoute();
        $this->setPagerListReportRoute();

        $this->setData('routes', (array) $this->getListReportRoute());
        $this->setData('permissions', $this->getPermissionsReportRole());

        $this->outputListReportRoute();
    }
775624
public function showClearedActivityLog()
    {
        if (config('LaravelLogger.loggerPaginationEnabled')) {
            $activities = Activity::onlyTrashed()
                ->orderBy('created_at', 'desc')
                ->paginate(config('LaravelLogger.loggerPaginationPerPage'));
            $totalActivities = $activities->total();
        } else {
            $activities = Activity::onlyTrashed()
                ->orderBy('created_at', 'desc')
                ->get();
            $totalActivities = $activities->count();
        }

        self::mapAdditionalDetails($activities);

        $data = [
            'activities'        => $activities,
            'totalActivities'   => $totalActivities,
        ];

        return View('LaravelLogger::logger.activity-log-cleared', $data);
    }
614544
def dashboard(request):
    """"""
    sources = (models.Source.objects.all().prefetch_related('metric_set')
                                          .order_by('name'))
    metrics = SortedDict([(src, src.metric_set.all()) for src in sources])
    no_source_metrics = models.Metric.objects.filter(source__isnull=True)
    if no_source_metrics:
        metrics[''] = no_source_metrics

    if request.META.get('HTTP_X_PJAX', False):
        parent_template = 'pjax.html'
    else:
        parent_template = 'base.html'
    return render(request, 'metrics/dashboard.html', {
        'source_metrics': metrics,
        'parent_template': parent_template
    })
812889
def get_navigation(request):
    
    sections = _get_sections(request)
    trail = _get_trail(request, exclude_section=True)

    return mark_safe(render_to_string('navigation.html',
                                      dict(sections=sections,trail=trail)))