-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1230] Specify relay addresses for subnet
- Loading branch information
1 parent
8d4008e
commit 9fddda9
Showing
16 changed files
with
230 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
webui/src/app/array-value-set-form/array-value-set-form.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p-chips ngDefaultControl [allowDuplicate]="false" [addOnBlur]="true" [formControl]="classFormControl"> </p-chips> |
15 changes: 15 additions & 0 deletions
15
webui/src/app/array-value-set-form/array-value-set-form.component.sass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
:host ::ng-deep .p-chips | ||
width: 500px | ||
|
||
.p-chips-multiple-container | ||
width: 100% | ||
|
||
.p-chips-token | ||
background: var(--primary-100) | ||
color: var(--text-color) | ||
margin-top: 2px | ||
margin-bottom: 2px | ||
|
||
.p-chips-input-token input | ||
margin-top: 2px | ||
margin-bottom: 2px |
33 changes: 33 additions & 0 deletions
33
webui/src/app/array-value-set-form/array-value-set-form.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing' | ||
|
||
import { ArrayValueSetFormComponent } from './array-value-set-form.component' | ||
import { Chips, ChipsModule } from 'primeng/chips' | ||
import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms' | ||
import { NoopAnimationsModule } from '@angular/platform-browser/animations' | ||
import { By } from '@angular/platform-browser' | ||
|
||
describe('ArrayValueSetFormComponent', () => { | ||
let component: ArrayValueSetFormComponent<string> | ||
let fixture: ComponentFixture<ArrayValueSetFormComponent<string>> | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ArrayValueSetFormComponent], | ||
imports: [ChipsModule, FormsModule, NoopAnimationsModule, ReactiveFormsModule], | ||
}) | ||
fixture = TestBed.createComponent(ArrayValueSetFormComponent<string>) | ||
component = fixture.componentInstance | ||
component.classFormControl = new FormControl<string>(null) | ||
fixture.detectChanges() | ||
}) | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
|
||
it('should display chips component', () => { | ||
const chips = fixture.debugElement.query(By.directive(Chips)) | ||
const chipsComponent = chips.componentInstance as Chips | ||
expect(chipsComponent).toBeTruthy() | ||
}) | ||
}) |
20 changes: 20 additions & 0 deletions
20
webui/src/app/array-value-set-form/array-value-set-form.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Component, Input } from '@angular/core' | ||
import { FormControl } from '@angular/forms' | ||
|
||
/** | ||
* A component providing a form control for specifying an array of values. | ||
* | ||
* @tparam T Type of the values to specify. | ||
*/ | ||
@Component({ | ||
selector: 'app-array-value-set-form', | ||
templateUrl: './array-value-set-form.component.html', | ||
styleUrls: ['./array-value-set-form.component.sass'], | ||
}) | ||
export class ArrayValueSetFormComponent<T> { | ||
/** | ||
* A form bound to the "chips" input box holding the list of selected | ||
* class names. | ||
*/ | ||
@Input() classFormControl: FormControl<T> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.