diff --git a/ui/package.json b/ui/package.json
index 42dbf41a4..98bfc9ee7 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -4,7 +4,7 @@
"license": "MIT",
"scripts": {
"ng": "ng",
- "start": "ng serve --proxy-config proxy.conf.json",
+ "start": "ng serve --proxy-config proxy.conf.json --i18nFile=./src/locale/en.xlf --i18nFormat=xlf --locale=es --aot",
"build": "ng build",
"test": "ng test --code-coverage",
"lint": "ng lint",
diff --git a/ui/src/app/app.component.html b/ui/src/app/app.component.html
index 2a0ada9c8..0cbc98e1d 100644
--- a/ui/src/app/app.component.html
+++ b/ui/src/app/app.component.html
@@ -11,18 +11,42 @@
+ -
+
+
+
-
Manage Providers
- -
-
-
- Add new provider
-
-
-
diff --git a/ui/src/app/app.component.scss b/ui/src/app/app.component.scss
index e72a7d96c..769799707 100644
--- a/ui/src/app/app.component.scss
+++ b/ui/src/app/app.component.scss
@@ -1,4 +1,8 @@
@import '../theme/palette';
nav.navbar {
background-color: $white;
+
+ .dropdown-menu {
+ min-width: 12rem;
+ }
}
\ No newline at end of file
diff --git a/ui/src/app/metadata-filter/action/filter.action.ts b/ui/src/app/metadata-filter/action/filter.action.ts
new file mode 100644
index 000000000..65046c903
--- /dev/null
+++ b/ui/src/app/metadata-filter/action/filter.action.ts
@@ -0,0 +1,12 @@
+import { Action } from '@ngrx/store';
+
+export const QUERY_ENTITY_IDS = '[Filter] Query Entity Ids';
+
+export class QueryEntityIds implements Action {
+ readonly type = QUERY_ENTITY_IDS;
+
+ constructor(public payload: string[]) { }
+}
+
+export type Actions =
+ | QueryEntityIds;
diff --git a/ui/src/app/metadata-filter/container/new-filter.component.html b/ui/src/app/metadata-filter/container/new-filter.component.html
new file mode 100644
index 000000000..a96424fdb
--- /dev/null
+++ b/ui/src/app/metadata-filter/container/new-filter.component.html
@@ -0,0 +1,17 @@
+
diff --git a/ui/src/app/metadata-filter/container/new-filter.component.spec.ts b/ui/src/app/metadata-filter/container/new-filter.component.spec.ts
new file mode 100644
index 000000000..642d26b8b
--- /dev/null
+++ b/ui/src/app/metadata-filter/container/new-filter.component.spec.ts
@@ -0,0 +1,36 @@
+import { TestBed, ComponentFixture } from '@angular/core/testing';
+import { ReactiveFormsModule } from '@angular/forms';
+import { StoreModule, Store, combineReducers } from '@ngrx/store';
+import { NewFilterComponent } from './new-filter.component';
+import * as fromFilter from '../reducer';
+
+describe('New Metadata Filter Page', () => {
+ let fixture: ComponentFixture;
+ let store: Store;
+ let instance: NewFilterComponent;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ providers: [],
+ imports: [
+ StoreModule.forRoot({
+ providers: combineReducers(fromFilter.reducers),
+ }),
+ ReactiveFormsModule
+ ],
+ declarations: [NewFilterComponent],
+ });
+
+ fixture = TestBed.createComponent(NewFilterComponent);
+ instance = fixture.componentInstance;
+ store = TestBed.get(Store);
+
+ spyOn(store, 'dispatch').and.callThrough();
+ });
+
+ it('should compile', () => {
+ fixture.detectChanges();
+
+ expect(fixture).toBeDefined();
+ });
+});
diff --git a/ui/src/app/metadata-filter/container/new-filter.component.ts b/ui/src/app/metadata-filter/container/new-filter.component.ts
new file mode 100644
index 000000000..65be0f260
--- /dev/null
+++ b/ui/src/app/metadata-filter/container/new-filter.component.ts
@@ -0,0 +1,18 @@
+import { Component } from '@angular/core';
+import { Store } from '@ngrx/store';
+
+import * as fromFilter from '../reducer';
+
+@Component({
+ selector: 'new-filter-page',
+ templateUrl: './new-filter.component.html'
+})
+export class NewFilterComponent {
+ constructor(
+ private store: Store
+ ) {}
+
+ save(): void {}
+
+ cancel(): void {}
+}
diff --git a/ui/src/app/metadata-filter/filter.module.ts b/ui/src/app/metadata-filter/filter.module.ts
new file mode 100644
index 000000000..3e5da5f96
--- /dev/null
+++ b/ui/src/app/metadata-filter/filter.module.ts
@@ -0,0 +1,34 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { CommonModule } from '@angular/common';
+import { ReactiveFormsModule } from '@angular/forms';
+import { StoreModule } from '@ngrx/store';
+import { EffectsModule } from '@ngrx/effects';
+
+import { NewFilterComponent } from './container/new-filter.component';
+import { reducers } from './reducer';
+
+export const routes: Routes = [
+ {
+ path: 'new',
+ component: NewFilterComponent,
+ canActivate: []
+ }
+];
+
+@NgModule({
+ declarations: [
+ NewFilterComponent
+ ],
+ entryComponents: [],
+ imports: [
+ CommonModule,
+ RouterModule,
+ ReactiveFormsModule,
+ StoreModule.forFeature('metadata-filter', reducers),
+ EffectsModule.forFeature([]),
+ RouterModule.forChild(routes)
+ ],
+ providers: []
+})
+export class FilterModule { }
diff --git a/ui/src/app/metadata-filter/reducer/filter.reducer.ts b/ui/src/app/metadata-filter/reducer/filter.reducer.ts
new file mode 100644
index 000000000..5160096b0
--- /dev/null
+++ b/ui/src/app/metadata-filter/reducer/filter.reducer.ts
@@ -0,0 +1,20 @@
+import { createSelector, createFeatureSelector } from '@ngrx/store';
+import { MetadataProvider } from '../../metadata-provider/model/metadata-provider';
+import * as filter from '../action/filter.action';
+import * as fromRoot from '../../core/reducer';
+
+export interface FilterState {
+ entityIds: string[];
+}
+
+export const initialState: FilterState = {
+ entityIds: []
+};
+
+export function reducer(state = initialState, action: filter.Actions): FilterState {
+ switch (action.type) {
+ default: {
+ return state;
+ }
+ }
+}
diff --git a/ui/src/app/metadata-filter/reducer/index.ts b/ui/src/app/metadata-filter/reducer/index.ts
new file mode 100644
index 000000000..084b99714
--- /dev/null
+++ b/ui/src/app/metadata-filter/reducer/index.ts
@@ -0,0 +1,16 @@
+import { createSelector, createFeatureSelector } from '@ngrx/store';
+import * as fromRoot from '../../core/reducer';
+import * as fromFilter from './filter.reducer';
+
+export interface FilterState {
+ filter: fromFilter.FilterState;
+}
+
+export const reducers = {
+ filter: fromFilter.reducer
+};
+
+export interface State extends fromRoot.State {
+ 'metadata-filter': FilterState;
+}
+
diff --git a/ui/src/app/routing.module.ts b/ui/src/app/routing.module.ts
index bca2b335a..79ba36f8b 100644
--- a/ui/src/app/routing.module.ts
+++ b/ui/src/app/routing.module.ts
@@ -12,6 +12,11 @@ const routes: Routes = [
path: 'provider',
loadChildren: './edit-provider/editor.module#EditorModule',
canActivate: []
+ },
+ {
+ path: 'metadata-filter',
+ loadChildren: './metadata-filter/filter.module#FilterModule',
+ canActivate: []
}
];
diff --git a/ui/src/locale/en.xlf b/ui/src/locale/en.xlf
index 34522397b..bdb4d759d 100644
--- a/ui/src/locale/en.xlf
+++ b/ui/src/locale/en.xlf
@@ -18,14 +18,38 @@
17
-
- Add new provider
- Add new provider
+
+ Add New
+ Add New
app/app.component.ts
23
+
+ Metadata Provider
+ Metadata Provider
+
+ app/app.component.ts
+ 40
+
+
+
+ Filter
+ Filter
+
+ app/app.component.ts
+ 32
+
+
+
+ New Filter
+ New Filter
+
+ app/metadata-filter/container/new-filter.component.ts
+ 8
+
+
Logout
Logout
diff --git a/ui/src/locale/es.xlf b/ui/src/locale/es.xlf
index a40224066..2a9c768de 100644
--- a/ui/src/locale/es.xlf
+++ b/ui/src/locale/es.xlf
@@ -18,14 +18,38 @@
17
-
- Add new provider
- Add new provider (es)
+
+ Add New
+ Add New (es)
app/app.component.ts
23
+
+ Metadata Provider
+ Metadata Provider (es)
+
+ app/app.component.ts
+ 40
+
+
+
+ Filter
+ Filter (es)
+
+ app/app.component.ts
+ 32
+
+
+
+ New Filter
+ New Filter (es)
+
+ app/metadata-filter/container/new-filter.component.ts
+ 8
+
+
Logout
Logout (es)