Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-register/sr-literature.component.html
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-register/sr-literature.component.html	(revision 50158)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-register/sr-literature.component.html	(revision 50159)
@@ -60,7 +60,7 @@
                 </div>
                 <div class="form-group">
                   <label class="control-label">Start typing in the name of your repository to narrow down the view</label>
-                  <input class="form-control" type="text"/>
+                  <input #searchBox id="searchBox" class="form-control" type="text" />
                 </div>
               </div>
               <div *ngIf="hasSelectedCountry">
@@ -67,17 +67,22 @@
                 <div>
                   <h2>OpenDOAR Repositories in {{ selectedCountry }}</h2>
                 </div>
+                <div style="text-align: center;" *ngIf="showSpinner"><img src="/assets/imgs/loader-big.gif"></div>
                 <div class="alert alert-warning" *ngIf="noRepositories">No repositories found</div>
-                <div class="repositoriesRadioButtonForm" *ngIf="!noRepositories">
-                  <label class="btn btn-link" *ngFor="let repo of countryRepos" style="display: block; text-align: left;">
-                    <input type="radio" value="{{ repo.id }}" (change)="chooseRepository()">
-                    <span>
-                      {{ repo.description }}
-                      <a target="_blank" href="{{repo.websiteUrl }}">
-                        <i class="fa fa-external-link externalLink"></i>
-                      </a>
-                    </span>
-                  </label>
+                <div class="repositoriesRadioButtonForm" *ngIf="countryRepos">
+                  <div class="form-group"
+                       *ngFor="let repo of countryRepos">
+                    <label class="btn btn-link" style="display: block; text-align: left;">
+                      <input type="radio" value="{{ repo.id }}" name="repositories" (change)="onChooseRepository()" [disabled]="repo.registered">
+                      <span>
+                        {{ repo.officialName }}
+                        <span class="label label-warning registeredLabel" *ngIf="repo.registered">Registered</span>
+                        <a target="_blank" href="{{repo.websiteUrl }}">
+                          <i class="fa fa-external-link externalLink"></i>
+                        </a>
+                      </span>
+                    </label>
+                  </div>
                 </div>
               </div>
             </div>
Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-register/sr-literature.component.ts
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-register/sr-literature.component.ts	(revision 50158)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-register/sr-literature.component.ts	(revision 50159)
@@ -5,6 +5,9 @@
 import { Component, OnInit } from '@angular/core';
 import { Country, Repository } from '../../../domain/typeScriptClasses';
 import { RepositoryService } from '../../../services/repository.service';
+import { Subject } from 'rxjs/Subject';
+import { Observable } from 'rxjs/Observable';
+import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
 
 @Component ({
   selector:'app-sr-literature',
@@ -19,6 +22,8 @@
   noRepositories: boolean;
   hasSelectedRepo: boolean;
   showAlert: boolean;
+  showSpinner: boolean;
+  private searchString = new Subject<string>();
 
 
   constructor(private repoService:RepositoryService) {}
@@ -46,15 +51,23 @@
 
   getReposInCountry(country: string, mode: string){
     console.log(`I got ${country} and ${mode}`);
+    this.countryRepos = [];
+    this.noRepositories = false;
     this.hasSelectedCountry = true;
     this.selectedCountry = country;
-//    this.repoService.getRepositoriesOfCountry(country,mode).subscribe(repos => this.countryRepos = repos);
-    if(!this.countryRepos.length){
-      this.noRepositories = true;
-    }
+    this.showSpinner = true;
+    this.repoService.getRepositoriesOfCountry(country,mode).subscribe(
+      repos => this.countryRepos = repos,
+      error => console.log(error),
+      () => {
+        if (!this.countryRepos.length)
+          this.noRepositories = true;
+          this.showSpinner = false;
+      }
+    );
   }
 
-  chooseRepository(){
+  onChooseRepository(){
     this.hasSelectedRepo = true;
     this.showAlert = false;
   }
@@ -66,4 +79,19 @@
       //move to the next step
     }
   }
+
+  refreshSearch(term: string): void {
+    this.searchString.next(term);
+  }
+
+  searchRepo(): void {
+    this.searchString.pipe(
+      debounceTime(500),
+      distinctUntilChanged(),
+      switchMap((term: string) => this.countryRepos.filter(
+        repo => repo.officialName.includes(term)
+      ) )
+    );
+  }
+
 }
Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources.routing.ts
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources.routing.ts	(revision 50158)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources.routing.ts	(revision 50159)
@@ -14,7 +14,7 @@
   {
     path: 'sources',
     component: SourcesComponent,
-    canActivate: [AuthGuardService],
+//    canActivate: [AuthGuardService],
     children: [
       {
         path: '',
Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics.module.ts
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics.module.ts	(revision 50158)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics.module.ts	(revision 50159)
@@ -3,25 +3,22 @@
  */
 import { NgModule } from "@angular/core";
 import { CommonModule } from "@angular/common";
-import {ModalModule, TabsModule} from "ngx-bootstrap";
 import { MetricsComponent } from "./metrics.component";
 import { MetricsEnableComponent } from './metrics-enable.component';
 import { MetricsInstructionsComponent } from './metrics-instructions.component';
 import { MetricsRouting } from './metrics.routing';
-import {ConfirmationDialogComponent} from '../../shared/confirmation-dialog.component';
+import { SharedModule } from '../../shared/shared.module';
 
 @NgModule ({
   imports: [
     CommonModule,
-    TabsModule.forRoot(),
-    ModalModule.forRoot(),
-    MetricsRouting
+    MetricsRouting,
+    SharedModule
   ],
   declarations: [
     MetricsComponent,
     MetricsEnableComponent,
-    MetricsInstructionsComponent,
-    ConfirmationDialogComponent
+    MetricsInstructionsComponent
   ]
 })
 
Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics.routing.ts
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics.routing.ts	(revision 50158)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics.routing.ts	(revision 50159)
@@ -1,17 +1,17 @@
 /**
  * Created by myrto on 11/27/17.
  */
-import {NgModule} from "@angular/core";
-import {RouterModule, Routes} from "@angular/router";
-import {MetricsComponent} from './metrics.component';
-import {MetricsEnableComponent} from './metrics-enable.component';
-import {MetricsInstructionsComponent} from './metrics-instructions.component';
-import {AuthGuardService} from '../../services/auth-guard.service';
+import { NgModule } from "@angular/core";
+import { RouterModule, Routes } from "@angular/router";
+import { MetricsComponent } from './metrics.component';
+import { MetricsEnableComponent } from './metrics-enable.component';
+import { MetricsInstructionsComponent } from './metrics-instructions.component';
+import { AuthGuardService } from '../../services/auth-guard.service';
 
 const metricsRoutes: Routes = [
   {
     path: 'metrics',
-//    canActivate: [AuthGuardService],
+    canActivate: [AuthGuardService],
     children: [
       {
         path: '',
Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics.component.html
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics.component.html	(revision 50158)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics.component.html	(revision 50159)
@@ -33,7 +33,7 @@
               </div>
               <div>
                 <div class="uk-grid-large uk-grid-margin-large uk-grid repos-grid">
-                  <div *ngFor="let repo of repos" class="uk-width-1-2@m uk-first-column uk-margin-small-bottom">
+                  <div *ngFor="let repo of reposOfUser" class="uk-width-1-2@m uk-first-column uk-margin-small-bottom">
                     <div class="uk-margin uk-grid-match uk-child-width-1-1 uk-grid-small uk-grid-divider uk-grid uk-scrollspy-inview uk-animation-slide-top-medium uk-grid-stack">
                       <div class="uk-first-column">
                         <div>
@@ -40,15 +40,17 @@
                           <div class="el-item uk-panel uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class="">
                             <div class="uk-child-width-expand uk-grid-medium uk-flex-middle uk-grid" uk-grid="">
                               <div class="uk-width-1-3@m uk-first-column">
-                                <a class="el-link" [routerLink]="goToValidationLink(repo)">
+                                <a class="el-link" [routerLink]="goToValidationLink(repo.piwikInfo)">
                                   <img class="el-image uk-border-rounded" src="/assets/imgs/yourLogoHere.jpg" alt="">
                                 </a>
                               </div>
                               <div>
-                                <h3 class="el-title uk-margin uk-h5 uk-margin-remove-adjacent uk-margin-small-bottom">{{ repo }}</h3>
-                                <div class="uk-badge uk-badge-danger" *ngIf="repo == 'NULL'">not enabled</div>
-                                <div class="uk-badge uk-badge-warning" *ngIf="repo == 'false'">enabling in progress</div>
-                                <div class="uk-badge uk-badge-success" *ngIf="repo == 'true'">enabled</div>
+                                <h3 class="el-title uk-margin uk-h5 uk-margin-remove-adjacent uk-margin-small-bottom">{{ repo.officialName }}</h3>
+                                <div class="uk-badge uk-badge-danger" *ngIf="!repo.piwikInfo">not enabled</div>
+                                <div *ngIf="repo.piwikInfo">
+                                  <div class="uk-badge uk-badge-warning" *ngIf="repo.piwikInfo.validated === false">enabling in progress</div>
+                                  <div class="uk-badge uk-badge-success" *ngIf="repo.piwikInfo.validated === true">enabled</div>
+                                </div>
                               </div>
                             </div>
                           </div>
Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics.component.ts
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics.component.ts	(revision 50158)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/metrics/metrics.component.ts	(revision 50159)
@@ -1,3 +1,6 @@
+/**
+ * Created by myrto on 11/27/17.
+ */
 import { Component, OnInit } from '@angular/core';
 import { RepositoryService } from "../../services/repository.service";
 import { PiwikInfo, Repository } from "../../domain/typeScriptClasses";
@@ -9,26 +12,12 @@
 
 export class MetricsComponent implements OnInit {
   reposOfUser: Repository[] = [];
-  repos: string[] = [];
 
   constructor(private repoService: RepositoryService) {}
 
   ngOnInit() {
-    this.repos = [
-      'NULL',
-      'true',
-      'false',
-      'true',
-      'NULL',
-      'true',
-      'true',
-    ];
     this.getReposOfUser();
-    if(this.reposOfUser.length) {
-      console.log(`counted ${this.reposOfUser.length} repositories`);
-    } else {
-      console.log('no repos pulled');
-    }
+    console.log(`counted ${this.reposOfUser.length} repositories`);
   }
 
   getReposOfUser(): void {
@@ -36,11 +25,13 @@
       .subscribe(repos => this.reposOfUser = repos);
   }
 
-  goToValidationLink(repo: string) {
-    if(repo == 'true'){
-      return "/home";
-    } else if ( repo == 'false' ) {
-      return "instructions";
+  goToValidationLink(piwik: PiwikInfo) {
+    if(piwik){
+      if(piwik.validated === true){
+        return "/home";
+      } else if ( piwik.validated === false ) {
+        return "instructions";
+      }
     } else {
       return "enable";
     }
Index: modules/uoa-repository-dashboard-gui/trunk/app/shared/shared.module.ts
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/shared/shared.module.ts	(nonexistent)
+++ modules/uoa-repository-dashboard-gui/trunk/app/shared/shared.module.ts	(revision 50159)
@@ -0,0 +1,24 @@
+/**
+ * Created by myrto on 12/18/17.
+ */
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { ConfirmationDialogComponent } from './confirmation-dialog.component';
+import { ModalModule, TabsModule } from 'ngx-bootstrap';
+
+@NgModule({
+  imports: [
+    CommonModule,
+    TabsModule.forRoot(),
+    ModalModule.forRoot()
+  ],
+  declarations: [
+    ConfirmationDialogComponent
+  ],
+  exports: [
+    ConfirmationDialogComponent
+  ]
+})
+
+export class SharedModule {}

Property changes on: modules/uoa-repository-dashboard-gui/trunk/app/shared/shared.module.ts
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
