gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet-webui] branch master updated (da35c82 -> 560b397)


From: gnunet
Subject: [GNUnet-SVN] [gnunet-webui] branch master updated (da35c82 -> 560b397)
Date: Tue, 14 Aug 2018 01:03:08 +0200

This is an automated email from the git hooks/post-receive script.

phil pushed a change to branch master
in repository gnunet-webui.

    from da35c82  fix local host fonts
     new fe7f086  -wip namestore page
     new 5e51921  fix visuals, wip namestore page
     new 835a110  All changes - fixes, features, renames
     new 560b397  finished namestore page

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 angular.json                                       |   3 +-
 src/app/api.service.ts                             | 157 +++++++++++---
 src/app/app-routing.module.ts                      |   4 +-
 src/app/app.component.html                         |  22 +-
 src/app/app.component.ts                           |   2 +-
 src/app/app.module.ts                              |   4 +-
 .../create-identity/create-identity.component.html |   4 +-
 .../create-identity/create-identity.component.ts   |  16 +-
 src/app/{identity-api.ts => gns-record.ts}         |  12 +-
 src/app/identity-page/identity-page.component.html |  39 ++--
 src/app/identity-page/identity-page.component.ts   |  57 +++--
 src/app/{identity-api.ts => identity.ts}           |   4 +-
 src/app/messages.service.ts                        |  11 +-
 .../namestore-page/namestore-page.component.html   | 200 +++++++++++++++---
 src/app/namestore-page/namestore-page.component.ts | 234 ++++++++++++++++++---
 src/app/{identity-api.ts => peerinfo-address.ts}   |  10 +-
 src/app/peerinfo-page/peerinfo-page.component.html |  15 ++
 .../peerinfo-page.component.spec.ts}               |   0
 .../peerinfo-page.component.ts}                    |  26 ++-
 src/app/{identity-api.ts => peerinfo-response.ts}  |  10 +-
 .../peerstore-page/peerstore-page.component.html   |   3 -
 src/app/rest-apis/rest-apis.component.ts           |   2 +-
 src/favicon.png                                    | Bin 0 -> 1467 bytes
 src/gnunet-anonymous-logo.png                      | Bin 0 -> 30620 bytes
 src/index.html                                     |   3 +-
 src/scss/base/_body.scss                           |  10 +
 src/scss/components/_button.scss                   |   8 +-
 src/scss/components/_circle.scss                   |   1 +
 src/scss/components/_footer.scss                   |   5 +-
 src/scss/components/_header.scss                   |   5 +-
 src/scss/components/_input.scss                    |   2 +-
 src/scss/components/_link.scss                     |   5 +
 src/scss/components/_spinner.scss                  |   1 +
 src/scss/components/_triangle.scss                 |   9 +
 src/scss/main.scss                                 |   3 +-
 src/scss/objects/_grid.scss                        |   2 +-
 src/scss/settings/_baseline.scss                   |   1 +
 src/scss/settings/_colors.scss                     |   6 +-
 src/scss/settings/_core.scss                       |   6 +-
 src/scss/settings/_spacing.scss                    |   1 +
 src/scss/utilities/_margin.scss                    |   2 +-
 41 files changed, 693 insertions(+), 212 deletions(-)
 copy src/app/{identity-api.ts => gns-record.ts} (82%)
 copy src/app/{identity-api.ts => identity.ts} (93%)
 copy src/app/{identity-api.ts => peerinfo-address.ts} (88%)
 create mode 100644 src/app/peerinfo-page/peerinfo-page.component.html
 rename src/app/{peerstore-page/peerstore-page.component.spec.ts => 
peerinfo-page/peerinfo-page.component.spec.ts} (100%)
 rename src/app/{peerstore-page/peerstore-page.component.ts => 
peerinfo-page/peerinfo-page.component.ts} (63%)
 rename src/app/{identity-api.ts => peerinfo-response.ts} (82%)
 delete mode 100644 src/app/peerstore-page/peerstore-page.component.html
 create mode 100644 src/favicon.png
 create mode 100644 src/gnunet-anonymous-logo.png
 create mode 100644 src/scss/components/_triangle.scss

diff --git a/angular.json b/angular.json
index 29b717b..72e5e02 100644
--- a/angular.json
+++ b/angular.json
@@ -23,7 +23,8 @@
             "polyfills": "src/polyfills.ts",
             "tsConfig": "src/tsconfig.app.json",
             "assets": [
-              "src/favicon.ico",
+              "src/favicon.png",
+              "src/gnunet-anonymous-logo.png",
               "src/assets"
             ],
             "styles": [
diff --git a/src/app/api.service.ts b/src/app/api.service.ts
index 6597514..8973911 100644
--- a/src/app/api.service.ts
+++ b/src/app/api.service.ts
@@ -26,7 +26,9 @@ import { HttpClient, HttpHeaders } from 
'@angular/common/http';
 import { Injectable } from '@angular/core';
 import { Observable, of } from 'rxjs';
 import { RestAPI } from './rest-api';
-import { IdentityAPI } from './identity-api';
+import { GNSRecord } from './gns-record';
+import { PeerinfoResponse } from './peerinfo-response';
+import { Identity } from './identity';
 import { catchError, map, tap } from 'rxjs/operators';
 import { MessagesService } from './messages.service';
 
@@ -38,64 +40,145 @@ export class ApiService {
   private restURL = 'http://localhost:7776/'
   private identityURL = this.restURL+'identity';
   private gnsURL = this.restURL+'gns';
+  private namestoreURL = this.restURL+'namestore';
+  private peerinfoURL = this.restURL+'peerinfo';
 
   constructor(private http: HttpClient,
               private messages:MessagesService) { }
 
-  getIdentities (): Observable<IdentityAPI[]>{
-    return this.http.get<IdentityAPI[]>(this.identityURL)
+  getIdentityAll (): Observable<Identity[]>{
+    return this.http.get<Identity[]>(this.identityURL+'/all')
     .pipe(
       tap(json => this.handleJSON(json)),
-      catchError(this.handleError('getIdentities', []))
+      catchError(this.handleError('IdentityGETall', []))
     );
   }
 
-  createIdentity (json: any): Observable<any>{
-    this.messages.dismissError();
+  getIdentityName (name: string): Observable<Identity>{
+    return this.http.get<Identity>(this.identityURL+'/name/'+name)
+    .pipe(
+      tap(json => this.handleJSON(json)),
+      catchError(this.handleError<any>('IdentityGETname', {}))
+    );
+  }
+
+  getIdentitySubsystem (subsystem_name: string): Observable<Identity>{
+    return 
this.http.get<Identity>(this.identityURL+'/subsystem/'+subsystem_name)
+    .pipe(
+      tap(json => this.handleJSON(json)),
+      catchError(this.handleError<any>('IdentityGETsubsystem', {}))
+    );
+  }
+
+  postIdentity (name: string): Observable<any>{
+    const options = {headers: {'Content-Type': 'application/json'}};
+    return this.http.post(this.identityURL, {'name':name}, options)
+    .pipe(
+      tap(json => this.handleJSON(json)),
+      catchError(this.handleError('IdentityPOST', []))
+    );
+  }
+
+  putIdentityName (name:string, newname:string): Observable<any>{
     const options = {headers: {'Content-Type': 'application/json'}};
-    return this.http.post(this.identityURL, json, options)
+    return this.http.put(this.identityURL+'/name/'+name, {'newname':newname}, 
options)
     .pipe(
       tap(json => this.handleJSON(json)),
-      catchError(this.handleError('createIdentity', []))
+      catchError(this.handleError('IdentityPUTname', []))
     );
   }
 
-  deleteIdentity (id: string): Observable<any>{
-    this.messages.dismissError();
-    return this.http.delete(this.identityURL+'?pubkey='+id)
+  putIdentitySubsystem (name:string, subsystem_name:string): Observable<any>{
+    const options = {headers: {'Content-Type': 'application/json'}};
+    return this.http.put(this.identityURL+'/subsystem/'+name, 
{'subsystem':subsystem_name}, options)
     .pipe(
       tap(json => this.handleJSON(json)),
-      catchError(this.handleError('deleteIdentity', []))
+      catchError(this.handleError('IdentityPUTsubsystem', []))
     );
   }
 
+  deleteIdentityName (name: string): Observable <any> {
+    return this.http.delete(this.identityURL+'/name/'+name)
+    .pipe(
+      tap(json => this.handleJSON(json)),
+      catchError(this.handleError('IdentityDELETEname', []))
+    );
+  }
+
+  getNamestore (): Observable<GNSRecord[]>{
+    return this.http.get<GNSRecord[]>(this.namestoreURL)
+    .pipe(
+      tap(json => this.handleJSON(json)),
+      catchError(this.handleError('NamestoreGET', []))
+    );
+  }
 
-  changeIdentity (json: any): Observable<any>{
-    this.messages.dismissError();
+  getNamestoreName (name: string): Observable<GNSRecord[]>{
+    return this.http.get<GNSRecord[]>(this.namestoreURL+'/'+name)
+    .pipe(
+      tap(json => this.handleJSON(json)),
+      catchError(this.handleError('NamestoreGETname', []))
+    );
+  }
+
+  postNamestore (gns_record: GNSRecord): Observable<any>{
     const options = {headers: {'Content-Type': 'application/json'}};
-    return this.http.put(this.identityURL, json, options)
+    return this.http.post<any>(this.namestoreURL, gns_record, options)
     .pipe(
       tap(json => this.handleJSON(json)),
-      catchError(this.handleError('changeIdentity', []))
+      catchError(this.handleError('NamestorePOST', []))
     );
   }
 
-  assignIdentity (json: any): Observable<any>{
-    this.messages.dismissError();
+  postNamestoreName (name: string, gns_record: GNSRecord): Observable<any>{
     const options = {headers: {'Content-Type': 'application/json'}};
-    return this.http.put(this.identityURL, json, options)
+    return this.http.post<any>(this.namestoreURL+'/'+name, gns_record, options)
     .pipe(
       tap(json => this.handleJSON(json)),
-      catchError(this.handleError('changeIdentity', []))
+      catchError(this.handleError('NamestorePOSTname', []))
     );
   }
 
-  searchNameSystem (url: string): Observable<any>{
-    this.messages.dismissError();
-    return this.http.get(this.gnsURL+'/'+url)
+  deleteNamestore (record_name: string): Observable <any> {
+    return this.http.delete(this.namestoreURL+'?record_name='+record_name)
     .pipe(
       tap(json => this.handleJSON(json)),
-      catchError(this.handleError('searchNameSystem', []))
+      catchError(this.handleError('NamestoreDELETE', []))
+    );
+  }
+
+  deleteNamestoreName (name: string, record_name: string): Observable <any> {
+    return 
this.http.delete(this.namestoreURL+'/'+name+'?record_name='+record_name)
+    .pipe(
+      tap(json => this.handleJSON(json)),
+      catchError(this.handleError('NamestoreDELETEname', []))
+    );
+  }
+
+  getGNSlookup (lookup: string, record_type: string): Observable<GNSRecord[]>{
+    if(record_type)
+    {
+      return 
this.http.get<GNSRecord[]>(this.gnsURL+'/'+lookup+'?record_type='+record_type)
+      .pipe(
+        tap(json => this.handleJSON(json)),
+        catchError(this.handleError('GnsGET', []))
+      );
+    }
+    else
+    {
+      return this.http.get<GNSRecord[]>(this.gnsURL+'/'+lookup)
+      .pipe(
+        tap(json => this.handleJSON(json)),
+        catchError(this.handleError('GnsGET', []))
+      );
+    }
+  }
+
+  getPeerinfo (): Observable<PeerinfoResponse[]>{
+    return this.http.get<PeerinfoResponse[]>(this.peerinfoURL)
+    .pipe(
+      tap(json => this.handleJSON(json)),
+      catchError(this.handleError('PeerinfoGET', []))
     );
   }
 
@@ -109,24 +192,28 @@ export class ApiService {
   */
   private handleError<T> (operation = 'operation', result?: T) {
     return (error: any): Observable<T> => {
-
-      //console.error(error); // log to console instead
-
-      if((operation == 'createIdentity') && (error.status == '409'))
+      let test:any = result;
+      test.error = true;
+      result = test;
+      if((operation == 'IdentityPOST') && (error.status == '409'))
+      {
+        this.messages.pushError('Identity already exists');
+      }
+      if((operation == 'IdentityDELETEname') && (error.status == '404'))
       {
-        this.messages.pushError('Cannot create identity. Identity already 
exists.');
+        this.messages.pushError('Identity not found');
       }
-      if((operation == 'changeIdentity') && (error.status == '404'))
+      if((operation == 'IdentityPUTname') && (error.status == '409'))
       {
-        this.messages.pushError('Cannot rename identity. Identity not found.');
+        this.messages.pushError('Identity already exists');
       }
-      if((operation == 'changeIdentity') && (error.status == '409'))
+      if((operation == 'IdentityPUTsubsystem'))
       {
-        this.messages.pushError('Cannot rename identity. Identity with this 
name already exists.');
+        this.messages.pushError('Adding subsystem failed');
       }
-      if((operation == 'deleteIdentity') && (error.status == '404'))
+      if((operation == 'IdentityDELETEname') && (error.status == '404'))
       {
-        this.messages.pushError('Cannot delete identity. Identity not found.');
+        this.messages.pushError('Identity not found');
       }
 
       if((error.statusText == 'Unknown Error'))
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index e8e156d..6c0a987 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -30,7 +30,7 @@ import { filter } from 'rxjs/operators';
 import { RestApisComponent } from './rest-apis/rest-apis.component';
 import { MainPageComponent } from './main-page/main-page.component';
 import { IdentityPageComponent } from 
'./identity-page/identity-page.component';
-import { PeerstorePageComponent } from 
'./peerstore-page/peerstore-page.component';
+import { PeerinfoPageComponent } from 
'./peerinfo-page/peerinfo-page.component';
 import { NamestorePageComponent } from 
'./namestore-page/namestore-page.component';
 import { ErrorPageComponent } from './error-page/error-page.component';
 
@@ -40,7 +40,7 @@ const routes: Routes = [
   { path: '', component: MainPageComponent },
   { path: 'apis', component: RestApisComponent },
   { path: 'identity', component: IdentityPageComponent },
-  { path: 'peerstore', component: PeerstorePageComponent },
+  { path: 'peerinfo', component: PeerinfoPageComponent },
   { path: 'namestore', component: NamestorePageComponent },
   { path: '**', component: ErrorPageComponent }
 ];
diff --git a/src/app/app.component.html b/src/app/app.component.html
index a4a6a27..20d71f6 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -3,17 +3,14 @@
   <div class="o-container o-container--size-small">
     <div class="o-media o-media--middle">
       <div class="o-media__fixed">
-        <img class="u-align-middle" 
src="https://gnunet.org/sites/default/files/transparent_0_0.png"; width="40px">
+        <img class="u-align-middle" src="gnunet-anonymous-logo.png" 
width="45px">
         &nbsp;<span class="o-type-22 u-align-middle">GNUnet Web UI</span>
       </div>
       <div class="o-media__fluid u-text-right">
         <nav>
-          <ul class="o-list o-list--inline o-list--gutter-x4">
-            <li class="o-list__item" *ngFor="let item of this.menu">
-              <div *ngIf="item.id === active" class="u-p-x1 u-bgcolor-primary 
u-color-contrary">
-                <a routerLink="{{item.link}}" class="c-link">{{item.name}}</a>
-              </div>
-              <div *ngIf="item.id !== active" class="u-p-x1">
+          <ul class="o-list o-list--inline">
+            <li class="o-list__item u-mh-x2" *ngFor="let item of this.menu">
+              <div [ngClass]="{'c-link--underline': item.id === active}">
                 <a routerLink="{{item.link}}" class="c-link">{{item.name}}</a>
               </div>
             </li>
@@ -35,17 +32,10 @@
     <div class="o-container o-container--size-small">
       <div class="o-media o-media--middle">
         <div class="o-media__fixed">
-          <ul class="o-list o-list--inline o-list--gutter-x4">
-            <li class="o-list__item">
-              <a routerLink="/" class="c-link">Impressum</a>
-            </li>
-            <li class="o-list__item">
-              <a routerLink="/" class="c-link">Documentation</a>
-            </li>
-          </ul>
+          <a href="https://gnunet.org/git/gnunet-rest-api.git/"; 
class="c-link">Documentation</a>
         </div>
         <div class="o-media__fluid u-text-right">
-          Placeholder
+          <p><i class="fa fa-copyright" aria-hidden="true"></i> 2018 GNUnet 
e.V - GNU AGPL v3.0</p>
         </div>
       </div>
     </div>
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 5ee4946..ed2521e 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -42,7 +42,7 @@ export class AppComponent {
     {id:0, name: 'Main', link: ''},
     {id:1, name: 'Identities', link: 'identity'},
     {id:2, name: 'Names', link: 'namestore'},
-    {id:3, name: 'Peers', link: 'peerstore'},
+    {id:3, name: 'Peers', link: 'peerinfo'},
   ];
 
   constructor(private router: Router) {
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index e88a0d6..a841841 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -36,7 +36,7 @@ import { CreateIdentityComponent } from 
'./create-identity/create-identity.compo
 import { MyFilterPipe } from './filter.pipe';
 import { ErrorMessageComponent } from 
'./error-message/error-message.component';
 import { NamestorePageComponent } from 
'./namestore-page/namestore-page.component';
-import { PeerstorePageComponent } from 
'./peerstore-page/peerstore-page.component';
+import { PeerinfoPageComponent } from 
'./peerinfo-page/peerinfo-page.component';
 import { ErrorPageComponent } from './error-page/error-page.component';
 
 @NgModule({
@@ -49,7 +49,7 @@ import { ErrorPageComponent } from 
'./error-page/error-page.component';
     MyFilterPipe,
     ErrorMessageComponent,
     NamestorePageComponent,
-    PeerstorePageComponent,
+    PeerinfoPageComponent,
     ErrorPageComponent
   ],
   imports: [
diff --git a/src/app/create-identity/create-identity.component.html 
b/src/app/create-identity/create-identity.component.html
index e1bfa3d..faa6f01 100644
--- a/src/app/create-identity/create-identity.component.html
+++ b/src/app/create-identity/create-identity.component.html
@@ -1,8 +1,8 @@
 <div class="c-card c-card--no-padding u-p-x3">
-  <h1 class="o-type-22 u-pb-x1 u-color-primary-light" >Create new identity</h1>
+  <h1 class="o-type-22 u-pb-x1 u-color-primary-light" >Create New Identity</h1>
   <div class="o-list o-list--inline">
     <p class="u-color-grey">Identity Name:</p>
-    <input [(ngModel)]="this.input_text" type="text" class="o-list__item 
c-input" placeholder="e.g. Testname, ..."/>
+    <input [(ngModel)]="this.input_text" type="text" class="o-list__item 
c-input u-mb-x1 address@hidden" placeholder="e.g. Testname, ..."/>
     <a class="o-list__item c-button" (click)="onClick()"><i class="fa 
fa-plus"></i></a>
     <div *ngIf="!is_free" class="o-list__item c-spinner"></div>
   </div>
diff --git a/src/app/create-identity/create-identity.component.ts 
b/src/app/create-identity/create-identity.component.ts
index 61224a0..37b1c12 100644
--- a/src/app/create-identity/create-identity.component.ts
+++ b/src/app/create-identity/create-identity.component.ts
@@ -35,7 +35,6 @@ import { MessagesService } from '../messages.service';
 export class CreateIdentityComponent implements OnInit {
 
   input_text: string = '';
-  private json: any = {'name':''};
   is_free:boolean = true;
 
   constructor(private apiService: ApiService,
@@ -47,16 +46,21 @@ export class CreateIdentityComponent implements OnInit {
 
   onClick() {
     if (this.input_text != "" && this.is_free){
+      this.message.dismissAll();
       this.is_free = false;
-      this.json.name = this.input_text;
-      this.input_text = '';
-      this.apiService.createIdentity(this.json).subscribe(test => {
-        this.message.pushSuccess('Created new identity');
+      this.apiService.postIdentity(this.input_text).subscribe(test => {
+        if (test)
+        {
+          if(!test.error)
+            this.message.pushSuccess('Create successful');
+        }
+        if (!test)
+          this.message.pushSuccess('Create successful');
         this.identity.getAPIs();
         this.is_free = true;
       });
     } else {
-      this.message.pushError('Missing input. Define name of new object');
+      this.message.pushError('Missing input. Define name of new identity');
     }
   }
 
diff --git a/src/app/identity-api.ts b/src/app/gns-record.ts
similarity index 82%
copy from src/app/identity-api.ts
copy to src/app/gns-record.ts
index 005276f..58701e7 100644
--- a/src/app/identity-api.ts
+++ b/src/app/gns-record.ts
@@ -17,12 +17,14 @@
    */
 /**
  * @author Philippe Buschmann
- * @file src/app/identity-api.ts
+ * @file src/app/gns_record.ts
  * @brief
  *
  */
-
-export class IdentityAPI{
-  pubkey: string;
-  name: string;
+export class GNSRecord {
+  value: string;
+  record_type: string;
+  expiration_time: string;
+  flag: number;
+  record_name: string;
 }
diff --git a/src/app/identity-page/identity-page.component.html 
b/src/app/identity-page/identity-page.component.html
index b0f22d8..5e8c6f0 100644
--- a/src/app/identity-page/identity-page.component.html
+++ b/src/app/identity-page/identity-page.component.html
@@ -1,12 +1,12 @@
 <div *ngIf="is_displayed">
   <div class="o-grid">
-    <create-identity-component class="o-grid__col 
u-1/2"></create-identity-component>
-    <div class="o-grid__col u-1/2">
+    <create-identity-component class="o-grid__col u-2/address@hidden 
u-1/address@hidden u-mb-x1"></create-identity-component>
+    <div class="o-grid__col u-2/address@hidden u-1/address@hidden u-mb-x1">
       <div class="c-card c-card--no-padding u-p-x3">
         <h1 class="o-type-22 u-pb-x1 u-color-primary-light" >Search</h1>
         <div class="">
           <p class="u-color-grey">Search Input:</p>
-          <input #myInput class="c-input u-2/2" placeholder="e.g. Name, ID, 
..." [(ngModel)]="name" (input)="filterItem(myInput.value)"/>
+          <input #myInput class="c-input u-2/2" placeholder="for name or 
public key" [(ngModel)]="name" (input)="filterItem(myInput.value)"/>
         </div>
       </div>
     </div>
@@ -18,24 +18,27 @@
   <div class="u-mv-x1" *ngFor="let identity of filteredItems">
     <div class="c-card c-card--no-padding u-p-x1">
       <div class="o-grid">
-        <div class="o-grid__col u-1/12"><div class="c-circle" 
[ngStyle]="{'background-color': returnHSL(identity.pubkey)}">{{identity.name | 
slice:0:1 | uppercase}}</div></div>
-        <div class="o-grid__col u-8/12">
-          <p class="u-color-grey">Public Key: <span 
class="">{{identity.pubkey}}</span></p>
-          <span class="o-type-20">{{identity.name}}</span>
+        <div class="o-grid__col u-1/address@hidden u-1/1"><div 
class="c-circle" [ngStyle]="{'background-color': 
returnHSL(identity.pubkey+identity.name)}">{{identity.name | slice:0:1 | 
uppercase}}</div></div>
+        <div class="o-grid__col u-8/address@hidden u-1/1">
+          <p class="u-color-grey address@hidden u-text-center">Public Key: 
<span class="">{{identity.pubkey}}</span></p>
+          <p class="o-type-20 address@hidden 
u-text-center">{{identity.name}}</p>
+        </div>
+        <div class="o-grid__col o-list o-list--inline u-3/address@hidden u-1/1 
u-text-center">
+          <div class="o-list__item u-mh-x1"><p 
class="u-color-grey">Rename</p><a class="c-button c-button--rename" 
(click)="onClickRename(identity)"><i class="fa fa-pencil"></i></a></div>
+          <div class="o-list__item u-mh-x1"><p 
class="u-color-grey">Subsystem</p><a class="c-button c-button--rename" 
(click)="onClickAddSubsystem(identity)"><i class="fa fa-plus"></i></a></div>
+          <div class="o-list__item u-mh-x1"><p 
class="u-color-grey">Delete</p><a class="c-button c-button--danger" 
(click)="onClickDelete(identity)"><i class="fa fa-trash"></i></a></div>
         </div>
-        <div class="o-grid__col u-1/12"><p class="u-color-grey">Rename</p><a 
class="c-button c-button--rename" (click)="onClickRename(identity)"><i 
class="fa fa-pencil"></i></a></div>
-        <div class="o-grid__col u-1/12"><p 
class="u-color-grey">Subsystem</p><a class="c-button c-button--rename" 
(click)="onClickAddSubsystem(identity)"><i class="fa fa-plus"></i></a></div>
-        <div class="o-grid__col u-1/12"><p class="u-color-grey">Delete</p><a 
class="c-button c-button--danger" (click)="onClickDelete(identity)"><i 
class="fa fa-trash"></i></a></div>
       </div>
     </div>
   </div>
   </div>
 
 <div class="c-card u-p-x3 u-mt-x2" *ngIf="this.rename">
-  <h1 class="o-type-22 u-pb-x1 u-color-primary-light" >Rename</h1>
-  <div class="u-color-grey u-pb-x1">Public Key: 
<span>{{changeIdentity.pubkey}}</span></div>
+  <h1 class="o-type-22 u-pb-x1 u-color-primary-light" >Rename Identity</h1>
+  <div class="u-color-grey u-pb-x1"><p>Public Key: 
<span>{{changeIdentity.pubkey}}</span></p></div>
+  <div class="u-color-grey u-pb-x1">Current Name: 
<span>{{changeIdentity.name}}</span></div>
   <div>
-    <span class="u-mr-x2"><span class="u-mr-x3">Name: </span><input 
class="c-input" placeholder="Change Name" 
[(ngModel)]="changeIdentity.name"/></span>
+    <span class="u-mr-x2"><span class="u-mr-x3">Name: </span><input 
class="c-input" placeholder="Change Name" [(ngModel)]="newname"/></span>
     <a class="c-button" (click)="onRename(changeIdentity)">Save</a>
     <a class="c-button c-button--outline u-m-x2" (click)="onReset()">Cancel</a>
   </div>
@@ -43,22 +46,22 @@
 
 <div class="c-card u-p-x3 u-mt-x2" *ngIf="this.addsubsystem">
   <h1 class="o-type-22 u-pb-x1 u-color-primary-light" >Add Subsystem</h1>
-  <div class="u-color-grey">Public Key: 
<span>{{changeIdentity.pubkey}}</span></div>
+  <div class="u-color-grey"><p>Public Key: 
<span>{{changeIdentity.pubkey}}</span></p></div>
   <div class="u-color-grey">Name: <span>{{changeIdentity.name}}</span></div>
   <span class="u-mr-x2">
     <span class="u-mr-x3">Subsystem: </span>
     <input class="c-input" placeholder="e.g. namestore, ..." 
[(ngModel)]="newsubsystem"/>
   </span>
-  <a class="c-button" (click)="onAddSubsystem(changeIdentity.pubkey)">Add</a>
+  <a class="c-button" (click)="onAddSubsystem(changeIdentity.name)">Add</a>
   <a class="c-button c-button--outline u-m-x2" (click)="onReset()">Cancel</a>
 </div>
 
 <div class="c-card u-p-x3 u-mt-x2" *ngIf="this.delete">
-  <h1 class="o-type-22 u-pb-x1 u-color-primary-light" >Delete</h1>
-  <div >Public Key: <span>{{changeIdentity.pubkey}}</span></div>
+  <h1 class="o-type-22 u-pb-x1 u-color-primary-light" >Delete Identity</h1>
+  <div ><p>Public Key: <span>{{changeIdentity.pubkey}}</span></p></div>
   <div >Name: <span>{{changeIdentity.name}}</span></div>
   <div>
-    <a class="c-button" (click)="onDelete(changeIdentity.pubkey)">Delete</a>
+    <a class="c-button" (click)="onDelete(changeIdentity.name)">Delete</a>
     <a class="c-button c-button--outline u-m-x2" (click)="onReset()">Cancel</a>
   </div>
 </div>
diff --git a/src/app/identity-page/identity-page.component.ts 
b/src/app/identity-page/identity-page.component.ts
index 7588799..bd136e3 100644
--- a/src/app/identity-page/identity-page.component.ts
+++ b/src/app/identity-page/identity-page.component.ts
@@ -25,7 +25,7 @@
 import { Component, OnInit } from '@angular/core';
 import { Pipe } from "@angular/core";
 import { ApiService } from '../api.service';
-import { IdentityAPI } from '../identity-api';
+import { Identity } from '../identity';
 import { MessagesService } from '../messages.service';
 
 @Component({
@@ -34,12 +34,13 @@ import { MessagesService } from '../messages.service';
 })
 export class IdentityPageComponent implements OnInit {
 
-  identities: IdentityAPI[];
-  filteredItems: IdentityAPI[];
+  identities: Identity[];
+  filteredItems: Identity[];
   rename: boolean = false;
   delete: boolean = false;
   addsubsystem: boolean = false;
-  changeIdentity: IdentityAPI;
+  changeIdentity: Identity;
+  newname:string;
   json: any;
   is_displayed: boolean = true;
   request: boolean = false;
@@ -49,7 +50,7 @@ export class IdentityPageComponent implements OnInit {
 
   getAPIs(): void {
     this.request = true;
-    this.apiService.getIdentities().subscribe(data => {
+    this.apiService.getIdentityAll().subscribe(data => {
       this.identities = data;
       this.request = false;
       this.assignCopy();
@@ -74,20 +75,25 @@ export class IdentityPageComponent implements OnInit {
     });
   }
 
-  onClickRename(identity: IdentityAPI){
+  onClickRename(identity: Identity){
+    this.message.dismissAll();
     this.is_displayed = false;
     this.rename = true;
     this.changeIdentity = Object.assign({},identity);
   }
 
 
-  onRename(identity: IdentityAPI){
+  onRename(identity: Identity){
     this.request = true;
     this.onReset();
     this.filteredItems = [];
-    this.json = {'newname':identity.name,'pubkey':identity.pubkey};
-    this.apiService.changeIdentity(this.json).subscribe(data => {
-      this.message.pushSuccess('Rename was successful.');
+    this.apiService.putIdentityName(identity.name,this.newname).subscribe(data 
=> {
+      this.newname = "";
+      if (data)
+        if(!data.error)
+          this.message.pushSuccess('Rename successful');
+      if (!data)
+        this.message.pushSuccess('Rename successful');
       this.getAPIs();
     });
   }
@@ -99,37 +105,48 @@ export class IdentityPageComponent implements OnInit {
     this.is_displayed = true;
   }
 
-  onClickDelete(identity: IdentityAPI){
+  onClickDelete(identity: Identity){
+    this.message.dismissAll();
     this.is_displayed = false;
     this.delete = true;
     this.changeIdentity = Object.assign({},identity);
   }
 
-  onDelete(id:string){
+  onDelete(name:string){
     this.request = true;
     this.onReset();
     this.filteredItems = [];
-    this.apiService.deleteIdentity(id).subscribe(data => {
-      this.message.pushSuccess('Delete was successful.');
+    this.apiService.deleteIdentityName(name).subscribe(data => {
+      if (data)
+      {
+        if(!data.error)
+          this.message.pushSuccess('Delete successful');
+      }
+      if (!data)
+        this.message.pushSuccess('Delete successful');
       this.getAPIs();
     });
   }
 
 
-  onClickAddSubsystem(identity: IdentityAPI){
+  onClickAddSubsystem(identity: Identity){
+    this.message.dismissAll();
     this.is_displayed = false;
     this.addsubsystem = true;
     this.changeIdentity = Object.assign({},identity);
   }
 
-  onAddSubsystem(pubkey:string){
+  onAddSubsystem(name:string){
     this.request = true;
     this.onReset();
     this.filteredItems = [];
-    this.json = {'subsystem':this.newsubsystem,'pubkey':pubkey};
-    this.apiService.assignIdentity(this.json).subscribe(data => {
+    
this.apiService.putIdentitySubsystem(name,this.newsubsystem).subscribe(data => {
       this.newsubsystem = "";
-      this.message.pushSuccess('Subsystem was successfully added.');
+      if (data)
+        if(!data.error)
+          this.message.pushSuccess('Add subsystem successful');
+      if (!data)
+        this.message.pushSuccess('Add subsystem successful');
       this.getAPIs();
     });
   }
@@ -144,7 +161,7 @@ export class IdentityPageComponent implements OnInit {
   }
 
   returnHSL(id:string): string{
-    return "hsl(" + 360 * this.intFromHash(id) + ',' +
+    return "hsl(" + 1000* this.intFromHash(id) + ',' +
     (90 + 70 * this.intFromHash(id)) + '%,' +
     (85 + 10 * this.intFromHash(id)) + '%)';
   }
diff --git a/src/app/identity-api.ts b/src/app/identity.ts
similarity index 93%
copy from src/app/identity-api.ts
copy to src/app/identity.ts
index 005276f..74edf31 100644
--- a/src/app/identity-api.ts
+++ b/src/app/identity.ts
@@ -17,12 +17,12 @@
    */
 /**
  * @author Philippe Buschmann
- * @file src/app/identity-api.ts
+ * @file src/app/identity.ts
  * @brief
  *
  */
 
-export class IdentityAPI{
+export class Identity{
   pubkey: string;
   name: string;
 }
diff --git a/src/app/messages.service.ts b/src/app/messages.service.ts
index d366550..b03e26e 100644
--- a/src/app/messages.service.ts
+++ b/src/app/messages.service.ts
@@ -11,14 +11,14 @@
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Affero General Public License for more details.
-  
+
    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    */
 /**
  * @author Philippe Buschmann
  * @file src/app/messages.service.ts
- * @brief 
+ * @brief
  *
  */
 
@@ -83,4 +83,11 @@ export class MessagesService {
   dismissInformation(){
     this.info='';
   }
+
+  dismissAll(){
+    this.error='';
+    this.warning='';
+    this.info='';
+    this.success='';
+  }
 }
diff --git a/src/app/namestore-page/namestore-page.component.html 
b/src/app/namestore-page/namestore-page.component.html
index 3d9bf09..3d46a93 100644
--- a/src/app/namestore-page/namestore-page.component.html
+++ b/src/app/namestore-page/namestore-page.component.html
@@ -1,35 +1,177 @@
+<div *ngIf="!this.default_zone">
+  <div class="c-card c-card--no-padding u-p-x3">
+    <h1 class="o-type-22">Select temporary or default zone:</h1>
+  </div>
+  <div class="u-mv-x1 c-card" *ngFor="let identity of all_identities">
+    <p class="u-color-grey address@hidden u-text-center">Public Key: <span 
class="">{{identity.pubkey}}</span></p>
+    <p class="o-type-20 address@hidden u-text-center">{{identity.name}}</p>
+    <div class="o-list o-list--inline address@hidden u-text-center">
+      <a class="c-button c-button--outline o-list__item" 
(click)="setIdentityAsDefault(identity)">Set Identity as default</a>
+      <a class="c-button o-list__item" (click)="useIdentity(identity)">Use 
Identity temporary</a>
+    </div>
+  </div>
+</div>
+
+<div *ngIf="this.default_zone">
+  <div *ngIf="!add_record && !search_gns">
+    <div class="c-card u-mb-x1 o-list ">
+      <div class="o-list__item">
+        <p class="u-color-grey">Namestore Zone:</p>
+        <p class="o-type-22 u-mb-x2">{{subsystem_identity.name}} - 
{{subsystem_identity.pubkey}}</p>
+      </div>
+      <div class="o-list__item u-text-right">
+        <a class="c-button" (click)="changeZone()">Change Zone</a>
+      </div>
+    </div>
+    <!--<div class="c-card u-p-x3">
+      <h1 class="o-type-22 u-pb-x1 u-color-primary-light" >Search 
Namesystem</h1>
+      <div class="o-list o-list--inline">
+        <div class="o-list__item">
+          <p class="u-color-grey">Name:</p>
+          <input class="c-input u-2/2" placeholder="Name" 
[(ngModel)]="gns_name" />
+        </div>
+        <div class="o-list__item">
+          <p class="u-color-grey">Record Type (optional):</p>
+          <select class="c-input c-input--select u-2/2" 
[(ngModel)]="gns_recordtype" name="record_type">
+            <option [value]="'ANY'">Any</option>
+            <option [value]="'PKEY'">Public Key</option>
+            <option [value]="'NICK'">Nickname</option>
+            <option [value]="'LEHO'">Legacy Hostname</option>
+            <option [value]="'VPN'">VPN resolution</option>
+            <option [value]="'GNS2DNS'">GNS 2 DNS</option>
+            <option [value]="'BOX'">Boxed Record</option>
+            <option [value]="'PLACE'">Social Place</option>
+            <option [value]="'PHONE'">Phone (Coversation)</option>
+            <option [value]="'ID_ATTR'">Identity Attribute</option>
+            <option [value]="'ID_TOKEN'">Identity Token</option>
+            <option [value]="'ID_TOKEN_METADATA'">Identity Metadata 
(Token)</option>
+            <option [value]="'CREDENTIAL'">Credential</option>
+            <option [value]="'POLICY'">Policy</option>
+            <option [value]="'ATTRIBUTE'">Reverse lookup (Attribute)</option>
+            <option [value]="'ABE_KEY'">ABE Record</option>
+            <option [value]="'ABE_MASTER'">ABE Master Key</option>
+          </select>
+        </div>
+        <div class="o-list__item u-align-bottom">
+          <div class="u-text-right"><a class="c-button u-mt-x2" 
(click)="onSearch()">Search</a></div>
+        </div>
+      </div>
+    </div>-->
+    <div class="o-grid">
+      <div class="o-grid__col u-1/2">
+        <div class="c-card u-mv-x1 u-text-center">
+          <a class="c-button" (click)="openAddRecordMenu()">Add New Record</a>
+        </div>
+      </div>
+      <div class="o-grid__col u-1/2">
+        <div class="c-card u-mv-x1 u-text-center">
+          <a class="c-button" (click)="openSearchGNSMenu()">GNS Search</a>
+        </div>
+      </div>
+    </div>
+    <div *ngIf="!request" class="u-mv-x1">
+      <div class="o-grid">
+        <div class="o-grid__col u-1/1 u-1/address@hidden" *ngFor="let record 
of gns_records">
+          <div class="c-card u-p-x2 u-mv-x1" >
+            <p class="u-color-grey">Record Name</p>
+            <p class="o-type-28 u-mb-x1">{{record.record_name}}</p>
+            <div>
+              <span class="u-color-grey">{{record.record_type}}:</span> 
{{record.value}}<br>
+              <span class="u-color-grey">Expires on:</span> 
{{record.expiration_time}} <br>
+              <span class="u-color-grey">Flag:</span> {{record.flag}}
+            </div>
+            <div class="o-list__item u-mh-x1 u-text-right">
+              <div class="">
+                <a class="c-button c-button--danger" 
(click)="deleteRecord(record.record_name)">
+                  <i class="fa fa-trash"></i>
+                </a>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
 
-<div class="c-card u-p-x3">
-  <h1 class="o-type-22 u-pb-x1 u-color-primary-light" >Search Namesystem</h1>
-  <div class="o-list o-list--inline">
-    <div class="o-list__item">
-      <p class="u-color-grey">Name:</p>
-      <input class="c-input u-2/2" placeholder="Name" [(ngModel)]="gns_name" />
+  <div *ngIf="add_record">
+    <div class="c-card">
+      <h1 class="o-type-22 u-mb-x3">Add GNS Record</h1>
+      <div class="">
+        <div class="u-mb-x2">
+          <p class="u-color-grey">Record Name</p>
+          <input class="c-input" placeholder="Name" 
[(ngModel)]="gns_record_add.record_name">
+        </div>
+        <div class="u-mb-x2">
+          <p class="u-color-grey">Record Type</p>
+          <input class="c-input" placeholder="e.g. A, AAAA, PKEY" 
[(ngModel)]="gns_record_add.record_type">
+        </div>
+        <div class="u-mb-x2">
+          <p class="u-color-grey">Value</p>
+          <input class="c-input" placeholder="e.g. 1.1.1.1, 1::1, ..." 
[(ngModel)]="gns_record_add.value">
+        </div>
+        <div class="u-mb-x2">
+          <p class="u-color-grey">Expiration Date</p>
+          <input class="c-input" placeholder="Expiration" 
[(ngModel)]="gns_record_add.expiration_time">
+        </div>
+        <div class="u-mb-x2">
+          <p class="u-color-grey">Flag</p>
+          <input class="c-input" placeholder="Flag" type="number" value="0" 
[(ngModel)]="gns_record_add.flag">
+        </div>
+        <div>
+          <a class="c-button u-mr-x1" (click)="addRecord(gns_record_add)">Add 
Record</a>
+          <a class="c-button c-button--outline" 
(click)="cancelAddRecord()">Cancel</a>
+        </div>
+      </div>
     </div>
-    <div class="o-list__item">
-      <p class="u-color-grey">Record Type (optional):</p>
-      <select class="c-input c-input--select u-2/2" 
[(ngModel)]="gns_recordtype" name="record_type">
-        <option [value]="0">ANY</option>
-        <option [value]="65536">PKEY</option>
-        <option [value]="65537">NICK</option>
-        <option [value]="65538">LEHO</option>
-        <option [value]="65539">VPN</option>
-        <option [value]="65540">GNS2DNS</option>
-        <option [value]="65541">BOX</option>
-        <option [value]="65542">PLACE</option>
-        <option [value]="65543">PHONE</option>
-        <option [value]="65544">ID_ATTR</option>
-        <option [value]="65545">ID_TOKEN</option>
-        <option [value]="65546">ID_TOKEN_METADATA</option>
-        <option [value]="65547">CREDENTIAL</option>
-        <option [value]="65548">POLICY</option>
-        <option [value]="65549">ATTRIBUTE</option>
-        <option [value]="65550">ABE_KEY</option>
-        <option [value]="65551">ABE_MASTER</option>
-      </select>
+  </div>
+
+  <div *ngIf="search_gns">
+    <div class="c-card u-p-x3" >
+      <h1 class="o-type-22 u-mb-x3 u-color-primary-light" >Search 
Namesystem</h1>
+      <div class="o-list">
+        <div class="o-list__item u-mb-x2">
+          <p class="u-color-grey">Name:</p>
+          <input class="c-input u-2/2" placeholder="Name" 
[(ngModel)]="gns_search_name" />
+        </div>
+        <div class="o-list__item u-mb-x2">
+          <p class="u-color-grey">Record Type (optional):</p>
+          <select class="c-input c-input--select u-2/2" 
[(ngModel)]="gns_search_type" name="record_type">
+            <option [value]="'ANY'">Any</option>
+            <option [value]="'PKEY'">Public Key</option>
+            <option [value]="'NICK'">Nickname</option>
+            <option [value]="'LEHO'">Legacy Hostname</option>
+            <option [value]="'VPN'">VPN resolution</option>
+            <option [value]="'GNS2DNS'">GNS 2 DNS</option>
+            <option [value]="'BOX'">Boxed Record</option>
+            <option [value]="'PLACE'">Social Place</option>
+            <option [value]="'PHONE'">Phone (Coversation)</option>
+            <option [value]="'ID_ATTR'">Identity Attribute</option>
+            <option [value]="'ID_TOKEN'">Identity Token</option>
+            <option [value]="'ID_TOKEN_METADATA'">Identity Metadata 
(Token)</option>
+            <option [value]="'CREDENTIAL'">Credential</option>
+            <option [value]="'POLICY'">Policy</option>
+            <option [value]="'ATTRIBUTE'">Reverse lookup (Attribute)</option>
+            <option [value]="'ABE_KEY'">ABE Record</option>
+            <option [value]="'ABE_MASTER'">ABE Master Key</option>
+          </select>
+        </div>
+        <div class="o-list__item u-align-bottom">
+          <div class="u-text-right">
+            <a class="c-button u-mr-x1" 
(click)="searchGNSRecord(gns_search_name,gns_search_type)">Search</a>
+            <a class="c-button c-button--outline" 
(click)="cancelSearchGNS()">Cancel</a>
+          </div>
+        </div>
+      </div>
     </div>
-    <div class="o-list__item u-align-bottom">
-      <div class="u-text-right"><a class="c-button u-mt-x2" 
(click)="onSearch()">Search</a></div>
+    <div class="c-card u-mt-x1" *ngFor="let item of gns_search_result">
+      Record type: {{item.record_type}}<br>
+      Record value: {{item.value}}<br>
+      Expires: {{item.expiration_time}}
     </div>
   </div>
 </div>
+
+
+<div *ngIf="request" class="u-text-center u-m-x3">
+  <div class="c-spinner"></div>
+</div>
diff --git a/src/app/namestore-page/namestore-page.component.ts 
b/src/app/namestore-page/namestore-page.component.ts
index fc3c501..773425a 100644
--- a/src/app/namestore-page/namestore-page.component.ts
+++ b/src/app/namestore-page/namestore-page.component.ts
@@ -1,29 +1,32 @@
 /*
-   This file is part of GNUnet.
-   Copyright (C) 2012-2015 GNUnet e.V.
-
-   GNUnet is free software: you can redistribute it and/or modify it
-   under the terms of the GNU Affero General Public License as published
-   by the Free Software Foundation, either version 3 of the License,
-   or (at your option) any later version.
-
-   GNUnet is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Affero General Public License for more details.
-
-   You should have received a copy of the GNU Affero General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-   */
+This file is part of GNUnet.
+Copyright (C) 2012-2015 GNUnet e.V.
+
+GNUnet is free software: you can redistribute it and/or modify it
+under the terms of the GNU Affero General Public License as published
+by the Free Software Foundation, either version 3 of the License,
+or (at your option) any later version.
+
+GNUnet is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 /**
- * @author Philippe Buschmann
- * @file src/app/namestore-page/namestore-page.component.ts
- * @brief
- *
- */
+* @author Philippe Buschmann
+* @file src/app/namestore-page/namestore-page.component.ts
+* @brief
+*
+*/
 
 import { Component, OnInit } from '@angular/core';
 import { ApiService } from '../api.service';
+import { GNSRecord } from '../gns-record';
+import { Identity } from '../identity';
+import { MessagesService } from '../messages.service';
 
 @Component({
   selector: 'app-namestore-page',
@@ -31,27 +34,190 @@ import { ApiService } from '../api.service';
 })
 export class NamestorePageComponent implements OnInit {
 
-  gns_name:string;
-  gns_recordtype:number = 0;
-  private gns_response:any =[];
+  gns_record: GNSRecord = new GNSRecord();
+  gns_records: GNSRecord[] = [];
+
+  gns_record_add: GNSRecord = new GNSRecord();
+
+  subsystem_identity: Identity;
+  all_identities: Identity[];
+
+  gns_search_name: string = '';
+  gns_search_type: string = 'ANY';
+  gns_search_result: GNSRecord[] = [];
 
+  add_record: boolean = false;
+  search_gns: boolean = false;
+  request: boolean = false;
+  default_zone: boolean = false;
   private url: string;
 
-  constructor(private apiService:ApiService) { }
+  constructor(private apiService:ApiService, private messages:MessagesService) 
{ }
 
   ngOnInit() {
+    this.getSubsystemIdentity();
+  }
+
+  getGNSRecords(){
+    this.request = true;
+    this.apiService.getNamestore().subscribe((data: any) => {
+      if(data)
+      if(!data.error)
+      this.default_zone = true;
+      if(data instanceof Array)
+      {
+        this.gns_records = data;
+      }
+      else
+      {
+        this.gns_records = [];
+      }
+      this.request = false;
+    });
+  }
+
+  getTemporaryGNSRecords(name: string){
+    this.request = true;
+    this.apiService.getNamestoreName(name).subscribe((data: any) => {
+      if(data)
+      if(!data.error)
+      this.default_zone = true;
+      if(data instanceof Array)
+      {
+        this.gns_records = data;
+      }
+      else
+      {
+        this.gns_records = [];
+      }
+      this.request = false;
+    });
+  }
+
+  getSubsystemIdentity(){
+    this.request = true;
+    this.apiService.getIdentitySubsystem('namestore').subscribe((data: any) => 
{
+      if(data)
+      {
+        if(!data.error)
+        {
+          this.default_zone = true;
+          this.getGNSRecords();
+        }
+        else{
+          this.getIdentities();
+        }
+      }
+      this.subsystem_identity = data;
+      this.request = false;
+    });
+  }
+
+  getIdentities(){
+    this.request = true;
+    this.apiService.getIdentityAll().subscribe((data: Identity[]) => {
+      this.all_identities = data;
+      this.request = false;
+    });
+  }
+
+  setSubsystemIdentity(name:string){
+    this.request = true;
+    this.apiService.putIdentitySubsystem(name,'namestore').subscribe(data => {
+      if (data)
+      if(!data.error)
+      this.messages.pushSuccess('Add subsystem successful');
+
+      if (!data)
+      this.messages.pushSuccess('Add subsystem successful');
+
+      this.getGNSRecords();
+      this.request = false;
+    });
+  }
+
+  useIdentity(identity: Identity){
+    this.messages.dismissAll();
+    this.subsystem_identity = identity;
+    this.getTemporaryGNSRecords(identity.name);
+    this.default_zone = true;
+  }
+  setIdentityAsDefault(identity: Identity) {
+    this.messages.dismissAll();
+    this.subsystem_identity = identity;
+    this.setSubsystemIdentity(identity.name);
+    this.default_zone = true;
+  }
+
+  addRecord(gns_record: GNSRecord){
+    this.request = true;
+    this.messages.dismissAll();
+    
this.apiService.postNamestoreName(this.subsystem_identity.name,gns_record).subscribe(data
 => {
+      if (data)
+      {
+        if(!data.error)
+        {
+          this.messages.pushSuccess('Add record successful');
+          this.add_record = false;
+        }
+      }
+
+      if (!data)
+      {
+        this.messages.pushSuccess('Add record successful');
+        this.add_record = false;
+      }
+
+      this.getTemporaryGNSRecords(this.subsystem_identity.name);
+      this.request = false;
+    });
+  }
+
+  deleteRecord(record_name: string){
+    this.request = true;
+    
this.apiService.deleteNamestoreName(this.subsystem_identity.name,record_name).subscribe(data
 => {
+      if (data)
+        if(!data.error)
+          this.messages.pushSuccess('Record delete successful');
+
+      if (!data)
+        this.messages.pushSuccess('Record delete successful');
+
+      this.getTemporaryGNSRecords(this.subsystem_identity.name);
+      this.request = false;
+    });
+  }
+
+  changeZone(){
+    this.default_zone = false;
+    this.getIdentities();
+  }
+
+  openAddRecordMenu(){
+    this.add_record = true;
+  }
+
+  cancelAddRecord(){
+    this.add_record = false;
+  }
+
+  openSearchGNSMenu(){
+    this.search_gns = true;
+  }
+
+  cancelSearchGNS(){
+    this.search_gns = false;
   }
 
-  onSearch(){
-    this.url = '?name='+this.gns_name;
-    if(this.gns_recordtype != null){
-      this.url += '&record_type='+this.gns_recordtype;
-    }
-    console.log(this.url);
-    this.apiService.searchNameSystem(this.url).subscribe(data => {
-      this.gns_response = data;
-      console.log(data);
+  searchGNSRecord(record_name:string, record_type:string){
+    this.request = true;
+    this.apiService.getGNSlookup(record_name,record_type).subscribe((data: 
any) => {
+      if(data)
+        if(data.error)
+          this.messages.pushError("GNS lookup failed");
 
+      this.gns_search_result = data;
+      this.request = false;
     });
   }
 
diff --git a/src/app/identity-api.ts b/src/app/peerinfo-address.ts
similarity index 88%
copy from src/app/identity-api.ts
copy to src/app/peerinfo-address.ts
index 005276f..7ef2f18 100644
--- a/src/app/identity-api.ts
+++ b/src/app/peerinfo-address.ts
@@ -17,12 +17,10 @@
    */
 /**
  * @author Philippe Buschmann
- * @file src/app/identity-api.ts
+ * @file src/app/peerinfo-address.ts
  * @brief
- *
  */
-
-export class IdentityAPI{
-  pubkey: string;
-  name: string;
+export class PeerinfoAddress {
+  address: string;
+  expires: string;
 }
diff --git a/src/app/peerinfo-page/peerinfo-page.component.html 
b/src/app/peerinfo-page/peerinfo-page.component.html
new file mode 100644
index 0000000..0ca707b
--- /dev/null
+++ b/src/app/peerinfo-page/peerinfo-page.component.html
@@ -0,0 +1,15 @@
+
+<h1 class="o-type-35 c-card">Peerinfo</h1>
+<div *ngIf="request" class="u-text-center u-m-x3">
+  <div class="c-spinner"></div>
+</div>
+<div class="c-card u-mv-x1" *ngFor="let item of peerinfo">
+  <p class="u-color-grey">Peer:</p>
+  <p class="o-type-22 u-mb-x2">{{item.peer}}</p>
+  <div class="o-list o-list--inline" *ngFor="let address of item.array">
+    <p class="o-list__item u-color-grey">Expires: </p>
+    <p class="o-list__item u-mr-x3">{{address.expires}}</p>
+    <p class="o-list__item u-color-grey">Address:</p>
+    <p class="o-list__item">{{address.address}}</p>
+  </div>
+</div>
diff --git a/src/app/peerstore-page/peerstore-page.component.spec.ts 
b/src/app/peerinfo-page/peerinfo-page.component.spec.ts
similarity index 100%
rename from src/app/peerstore-page/peerstore-page.component.spec.ts
rename to src/app/peerinfo-page/peerinfo-page.component.spec.ts
diff --git a/src/app/peerstore-page/peerstore-page.component.ts 
b/src/app/peerinfo-page/peerinfo-page.component.ts
similarity index 63%
rename from src/app/peerstore-page/peerstore-page.component.ts
rename to src/app/peerinfo-page/peerinfo-page.component.ts
index 2af569b..3da7b9b 100644
--- a/src/app/peerstore-page/peerstore-page.component.ts
+++ b/src/app/peerinfo-page/peerinfo-page.component.ts
@@ -11,28 +11,42 @@
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Affero General Public License for more details.
-  
+
    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    */
 /**
  * @author Philippe Buschmann
  * @file src/app/peerstore-page/peerstore-page.component.ts
- * @brief 
+ * @brief
  *
  */
 
 import { Component, OnInit } from '@angular/core';
+import { PeerinfoResponse } from './../peerinfo-response';
+import { ApiService } from '../api.service';
 
 @Component({
-  selector: 'app-peerstore-page',
-  templateUrl: './peerstore-page.component.html'
+  selector: 'app-peerinfo-page',
+  templateUrl: './peerinfo-page.component.html'
 })
-export class PeerstorePageComponent implements OnInit {
+export class PeerinfoPageComponent implements OnInit {
+
+  request: boolean = false;
+  peerinfo: PeerinfoResponse[];
 
-  constructor() { }
+  constructor(private apiService:ApiService) { }
 
   ngOnInit() {
+    this.request = true;
+    this.apiService.getPeerinfo().subscribe(data => {
+      this.peerinfo = data;
+      this.request = false;
+    });
+  }
+
+  getPeerInfo(){
+
   }
 
 }
diff --git a/src/app/identity-api.ts b/src/app/peerinfo-response.ts
similarity index 82%
rename from src/app/identity-api.ts
rename to src/app/peerinfo-response.ts
index 005276f..fe80655 100644
--- a/src/app/identity-api.ts
+++ b/src/app/peerinfo-response.ts
@@ -17,12 +17,12 @@
    */
 /**
  * @author Philippe Buschmann
- * @file src/app/identity-api.ts
+ * @file src/app/peerinfo-response.ts
  * @brief
- *
  */
+import { PeerinfoAddress } from './peerinfo-address';
 
-export class IdentityAPI{
-  pubkey: string;
-  name: string;
+export class PeerinfoResponse {
+  peer: string;
+  array: PeerinfoAddress[];
 }
diff --git a/src/app/peerstore-page/peerstore-page.component.html 
b/src/app/peerstore-page/peerstore-page.component.html
deleted file mode 100644
index 8bdd960..0000000
--- a/src/app/peerstore-page/peerstore-page.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<p>
-  peerstore-page works!
-</p>
diff --git a/src/app/rest-apis/rest-apis.component.ts 
b/src/app/rest-apis/rest-apis.component.ts
index 72ff3bf..824d89d 100644
--- a/src/app/rest-apis/rest-apis.component.ts
+++ b/src/app/rest-apis/rest-apis.component.ts
@@ -34,7 +34,7 @@ export class RestApisComponent implements OnInit {
   apis: RestAPI[] = [
     {name: 'Manage Identities', desc: 'Create new identities, edit their names 
and delete them!', link: 'identity'},
     {name: 'Maintain Names', desc: 'Do things!', link: 'namestore'},
-    {name: 'Handle Peers', desc: 'Do things!', link: 'peerstore'},
+    {name: 'Handle Peers', desc: 'Do things!', link: 'peerinfo'},
   ];
 
   constructor(private apiService: ApiService) { }
diff --git a/src/favicon.png b/src/favicon.png
new file mode 100644
index 0000000..b214792
Binary files /dev/null and b/src/favicon.png differ
diff --git a/src/gnunet-anonymous-logo.png b/src/gnunet-anonymous-logo.png
new file mode 100644
index 0000000..26fcf3b
Binary files /dev/null and b/src/gnunet-anonymous-logo.png differ
diff --git a/src/index.html b/src/index.html
index 99158cd..f8f6540 100644
--- a/src/index.html
+++ b/src/index.html
@@ -5,7 +5,8 @@
   <title>Gnunet Web UI</title>
   <base href="/">
   <meta name="viewport" content="width=device-width, initial-scale=1">
-  <link rel="icon" type="image/x-icon" href="favicon.ico">
+  <link rel="icon" type="image/png" href="favicon.png"/>
+  <link rel="tag" type="text/css"/>
 </head>
 <body>
   <app-root></app-root>
diff --git a/src/scss/base/_body.scss b/src/scss/base/_body.scss
index a6fd80d..bb5e8c7 100644
--- a/src/scss/base/_body.scss
+++ b/src/scss/base/_body.scss
@@ -4,3 +4,13 @@ body {
   font-weight: normal;
   height: 100%;
 }
+
+p {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+option {
+  outline: none;
+}
diff --git a/src/scss/components/_button.scss b/src/scss/components/_button.scss
index 8f3e4fa..e088d89 100644
--- a/src/scss/components/_button.scss
+++ b/src/scss/components/_button.scss
@@ -1,12 +1,12 @@
-$button-padding : $baseline-x2 $baseline-x4;
-$button-bgcolor : $color-primary;
+$button-padding : $baseline-x2+1px $baseline-x4+1px;
+$button-bgcolor : $color-primary-button;
 $button-bgcolor-hover : darken($button-bgcolor, 10%);
 $button-color : $color-white;
 $button-radius : 3px;
 
-$button-outline-padding : ( $baseline-x2 - 2 )( $baseline-x3 - 2 );
+$button-outline-padding : ( $baseline-x2 )( $baseline-x3 );
 $button-outline-bgcolor: transparent;
-$button-outline-color: $color-primary;
+$button-outline-color: $color-primary-button;
 $button-outline-color-hover: darken( $button-outline-color, 10% );
 
 .c-button {
diff --git a/src/scss/components/_circle.scss b/src/scss/components/_circle.scss
index 733cadf..6775e89 100644
--- a/src/scss/components/_circle.scss
+++ b/src/scss/components/_circle.scss
@@ -10,4 +10,5 @@ $circle-diameter: 70px;
   line-height: $circle-diameter;
   text-align: center;
   vertical-align: middle;
+  margin: auto;
 }
diff --git a/src/scss/components/_footer.scss b/src/scss/components/_footer.scss
index bbd3ffc..9686ea4 100644
--- a/src/scss/components/_footer.scss
+++ b/src/scss/components/_footer.scss
@@ -4,8 +4,9 @@ $footer-height: 50px;
   bottom: 0px;
   height: $footer-height;
   width: 100%;
-  background-color: $color-grey-light;
-  border-top: solid 1px $color-grey;
+  color: $color-contrary;
+  background-color: $color-primary;
+  //border-top: solid 1px $color-grey;
   position: fixed;
 }
 
diff --git a/src/scss/components/_header.scss b/src/scss/components/_header.scss
index 0192252..39affdc 100644
--- a/src/scss/components/_header.scss
+++ b/src/scss/components/_header.scss
@@ -2,7 +2,8 @@
   top:0px;
   position: sticky;
   width: 100%;
-  background-color: $color-grey-light;
-  border-bottom: solid 1px $color-grey;
+  background-color: $color-primary;
+  color: $color-contrary;
+  //border-bottom: solid 1px $color-grey;
   //color: $color-contrary;
 }
diff --git a/src/scss/components/_input.scss b/src/scss/components/_input.scss
index 347e98c..10bd435 100644
--- a/src/scss/components/_input.scss
+++ b/src/scss/components/_input.scss
@@ -1,5 +1,5 @@
 $input-padding : $baseline-x2 $baseline-x4 $baseline-x2 $baseline;
-$input-bgcolor-hover : darken($color-blue, 10%);
+$input-bgcolor-hover : $color-primary-button;
 $input-bgcolor : $color-white;
 $input-radius : 3px;
 $input-border-color: darken($color-grey-light, 5%);
diff --git a/src/scss/components/_link.scss b/src/scss/components/_link.scss
index 7a85e3f..122cd0c 100644
--- a/src/scss/components/_link.scss
+++ b/src/scss/components/_link.scss
@@ -3,6 +3,7 @@
   font-weight: bold;
   cursor: pointer;
   color: inherit;
+  outline: none;
 }
 
 .c-link:hover {
@@ -14,3 +15,7 @@
   cursor: pointer;
   color: $color-primary;
 }
+
+.c-link--underline{
+  border-bottom: 3px solid;
+}
diff --git a/src/scss/components/_spinner.scss 
b/src/scss/components/_spinner.scss
index b05af1c..f3122ac 100644
--- a/src/scss/components/_spinner.scss
+++ b/src/scss/components/_spinner.scss
@@ -7,6 +7,7 @@
     animation: spin 1s linear infinite;
     top: 1000px;
     display: inline-block;
+    margin: auto;
 }
 
 @keyframes spin {
diff --git a/src/scss/components/_triangle.scss 
b/src/scss/components/_triangle.scss
new file mode 100644
index 0000000..1ca89e8
--- /dev/null
+++ b/src/scss/components/_triangle.scss
@@ -0,0 +1,9 @@
+
+.c-triangle {
+  width: 0;
+  height: 0;
+  border-left: 5px solid transparent;
+  border-right: 5px solid transparent;
+
+  border-bottom: 5px solid $color-primary;
+}
diff --git a/src/scss/main.scss b/src/scss/main.scss
index 3865945..910b8fc 100644
--- a/src/scss/main.scss
+++ b/src/scss/main.scss
@@ -35,8 +35,9 @@
 @import 'components/circle';
 @import 'components/dropdown';
 @import 'components/modal';
address@hidden 'components/triangle';
 
-//@import 'utilities/align-items';
address@hidden 'utilities/align-items';
 @import 'utilities/align';
 @import 'utilities/bgcolor';
 //@import 'utilities/clearfix';
diff --git a/src/scss/objects/_grid.scss b/src/scss/objects/_grid.scss
index 30312ca..b5be991 100644
--- a/src/scss/objects/_grid.scss
+++ b/src/scss/objects/_grid.scss
@@ -8,7 +8,7 @@
  * Type: Boolean
  */
 
-$iota-objs-grid-aligned: false;
+$iota-objs-grid-aligned: true;
 
 
 /**
diff --git a/src/scss/settings/_baseline.scss b/src/scss/settings/_baseline.scss
index 2855a88..42f9dea 100644
--- a/src/scss/settings/_baseline.scss
+++ b/src/scss/settings/_baseline.scss
@@ -1,5 +1,6 @@
 $baseline: 7px;
 
+$baseline-x0: 0px;
 $baseline-x2: $baseline * 2;
 $baseline-x3: $baseline * 3;
 $baseline-x4: $baseline * 4;
diff --git a/src/scss/settings/_colors.scss b/src/scss/settings/_colors.scss
index b154393..6751e3f 100644
--- a/src/scss/settings/_colors.scss
+++ b/src/scss/settings/_colors.scss
@@ -26,8 +26,10 @@ $info-color: #0c5460;
 $info-bgcolor: #d1ecf1;
 $info-border-color: #bee5eb;
 
-$color-primary: $color-blue;
-$color-primary-light: lighten($color-primary, 10%);
+$color-primary: #333333;
+$color-primary-light: #333333;
+$color-primary-button: darken(#6bbae4,10%);
+//$color-contrary: #9d9d9d;
 $color-contrary: $color-white;
 $color-secondary: $color-primary-light;
 $color-secondary-light: $color-grey-light;
diff --git a/src/scss/settings/_core.scss b/src/scss/settings/_core.scss
index f034f1a..9075189 100644
--- a/src/scss/settings/_core.scss
+++ b/src/scss/settings/_core.scss
@@ -66,7 +66,11 @@ $iota-global-rtl: false;
  */
 
 $iota-global-breakpoints: (
-  sm  : "screen and ( min-width: 768px )"
+  xs  : "screen and ( min-width: 640px )",
+  sm  : "screen and ( min-width: 768px )",
+  md  : "screen and ( min-width: 1024px )",
+  lg  : "screen and ( min-width: 1200px )"
+
 );
 
 
diff --git a/src/scss/settings/_spacing.scss b/src/scss/settings/_spacing.scss
index 6628663..8e637ff 100644
--- a/src/scss/settings/_spacing.scss
+++ b/src/scss/settings/_spacing.scss
@@ -1,6 +1,7 @@
 $spacing-default: $baseline;
 
 $spacing-extra: (
+  -x0 : $baseline-x0,
   -x1 : $baseline,
   -x2 : $baseline-x2,
   -x3 : $baseline-x3,
diff --git a/src/scss/utilities/_margin.scss b/src/scss/utilities/_margin.scss
index d4753d5..9bff58e 100644
--- a/src/scss/utilities/_margin.scss
+++ b/src/scss/utilities/_margin.scss
@@ -23,7 +23,7 @@ $iota-utils-margin-extra: $spacing-extra;
  * Type: Boolean
  */
 
-$iota-utils-margin-res: false;
+$iota-utils-margin-res: true;
 
 
 /**

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]