This is an automated email from the ASF dual-hosted git repository. bossenti pushed a commit to branch chore/STREAMPIPES-617 in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 142540b7727068e45399718c74375276bfc60072 Author: bossenti <[email protected]> AuthorDate: Mon Nov 7 21:03:05 2022 +0100 [STREAMPIPES-617] allow user to access API docs from the `Profile` menu --- .../components/token/token-management-settings.component.html | 10 +++++++++- ui/src/app/profile/profile.component.html | 6 +++--- ui/src/app/profile/profile.module.ts | 4 +++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ui/src/app/profile/components/token/token-management-settings.component.html b/ui/src/app/profile/components/token/token-management-settings.component.html index da3ca1b56..ebcd89392 100644 --- a/ui/src/app/profile/components/token/token-management-settings.component.html +++ b/ui/src/app/profile/components/token/token-management-settings.component.html @@ -50,7 +50,7 @@ <mat-divider class="divider"></mat-divider> <div fxLayout="column" class="subsection mt-10"> <div class="subsection-title">Existing API keys</div> - <div *ngIf="userData.userApiTokens.length == 0">(no keys available)</div> + <div *ngIf="userData.userApiTokens.length === 0">(no keys available)</div> <table mat-table [dataSource]="apiKeyDataSource" class="mat-elevation-z0" *ngIf="userData.userApiTokens.length > 0"> <ng-container matColumnDef="name"> <th mat-header-cell *matHeaderCellDef> Name</th> @@ -76,5 +76,13 @@ </div> </sp-split-section> <mat-divider></mat-divider> + <sp-split-section title="API Docs" subtitle="View the documentation of the StreamPipes API. Here you can see all provided endpoints and how to query them."> + <div fxLayout="column" class="subsection"> + <div fxLayout="column" class="subsection mt-8"></div> + <div> + <button mat-button mat-raised-button color="accent" routerLink="/apidocs">View API Docs</button> + </div> + </div> + </sp-split-section> </div> </div> diff --git a/ui/src/app/profile/profile.component.html b/ui/src/app/profile/profile.component.html index dd34979ce..c86aada01 100644 --- a/ui/src/app/profile/profile.component.html +++ b/ui/src/app/profile/profile.component.html @@ -24,7 +24,7 @@ <div fxFlex fxLayoutAlign="start center" [attr.id]="'peType'"> <mat-tab-group [selectedIndex]="selectedIndex" (selectedIndexChange)="selectedIndexChange($event)" color="accent"> <mat-tab label="General Settings"></mat-tab> - <mat-tab label="API Keys"></mat-tab> + <mat-tab label="API"></mat-tab> </mat-tab-group> </div> </div> @@ -32,10 +32,10 @@ </div> <div class="fixed-height page-container-padding-inner" fxLayout="column" fxFlex="100"> - <div class="fixed-height page-container-padding-inner" fxLayout="column" fxFlex="100" *ngIf="selectedIndex == 0"> + <div class="fixed-height page-container-padding-inner" fxLayout="column" fxFlex="100" *ngIf="selectedIndex === 0"> <general-profile-settings fxFlex="100"></general-profile-settings> </div> - <div class="fixed-height page-container-padding-inner" fxLayout="column" fxFlex="100" *ngIf="selectedIndex == 1"> + <div class="fixed-height page-container-padding-inner" fxLayout="column" fxFlex="100" *ngIf="selectedIndex === 1"> <token-management-settings fxFlex="100"></token-management-settings> </div> </div> diff --git a/ui/src/app/profile/profile.module.ts b/ui/src/app/profile/profile.module.ts index 1d908e6f6..244ec9acb 100644 --- a/ui/src/app/profile/profile.module.ts +++ b/ui/src/app/profile/profile.module.ts @@ -33,6 +33,7 @@ import { CoreUiModule } from '../core-ui/core-ui.module'; import { PlatformServicesModule } from '@streampipes/platform-services'; import { ChangePasswordDialogComponent } from './dialog/change-password/change-password-dialog.component'; import { ChangeEmailDialogComponent } from './dialog/change-email/change-email-dialog.component'; +import {RouterLink} from "@angular/router"; @NgModule({ imports: [ @@ -46,7 +47,8 @@ import { ChangeEmailDialogComponent } from './dialog/change-email/change-email-d CommonModule, ClipboardModule, CoreUiModule, - PlatformServicesModule + PlatformServicesModule, + RouterLink ], declarations: [ ChangeEmailDialogComponent,
