File

src/app/tool-page/tool-view/tool-view.component.ts

Description

Container for the tool view.

Metadata

selector app-tool-view
styleUrls tool-view.component.css
templateUrl ./tool-view.component.html

Index

Properties
Methods

Constructor

constructor(courseService: CourseService, toolService: ToolService, settingsService: SettingsService)

Constructor

Parameters :
Name Type Optional Description
courseService CourseService no

Provides information and management for the currently selected courses.

toolService ToolService no

Provides information and management for available tools.

settingsService SettingsService no

Provides this component with access to user settings.

Methods

getIssueCount
getIssueCount()

Determines the current total count of issues from all selected courses discovered by the currently selected tool.

Returns : any

Properties

Public courseService
courseService: CourseService
Type : CourseService
Provides information and management for the currently selected courses.
Public settingsService
settingsService: SettingsService
Type : SettingsService
Provides this component with access to user settings.
Public toolService
toolService: ToolService
Type : ToolService
Provides information and management for available tools.
import { Component } from '@angular/core';
import { CourseService } from '../../course.service';
import { ToolService } from '../../tool.service';
import { SettingsService } from '../../settings.service';

/**
 * Container for the tool view.
 */
@Component({
    selector: 'app-tool-view',
    templateUrl: './tool-view.component.html',
    styleUrls: ['./tool-view.component.css']
})
export class ToolViewComponent {

    /**
     * Constructor
     * @param courseService Provides information and management for the currently selected courses.
     * @param toolService Provides information and management for available tools.
     * @param settingsService Provides this component with access to user settings.
     */
    constructor(public courseService: CourseService,
        public toolService: ToolService,
        public settingsService: SettingsService) { }

    /**
     * Determines the current total count of issues from all selected courses
     * discovered by the currently selected tool.
     */
    getIssueCount() {
        return this.courseService.courses.reduce((acc, course) => {
            if (!course.issueItems) return acc;
            return acc += course.issueItems.reduce((acc2, issueItem) => {
                if (!issueItem.issues) return acc2;
                return acc2 += issueItem.issues.length;
            }, 0)
        }, 0);
    }
}
<div *ngIf="courseService.selectedCourse.processing">
    <div class="progress">
        <div class="indeterminate"></div>
    </div>
    <div class="ashen-text">
        {{settingsService.checkLocalStorage('goofMessages') ? settingsService.buildProcessingMessage() : toolService.processingMessage}}
    </div>
</div>

<div class="issueContainer" *ngIf="!courseService.selectedCourse.processing">
    <app-issue-list></app-issue-list>
    <div>
        <app-issue-details></app-issue-details>
        <app-issue-nav></app-issue-nav>
    </div>
</div>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""