From 8f5a392ed916fada524c1ee83c564319c8f265e7 Mon Sep 17 00:00:00 2001 From: Dmytro Kyrychenko Pantheon <112940673+dmytro-kyrychenko@users.noreply.github.com> Date: Fri, 23 Dec 2022 13:04:40 +0200 Subject: [PATCH] feat: 'Include Drafts' checkbox added to the UI search page (#14) * feat: added checkbox 'Include Drafts' on the UI search page * fix: fixed typo in html --- .../src/app/features/yang-search/models/search-input.ts | 1 + .../src/app/features/yang-search/yang-search.component.html | 3 +++ .../src/app/features/yang-search/yang-search.component.ts | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/yangcatalog-ui/src/app/features/yang-search/models/search-input.ts b/yangcatalog-ui/src/app/features/yang-search/models/search-input.ts index 80195b3..0dfb7f3 100644 --- a/yangcatalog-ui/src/app/features/yang-search/models/search-input.ts +++ b/yangcatalog-ui/src/app/features/yang-search/models/search-input.ts @@ -5,6 +5,7 @@ export interface SearchInput { 'include-mibs': boolean; 'latest-revision': boolean; 'use-synonyms': boolean; + 'include-drafts': boolean; 'searched-fields': string[]; 'yang-versions': string[]; 'schema-types': string[]; diff --git a/yangcatalog-ui/src/app/features/yang-search/yang-search.component.html b/yangcatalog-ui/src/app/features/yang-search/yang-search.component.html index c65d419..e546abd 100644 --- a/yangcatalog-ui/src/app/features/yang-search/yang-search.component.html +++ b/yangcatalog-ui/src/app/features/yang-search/yang-search.component.html @@ -33,6 +33,9 @@

YANG Search

+

Search Fields

diff --git a/yangcatalog-ui/src/app/features/yang-search/yang-search.component.ts b/yangcatalog-ui/src/app/features/yang-search/yang-search.component.ts index 00ccf6e..0c40dce 100644 --- a/yangcatalog-ui/src/app/features/yang-search/yang-search.component.ts +++ b/yangcatalog-ui/src/app/features/yang-search/yang-search.component.ts @@ -146,7 +146,8 @@ export class YangSearchComponent implements OnInit, OnDestroy, AfterViewInit { regularExpression: [false], includeMibs: [false], onlyLatestRevs: [true], - useSynonyms: [true] + useSynonyms: [true], + includeDrafts: [true], }), searchFields: this.fb.array( [ @@ -252,6 +253,7 @@ export class YangSearchComponent implements OnInit, OnDestroy, AfterViewInit { 'include-mibs': this.form.get('searchOptions').get('includeMibs').value, 'latest-revision': this.form.get('searchOptions').get('onlyLatestRevs').value, 'use-synonyms': this.form.get('searchOptions').get('useSynonyms').value, + 'include-drafts': this.form.get('searchOptions').get('includeDrafts').value, 'searched-fields': this.form.get('searchFields').value, 'yang-versions': this.form.get('yangVersions').value, 'schema-types': this.form.get('schemaTypes').value,