Skip to content

Commit

Permalink
feat: 'Include Drafts' checkbox added to the UI search page (#14)
Browse files Browse the repository at this point in the history
* feat: added checkbox 'Include Drafts' on the UI search page

* fix: fixed typo in html
  • Loading branch information
dmytro-kyrychenko authored Dec 23, 2022
1 parent 1a1b004 commit 8f5a392
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ <h2>YANG Search</h2>
<label for="useSynonymsCheckbox" class="checkbox"><input id="useSynonymsCheckbox"
formControlName="useSynonyms" type="checkbox" /><i class="skin"></i> <span>Use
Synonyms</span></label>
<label for="includeDraftsCheckbox" class="checkbox"><input id="includeDraftsCheckbox"
formControlName="includeDrafts" type="checkbox" /><i class="skin"></i> <span>Include
Drafts</span></label>
</div>
<div class="options-category">
<p>Search Fields</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8f5a392

Please sign in to comment.