From a99c39c5a402a3e4fa197d2d9598883529ae3bc0 Mon Sep 17 00:00:00 2001 From: Dragos Date: Thu, 6 May 2021 20:49:12 +0300 Subject: [PATCH] help page --- app/.vs/app/v16/.suo | Bin 57856 -> 75776 bytes app/.vs/slnx.sqlite | Bin 135168 -> 135168 bytes app/src/app/app-routing.module.ts | 12 ++++ .../nav-menu/nav-menu.component.html | 29 ++------- app/src/app/help/help.module.ts | 49 ++++++++++++++ app/src/app/help/help/help.component.html | 32 ++++++++++ app/src/app/help/help/help.component.scss | 0 app/src/app/help/help/help.component.spec.ts | 25 ++++++++ app/src/app/help/help/help.component.ts | 60 ++++++++++++++++++ .../app/helpers/static-html.service.spec.ts | 16 +++++ app/src/app/helpers/static-html.service.ts | 30 +++++++++ app/src/app/shared.module.ts | 4 +- app/src/assets/help/account-info.html | 1 + app/src/assets/i18n/en.json | 7 +- app/src/assets/i18n/help/en.json | 7 ++ 15 files changed, 245 insertions(+), 27 deletions(-) create mode 100644 app/src/app/help/help.module.ts create mode 100644 app/src/app/help/help/help.component.html create mode 100644 app/src/app/help/help/help.component.scss create mode 100644 app/src/app/help/help/help.component.spec.ts create mode 100644 app/src/app/help/help/help.component.ts create mode 100644 app/src/app/helpers/static-html.service.spec.ts create mode 100644 app/src/app/helpers/static-html.service.ts create mode 100644 app/src/assets/help/account-info.html create mode 100644 app/src/assets/i18n/help/en.json diff --git a/app/.vs/app/v16/.suo b/app/.vs/app/v16/.suo index d867b7ff9ec3a5131624ae5b8d98c0c1045860ad..4d63784be13eb704c5396a33913358e7e2e65584 100644 GIT binary patch delta 9841 zcmeHN3s{s@-ha<4;BXNKxrjpCL{wy8ZomL)fFuT_fTD)z3d0~E49E-wBMK8_fzx#}*GNw(Xz*uPG*Zu0%kT!0u5+iYu}XJ4Kl|MQ;v zIsfZ9@6@-Cs6TDDNlcp`ck~u=+*pp|?10-nJv|^C0VcL&`0%dcspEw&B)&sXiQ{sq zj@OZO#v8mdsdGcdSEz4&SlbxnvG<28)EAW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v9=sTbWr_;(~i&u}*9V6}U2=D+`K?WD*S!>_d!B z>;OgXe3vt`!ZSaQmHHsgH>7G9+vEd{y;KWUEfLUiXK|Uc+>^=Gvpuy?!1N|qaCZX9 zK%uZ1W3wkznL89L7ap~cSTmoo6G~!Xl4eth&5Y&oI4eAAENk#W2K&|vLv)QK0)!pM zWEfl4K?^oKFT+#FH>I-8@NR@;U>%#_CY&)os)P3s`=TDEl6+Fgu@Rf$(@beH`G@q9 zW8@IoOBzWDnL~z?1ft-J_!!=g+i)XZg_q!YI2Wg3Y+ToW? zjvGJ>;{;3xY$G{7e|5C6rU_nDB)XR)Y2-n~{GE`*lD0#0R4=C^cWI%s*pmaIjf{n$ zEyl_Z`kmholDcG zq+im1)Z6q*eU=`toi*8^T$>_Z5x*2)7gvZAL|*t_*e1LrxP^y>5&SLwDE}e9k$3R9 zd@{LA4w8COK<1Kcl1O-*a|!>1KgL_ksak-?;b`NJX(k*qf{ir?{Eyd zU<<5-#~}+;_TCv79=FIW*#DPW!=bgY`T!>%EWM<#h?{ zl!ole0AHG3wz8x?NMuPm5=cl)*O5K=o7u{xnr+K7o1R}hKm?KAgAe`OSP_i+x4-OIR;#-(_8I~ADm*FaDXq|4fT!Uqb)w~{B^fWy{+vuiF zD{|2}Zl}AneDy#>BZ1?+i_M8cvT%orB9=JsB6CJfON5jn2G(-{62nztH~u^S3oQ;L AKmY&$ diff --git a/app/src/app/app-routing.module.ts b/app/src/app/app-routing.module.ts index b75f9e3..7c8962c 100644 --- a/app/src/app/app-routing.module.ts +++ b/app/src/app/app-routing.module.ts @@ -71,6 +71,18 @@ const appRoutes: Routes = [ icon: 'user-cog' } }, + { + path: 'help', + loadChildren: () => import('./help/help.module').then(x => x.HelpModule), + canActivate: [AuthGuardService], + canLoad: [AuthGuardService], + data: + { + title: 'help.title', + subTitle: 'help.subTitle', + icon: 'question-circle' + } + }, { path: 'unauthorized', component: UnauthorizedComponent diff --git a/app/src/app/components/nav-menu/nav-menu.component.html b/app/src/app/components/nav-menu/nav-menu.component.html index a654baf..42c3f01 100644 --- a/app/src/app/components/nav-menu/nav-menu.component.html +++ b/app/src/app/components/nav-menu/nav-menu.component.html @@ -31,13 +31,6 @@ {{ 'navbar.menu.security' | translate }} - - - - + diff --git a/app/src/app/help/help.module.ts b/app/src/app/help/help.module.ts new file mode 100644 index 0000000..7453a27 --- /dev/null +++ b/app/src/app/help/help.module.ts @@ -0,0 +1,49 @@ +import { NgModule } from '@angular/core'; + +import { SharedModule } from '../shared.module'; +import { RouterModule } from '@angular/router'; + +import { WebpackTranslateLoader } from '../helpers/webpack-translate-loader.service'; +import { LangChangeEvent, TranslateCompiler, TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core'; +import { TranslateMessageFormatCompiler } from 'ngx-translate-messageformat-compiler'; +import { HelpComponent } from './help/help.component'; + +@NgModule({ + declarations: [HelpComponent], + imports: [ + SharedModule, + RouterModule.forChild([ + { + path: '', + component: HelpComponent, + data: + { + title: 'help.title', + subTitle: 'help.subTitle', + icon: 'help-circle' + } + } + ]), + TranslateModule.forChild({ + loader: { + provide: TranslateLoader, + //useClass: WebpackTranslateLoader + useFactory: () => new WebpackTranslateLoader('help') + }, + compiler: { + provide: TranslateCompiler, + useFactory: () => new TranslateMessageFormatCompiler() + }, + isolate: true + }) + ] +}) +export class HelpModule +{ + constructor(private readonly translate: TranslateService) + { + translate.use(translate.store.currentLang); + + translate.store.onLangChange.subscribe((event: LangChangeEvent) => translate.use(event.lang)); + } +} diff --git a/app/src/app/help/help/help.component.html b/app/src/app/help/help/help.component.html new file mode 100644 index 0000000..cef58b1 --- /dev/null +++ b/app/src/app/help/help/help.component.html @@ -0,0 +1,32 @@ +
+
+ +
+ Loading... +
+
+ +
+
+ + + +
+

{{ helpTopic.title }}

+ + +
+ +
+
+ Loading... +
+ +
+
+
+
+ +
+
+
diff --git a/app/src/app/help/help/help.component.scss b/app/src/app/help/help/help.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/app/src/app/help/help/help.component.spec.ts b/app/src/app/help/help/help.component.spec.ts new file mode 100644 index 0000000..7f33b9f --- /dev/null +++ b/app/src/app/help/help/help.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HelpComponent } from './help.component'; + +describe('HelpComponent', () => { + let component: HelpComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ HelpComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(HelpComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/app/src/app/help/help/help.component.ts b/app/src/app/help/help/help.component.ts new file mode 100644 index 0000000..158217f --- /dev/null +++ b/app/src/app/help/help/help.component.ts @@ -0,0 +1,60 @@ +import { Component, OnInit } from '@angular/core'; +import { DomSanitizer } from '@angular/platform-browser'; +import { StaticHtmlService } from '../../helpers/static-html.service'; + +@Component({ + selector: 'app-help', + templateUrl: './help.component.html', + styleUrls: ['./help.component.scss'] +}) +export class HelpComponent implements OnInit +{ + helpTopics = [ + { + title: 'Completing account information', + contentUrl: './assets/help/account-info.html' + }, + { + title: 'Provisioning compute instance', + contentUrl: '' + }, + { + title: 'Managing instances with Triton CLI', + contentUrl: '' + } + ]; + + // ---------------------------------------------------------------------------------------------------------------- + constructor(private readonly staticHtmlService: StaticHtmlService, + private readonly domSanitizer: DomSanitizer) + { + } + + // ---------------------------------------------------------------------------------------------------------------- + getHelpTopicContent(isOpen, helpTopic) + { + helpTopic.expanded = isOpen; + + if (!isOpen || !helpTopic.contentUrl || helpTopic.content) return; + + helpTopic.loading = true; + + this.staticHtmlService + .getStaticHtml(helpTopic.contentUrl, helpTopic.contentUrl.startsWith(window.location.origin)) + .subscribe(response => + { + helpTopic.content = this.domSanitizer.bypassSecurityTrustHtml(response); + helpTopic.loading = false; + }, err => + { + helpTopic.content = err.error?.message; + helpTopic.loading = false; + }); + } + + // ---------------------------------------------------------------------------------------------------------------- + ngOnInit(): void + { + + } +} diff --git a/app/src/app/helpers/static-html.service.spec.ts b/app/src/app/helpers/static-html.service.spec.ts new file mode 100644 index 0000000..6f1a584 --- /dev/null +++ b/app/src/app/helpers/static-html.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { StaticHtmlService } from './static-html.service'; + +describe('StaticHtmlService', () => { + let service: StaticHtmlService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(StaticHtmlService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/app/src/app/helpers/static-html.service.ts b/app/src/app/helpers/static-html.service.ts new file mode 100644 index 0000000..61eae2b --- /dev/null +++ b/app/src/app/helpers/static-html.service.ts @@ -0,0 +1,30 @@ +import { Injectable, SecurityContext } from '@angular/core'; +import { Observable } from 'rxjs'; +import { HttpClient } from '@angular/common/http'; +import { DomSanitizer } from '@angular/platform-browser'; +import { map } from 'rxjs/operators'; + +@Injectable({ + providedIn: 'root' +}) +export class StaticHtmlService +{ + // ---------------------------------------------------------------------------------------------------------------- + constructor( + private readonly httpClient: HttpClient, + private readonly domSanitizer: DomSanitizer, + ) { } + + // ---------------------------------------------------------------------------------------------------------------- + getStaticHtml(url: string, isTrusted: boolean): Observable + { + return this.httpClient.get(url, { responseType: 'text' }) + .pipe(map(response => this.mapStaticHtml(response, isTrusted))); + } + + // ---------------------------------------------------------------------------------------------------------------- + private mapStaticHtml(htmlString: string, isTrusted: boolean): string + { + return isTrusted ? htmlString : this.domSanitizer.sanitize(SecurityContext.HTML, htmlString); + } +} diff --git a/app/src/app/shared.module.ts b/app/src/app/shared.module.ts index a66bb67..28be3dd 100644 --- a/app/src/app/shared.module.ts +++ b/app/src/app/shared.module.ts @@ -33,7 +33,7 @@ import faArrowsAlt, faTags, faEllipsisV, faHatWizard, faUserCog, faCircle, faAngleLeft, faExternalLinkAlt, faCheck, faPowerOff, faBars, faSpinner, faStop, faPlay, faRedo, faMicrochip, faDesktop, faCopy, faSquare, faCheckSquare, faSave, faDatabase, faClone, faSearch, faHistory, faMask, faCloud, faCloudUploadAlt, faEye, faFingerprint, faLink, faClipboard, faCoins, faArrowRight, faEllipsisH, faStar, faCommentAlt, faOutdent, - faUndo + faUndo, faQuestionCircle } from '@fortawesome/free-solid-svg-icons'; import { faDocker } from '@fortawesome/free-brands-svg-icons'; @@ -149,7 +149,7 @@ export class SharedModule faArrowsAlt, faTags, faEllipsisV, faHatWizard, faUserCog, faCircle, faAngleLeft, faExternalLinkAlt, faCheck, faPowerOff, faBars, faSpinner, faStop, faPlay, faRedo, faMicrochip, faDesktop, faCopy, faSquare, faCheckSquare, faSave, faDatabase, faClone, faSearch, faHistory, faMask, faCloud, faCloudUploadAlt, faEye, faFingerprint, faLink, faClipboard, faCoins, faArrowRight, faEllipsisH, faStar, faCommentAlt, faOutdent, - faUndo + faUndo, faQuestionCircle ); } } diff --git a/app/src/assets/help/account-info.html b/app/src/assets/help/account-info.html new file mode 100644 index 0000000..51992ff --- /dev/null +++ b/app/src/assets/help/account-info.html @@ -0,0 +1 @@ +

Title goes here...

diff --git a/app/src/assets/i18n/en.json b/app/src/assets/i18n/en.json index c59f397..de27c4a 100644 --- a/app/src/assets/i18n/en.json +++ b/app/src/assets/i18n/en.json @@ -11,7 +11,8 @@ "virtualNetworks": "Virtual Networks", "firewallRules": "Firewall rules", "security": "Security", - "account": "Account" + "account": "Account", + "help": "Help" } }, "account": @@ -61,5 +62,9 @@ { "title": "Security", "subTitle": "Manage your users, roles and security policies" + }, + "help": + { + "title": "Help" } } diff --git a/app/src/assets/i18n/help/en.json b/app/src/assets/i18n/help/en.json new file mode 100644 index 0000000..8a7157a --- /dev/null +++ b/app/src/assets/i18n/help/en.json @@ -0,0 +1,7 @@ + +{ + "help": + { + "title": "Help" + } +}