aboutsummaryrefslogtreecommitdiff
path: root/src/app/gns-page/gns-page.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/gns-page/gns-page.component.ts')
-rw-r--r--src/app/gns-page/gns-page.component.ts81
1 files changed, 0 insertions, 81 deletions
diff --git a/src/app/gns-page/gns-page.component.ts b/src/app/gns-page/gns-page.component.ts
deleted file mode 100644
index 8147dcf..0000000
--- a/src/app/gns-page/gns-page.component.ts
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2012-2015 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18/**
19 * @author Philippe Buschmann
20 * @file src/app/gns-page/gns-page.component.ts
21 * @brief
22 *
23 */
24
25import { Component, OnInit } from '@angular/core';
26import { ApiService } from '../api.service';
27
28@Component({
29 selector: 'gns-page',
30 templateUrl: './gns-page.component.html'
31})
32export class GnsPageComponent implements OnInit {
33
34 private gns_name:string;
35 private gns_recordtype:number = 0;
36 private gns_options:number = 0;
37 private gns_zonekey:string = '';
38 private display_ego: boolean = true;
39 private display_zonekey: boolean = true;
40 private gns_ego:string = '';
41 private gns_response:any =[];
42
43 private url: string;
44
45 constructor(private apiService:ApiService) { }
46
47 ngOnInit() {
48 }
49
50 onSearch(){
51 this.url = '?name='+this.gns_name;
52 if(this.gns_recordtype != null){
53 this.url += '&record_type='+this.gns_recordtype;
54 }
55 if(this.gns_options != null){
56 this.url += '&options='+this.gns_options;
57 }
58 if(this.gns_zonekey != null && this.gns_zonekey != ''){
59 this.url += '&pkey='+this.gns_zonekey;
60 }
61 if(this.gns_ego != null && this.gns_ego != ''){
62 this.url += '&ego='+this.gns_ego;
63 }
64 console.log(this.url);
65 this.apiService.searchNameSystem(this.url).subscribe(data => {
66 this.gns_response = data;
67 });
68 }
69
70 toggleEgo(){
71 if(this.gns_zonekey == ''){ this.display_ego = true; }
72 else { this.display_ego = false; }
73 }
74
75 toggleZonekey(){
76 if(this.gns_ego == ''){ this.display_zonekey = true; }
77 else { this.display_zonekey = false; }
78 }
79
80
81}