mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 02:28:09 +00:00 
			
		
		
		
	![hashicorp-copywrite[bot]](/assets/img/avatar_default.png) 0b12cdcfd1
			
		
	
	0b12cdcfd1
	
	
	
		
			
			* Adding explicit MPL license for sub-package. This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package. This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License. Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * add missing license headers * Update copyright file headers to BUS-1.1 * Fix test that expected exact offset on hcl file --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Sarah Thompson <sthompson@hashicorp.com> Co-authored-by: Brian Kassouf <bkassouf@hashicorp.com>
		
			
				
	
	
		
			81 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			Handlebars
		
	
	
	
	
	
			
		
		
	
	
			81 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			Handlebars
		
	
	
	
	
	
| {{!
 | |
|   Copyright (c) HashiCorp, Inc.
 | |
|   SPDX-License-Identifier: BUSL-1.1
 | |
| ~}}
 | |
| 
 | |
| {{! the class linked-block-item is needed for the read-more component }}
 | |
| <div data-test-info-table-item-array {{did-insert this.fetchOptions}} class="linked-block-item">
 | |
|   {{#if @isLink}}
 | |
|     <div data-test-row-value={{@label}}>
 | |
|       {{#if this.fetchComplete}}
 | |
|         <ReadMore>
 | |
|           {{#each this.displayArrayTruncated as |item|}}
 | |
|             {{#if (is-wildcard-string item)}}
 | |
|               {{#let (filter-wildcard item this.allOptions) as |wildcardCount|}}
 | |
|                 <span>{{item}}</span>
 | |
|                 <span class="tag is-light has-text-grey-dark" data-test-count={{wildcardCount}}>
 | |
|                   {{if (not-eq wildcardCount undefined) (concat "includes " wildcardCount)}}
 | |
|                   {{if (eq wildcardCount 1) @wildcardLabel (pluralize @wildcardLabel)}}
 | |
|                 </span>
 | |
|                 {{#if (eq this.displayArrayTruncated.lastObject item)}}
 | |
|                   <LinkTo @route={{this.rootRoute}} @query={{hash tab=@queryParam}}>
 | |
|                     <span data-test-view-all={{lowercase @label}}>View all {{lowercase @label}}.</span>
 | |
|                   </LinkTo>
 | |
|                 {{/if}}
 | |
|               {{/let}}
 | |
|             {{else}}
 | |
|               {{#if (is-array this.itemRoute)}}
 | |
|                 <LinkTo
 | |
|                   @route={{(get this.itemRoute "0")}}
 | |
|                   @models={{array (get this.itemRoute "1") item (get this.itemRoute "2")}}
 | |
|                 >
 | |
|                   {{or (get this.itemNameById item) item}}
 | |
|                 </LinkTo>
 | |
|               {{else}}
 | |
|                 <LinkTo
 | |
|                   @route={{this.itemRoute}}
 | |
|                   @model={{if @queryParam (concat @queryParam "/" item) item}}
 | |
|                   data-test-item={{item}}
 | |
|                 >
 | |
|                   <span>{{or (get this.itemNameById item) item}}</span>
 | |
|                 </LinkTo>
 | |
|               {{/if}}
 | |
|             {{/if}}
 | |
|             {{#if (not-eq item this.displayArrayTruncated.lastObject)}}
 | |
|               , 
 | |
|             {{/if}}
 | |
|             {{#unless this.doNotTruncate}}
 | |
|               {{#if (and (eq item this.displayArrayTruncated.lastObject) (gte @displayArray.length 10))}}
 | |
|                 {{! dec is a math helper that decrements by 5 the length of the array ex: 11-5 = "and 6 others."}}
 | |
|                 <span data-test-and={{dec 5 @displayArray.length}}>
 | |
|                    and
 | |
|                   {{dec 5 @displayArray.length}}
 | |
|                   others. 
 | |
|                 </span>
 | |
|               {{/if}}
 | |
|               {{#if (and (eq item this.displayArrayTruncated.lastObject) (gte @displayArray.length 10))}}
 | |
|                 {{#if (is-array @rootRoute)}}
 | |
|                   <LinkTo @route={{(get @rootRoute "0")}} @model={{(get @rootRoute "1")}}>
 | |
|                     <span data-test-view-all={{lowercase @label}}>View all {{lowercase @label}}.</span>
 | |
|                   </LinkTo>
 | |
|                 {{else}}
 | |
|                   <LinkTo @route={{this.rootRoute}} @query={{hash tab=@queryParam}}>
 | |
|                     <span data-test-view-all={{lowercase @label}}>View all {{lowercase @label}}.</span>
 | |
|                   </LinkTo>
 | |
|                 {{/if}}
 | |
|               {{/if}}
 | |
|             {{/unless}}
 | |
|           {{/each}}
 | |
|         </ReadMore>
 | |
|       {{/if}}
 | |
|     </div>
 | |
|   {{else}}
 | |
|     <code class="is-word-break has-text-black" data-test-row-value={{@label}}>
 | |
|       {{if
 | |
|         (gte @displayArray.length 10)
 | |
|         (concat @displayArray ", and " (dec 5 @displayArray.length) " more.")
 | |
|         @displayArray
 | |
|       }}
 | |
|     </code>
 | |
|   {{/if}}
 | |
| </div> |