File

src/app/about/components/about-more/about-details.component.ts

Description

Component About Details.

Implements

OnInit

Example

Metadata

selector app-about-details
styleUrls ../../about/styles.scss
templateUrl ./about-details.component.html

Index

Properties
Methods

Constructor

constructor(aboutService: AboutService, notificationService: NotificationService, loggerService: LoggerService, router: Router)

Constructor

Parameters :
Name Type Optional Description
aboutService AboutService
notificationService NotificationService
loggerService LoggerService
router Router

Methods

cancel
cancel()

Cancel

Returns : void
isEmpty
isEmpty(obj: )

Is Empty

Parameters :
Name Type Optional Description
obj
Returns : boolean
ngOnInit
ngOnInit()

On init

Returns : void
onCopyToClipboardSuccess
onCopyToClipboardSuccess(e: )

Copy On Clipboard

Parameters :
Name Type Optional Description
e
Returns : void

Properties

Public dataflowVersionInfo$
dataflowVersionInfo$: Observable<AboutInfo>
Type : Observable<AboutInfo>

Observabe About Info

import { Component, OnInit } from '@angular/core';
import { AboutService } from '../../about.service';
import { Router } from '@angular/router';
import { Observable } from 'rxjs';
import { AboutInfo } from '../../../shared/model/about/about-info.model';
import { NotificationService } from '../../../shared/services/notification.service';
import { LoggerService } from '../../../shared/services/logger.service';

/**
 * Component About Details.
 *
 * @author Gunnar Hillert
 * @author Damien Vitrac
 */
@Component({
  selector: 'app-about-details',
  styleUrls: ['./../../about/styles.scss'],
  templateUrl: './about-details.component.html'
})
export class AboutDetailsComponent implements OnInit {

  /**
   * Observabe About Info
   */
  public dataflowVersionInfo$: Observable<AboutInfo>;

  /**
   * Constructor
   *
   * @param {AboutService} aboutService
   * @param {NotificationService} notificationService
   * @param {LoggerService} loggerService
   * @param {Router} router
   */
  constructor(private aboutService: AboutService,
              private notificationService: NotificationService,
              private loggerService: LoggerService,
              private router: Router) {
  }

  /**
   * On init
   */
  ngOnInit() {
    this.dataflowVersionInfo$ = this.aboutService.getDetails();
  }

  /**
   * Cancel
   */
  cancel() {
    this.router.navigate(['about']);
  }

  /**
   * Copy On Clipboard
   * @param e
   */
  onCopyToClipboardSuccess(e) {
    this.notificationService.success('Copied About Details to Clipboard (As JSON).');
    this.loggerService.log(e);
  }

  /**
   * Is Empty
   *
   * @param obj
   * @returns {boolean}
   */
  isEmpty(obj) {
    for (const prop in obj) {
      if (obj.hasOwnProperty(prop)) {
        return false;
      }
    }
    return true;
  }
}
<ng-container *ngIf="dataflowVersionInfo$ | async as dataflowVersionInfo; else loading">

  <div *ngIf="dataflowVersionInfo" class="infos infos-more">

    <div class="actions">
      <button id="copy-button" [ngxClipboard] [cbContent]="dataflowVersionInfo | json"
              (cbOnSuccess)="onCopyToClipboardSuccess($event);" type="button" class="btn btn-fa btn-primary">
        <span class="fa fa-copy"></span>
        <span>Copy Details to Clipboard</span>
      </button>
    </div>

    <div class="box">
      <span class="fa fa-cubes" aria-hidden="true"></span>
      <h2>Enabled Features</h2>
      <div id="enabledFeaturesTable">
        <div class="line">
          <span>Streams: </span>
          <strong *ngIf="dataflowVersionInfo.featureInfo.streamsEnabled"id="streamsEnabled">
            <span class="fa fa-check"></span>
          </strong>
          <strong *ngIf="!dataflowVersionInfo.featureInfo.streamsEnabled" id="streamsDisabled">
            <span class="fa fa-close"></span>
          </strong>
        </div>
        <div class="line">
          <span>Tasks: </span>
          <strong *ngIf="dataflowVersionInfo.featureInfo.tasksEnabled" id="tasksEnabled">
            <span class="fa fa-check"></span>
          </strong>
          <strong *ngIf="!dataflowVersionInfo.featureInfo.tasksEnabled" id="tasksDisabled">
            <span class="fa fa-close"></span>
          </strong>
        </div>
        <div class="line">
          <span>Schedules: </span>
          <strong *ngIf="dataflowVersionInfo.featureInfo.schedulesEnabled" id="schedulesEnabled">
            <span class="fa fa-check"></span>
          </strong>
          <strong *ngIf="!dataflowVersionInfo.featureInfo.schedulesEnabled" id="schedulerDisabled">
            <span class="fa fa-close"></span>
          </strong>
        </div>
        <div class="line">
          <span>Grafana: </span>
          <strong *ngIf="dataflowVersionInfo.featureInfo.grafanaEnabled" id="grafanaEnabled">
            <span class="fa fa-check"></span>
          </strong>
          <strong *ngIf="!dataflowVersionInfo.featureInfo.grafanaEnabled" id="grafanaDisabled">
            <span class="fa fa-close"></span>
          </strong>
        </div>
      </div>
    </div>

    <div class="box">
      <span class="fa fa-shield"></span>
      <h2>Security Information</h2>
      <div id="securityInformationTable">
        <div class="line">
          <span>Authentication Enabled: </span>
          <strong *ngIf="dataflowVersionInfo.securityInfo.isAuthenticationEnabled" id="authenticationEnabled">
            <span class="fa fa-check"></span>
          </strong>
          <strong *ngIf="!dataflowVersionInfo.securityInfo.isAuthenticationEnabled" id="authenticationDisabled">
            <span class="fa fa-close"></span>
          </strong>
        </div>
        <div class="line">
          <span>Authenticated: </span>
          <strong *ngIf="dataflowVersionInfo.securityInfo.isAuthenticated" id="authenticateEnabled">
            <span class="fa fa-check"></span>
          </strong>
          <strong *ngIf="!dataflowVersionInfo.securityInfo.isAuthenticated" id="authenticateDisabled">
            <span class="fa fa-close"></span>
          </strong>
        </div>
        <div class="line" *ngIf="dataflowVersionInfo.securityInfo.username">
          <span>Username: </span>
          <strong id="username">{{ dataflowVersionInfo.securityInfo.username || 'N/A' }}</strong>
        </div>
        <div class="line" *ngIf="dataflowVersionInfo.securityInfo.roles?.length > 0">
          <span>Roles: </span>
          <strong id="roles">{{ dataflowVersionInfo.securityInfo.roles }}</strong>
        </div>
      </div>
    </div>


    <div class="box">
      <span class="fa fa-code-fork"></span>
      <h2>Version Information</h2>
      <div id="versionInformationTable">
        <div class="line">
          <span>Implementation Version: </span>
          <strong id="implementationVersion">
            {{ dataflowVersionInfo.versionInfo.implementation.version }} ({{ dataflowVersionInfo.versionInfo.implementation.name }})
          </strong>
        </div>
        <div class="line">
          <span>Core: </span>
          <strong id="coreVersion">
            {{ dataflowVersionInfo.versionInfo.core.version }} ({{ dataflowVersionInfo.versionInfo.core.name }})
          </strong>
        </div>
        <div class="line">
          <span>Dashboard: </span>
          <strong id="dashboardVersion">
            {{ dataflowVersionInfo.versionInfo.dashboard.version }} ({{ dataflowVersionInfo.versionInfo.dashboard.name }})
          </strong>
        </div>
        <div class="line">
          <span>Shell: </span>
          <strong id="shellVersion">
            {{ dataflowVersionInfo.versionInfo.shell.version }} ({{ dataflowVersionInfo.versionInfo.shell.name }})
          </strong>
        </div>
        <div id="shellChecksumSha1" class="line" *ngIf="dataflowVersionInfo.versionInfo.shell.checksumSha1">
          <span>Shell Checksum Sha1: </span>
          <strong>{{ dataflowVersionInfo.versionInfo.shell.checksumSha1 }}</strong>
        </div>
        <div id="shellChecksumSha256" class="line" *ngIf="dataflowVersionInfo.versionInfo.shell.checksumSha256">
          <span>Shell Checksum Sha256: </span> <strong>{{ dataflowVersionInfo.versionInfo.shell.checksumSha256 }}</strong>
        </div>
      </div>
    </div>

    <div class="box">
      <span class="fa fa-cube"></span>
      <h2>Runtime Environment - Skipper Deployer</h2>
      <div id="appDeployerTable">
        <div class="line">
          <span>Implementation Version: </span>
          <strong>{{ dataflowVersionInfo.runtimeEnvironment.appDeployer.deployerImplementationVersion }}</strong>
        </div>
        <div class="line">
          <span>Name: </span>
          <strong>{{ dataflowVersionInfo.runtimeEnvironment.appDeployer.deployerName || 'N/A' }}</strong>
        </div>
        <div class="line">
          <span>Spi Version: </span>
          <strong>{{ dataflowVersionInfo.runtimeEnvironment.appDeployer.deployerSpiVersion || 'N/A' }}</strong>
        </div>
        <div class="line">
          <span>Java Version: </span>
          <strong>{{ dataflowVersionInfo.runtimeEnvironment.appDeployer.javaVersion || 'N/A' }}</strong>
        </div>
        <div class="line">
          <span>Platform Api Version: </span>
          <strong>{{ dataflowVersionInfo.runtimeEnvironment.appDeployer.platformApiVersion || 'N/A' }}</strong>
        </div>
        <div class="line">
          <span>Platform Client Version: </span>
          <strong>{{ dataflowVersionInfo.runtimeEnvironment.appDeployer.platformClientVersion || 'N/A' }}</strong>
        </div>
        <div class="line">
          <span>Platform Host Version: </span>
          <strong>{{ dataflowVersionInfo.runtimeEnvironment.appDeployer.platformHostVersion || 'N/A' }}</strong>
        </div>
        <div class="line">
          <span>Platform Type: </span>
          <strong>{{ dataflowVersionInfo.runtimeEnvironment.appDeployer.platformType || 'N/A' }}</strong>
        </div>
        <div class="line">
          <span>Spring Boot Version: </span>
          <strong>{{ dataflowVersionInfo.runtimeEnvironment.appDeployer.springBootVersion || 'N/A' }}</strong>
        </div>
        <div class="line">
          <span>Spring Version: </span>
          <strong>{{ dataflowVersionInfo.runtimeEnvironment.appDeployer.springVersion || 'N/A' }}</strong>
        </div>
      </div>
    </div>

    <div class="box">
      <h2>Platform-specific Information of the Skipper Deployer</h2>
      <div id="appDeployerPlatformSpecificTable">
        <ng-template
          *ngIf="dataflowVersionInfo.runtimeEnvironment.appDeployer.platformSpecificInfo && dataflowVersionInfo.runtimeEnvironment.appDeployer.platformSpecificInfo.size > 0"
          ngFor let-item
          [ngForOf]="dataflowVersionInfo.runtimeEnvironment.appDeployer.platformSpecificInfo | keyvalue">
          <div class="line">
            <span>{{ item.key }}: </span> <strong>{{ item.value }}</strong>
          </div>
        </ng-template>
        <div
          *ngIf="!dataflowVersionInfo.runtimeEnvironment.appDeployer.platformSpecificInfo || dataflowVersionInfo.runtimeEnvironment.appDeployer.platformSpecificInfo.size == 0">
          <span id="noAppDeployerPlatformMessage">
            No platform-specific app deployer information available.
          </span>
        </div>
      </div>
    </div>

    <div class="box">
      <span class="fa fa-cube"></span>
      <h2>Runtime Environment - Task Launcher</h2>
      <div>
        <div *ngIf="isEmpty(dataflowVersionInfo.runtimeEnvironment.taskLaunchers)">
          <span>No Task Launcher information is available.</span>
        </div>
          <div *ngIf="!isEmpty(dataflowVersionInfo.runtimeEnvironment.taskLaunchers)" id="taskLauncherTable">
            <ng-template
                ngFor let-item
                [ngForOf]="dataflowVersionInfo.runtimeEnvironment.taskLaunchers">
            <div class="line">
              <span>Implementation Version: </span>
              <strong>{{ item.deployerImplementationVersion }}</strong>
            </div>
            <div class="line">
              <span>Name: </span>
              <strong>{{ item.deployerName }}</strong>
            </div>
            <div class="line">
              <span>Spi Version: </span>
              <strong>{{ item.deployerSpiVersion }}</strong>
            </div>
            <div class="line">
              <span>Java Version: </span>
              <strong>{{ item.javaVersion }}</strong>
            </div>
            <div class="line">
              <span>Platform Api Version: </span>
              <strong>{{ item.platformApiVersion }}</strong>
            </div>
            <div class="line">
              <span>Platform Client Version: </span>
              <strong>{{ item.platformClientVersion }}</strong>
            </div>
            <div class="line">
              <span>Platform Host Version: </span>
              <strong>{{ item.platformHostVersion }}</strong>
            </div>
            <div class="line">
              <span>Platform Type: </span>
              <strong>{{ item.platformType }}</strong>
            </div>
            <div class="line">
              <span>Spring Boot Version: </span>
              <strong>{{ item.springBootVersion }}</strong>
            </div>
            <div class="line">
              <span>Spring Version: </span>
              <strong>{{ item.springVersion }}</strong>
            </div>
            <div class="box">
              <h2>Platform-specific Information of the Task Launcher</h2>
              <div id="appTaskLauncherPlatformSpecificTable">
                <ng-template
                  *ngIf="item.platformSpecificInfo && item.platformSpecificInfo.size > 0"
                  ngFor let-item
                  [ngForOf]="item.platformSpecificInfo | keyvalue">
                  <div class="line">
                    <span>{{ item.key }}: </span> <strong>{{ item.value }}</strong>
                  </div>
                </ng-template>
                <div
                  *ngIf="!item.platformSpecificInfo || item.platformSpecificInfo.size == 0">
          <span id="noTaskLauncherPlatformMessage">
            No platform-specific task launcher information available.
          </span>
                </div>
              </div>
            </div>
            </ng-template>
          </div>
      </div>
    </div>

  </div>

</ng-container>

<ng-template #loading>
  <app-loader></app-loader>
</ng-template>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""