diff options
Diffstat (limited to 'src/app/namestore-page/namestore-page.component.ts')
-rw-r--r-- | src/app/namestore-page/namestore-page.component.ts | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/app/namestore-page/namestore-page.component.ts b/src/app/namestore-page/namestore-page.component.ts index 0369542..fc3c501 100644 --- a/src/app/namestore-page/namestore-page.component.ts +++ b/src/app/namestore-page/namestore-page.component.ts | |||
@@ -11,18 +11,19 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 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/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | /** | 18 | /** |
19 | * @author Philippe Buschmann | 19 | * @author Philippe Buschmann |
20 | * @file src/app/namestore-page/namestore-page.component.ts | 20 | * @file src/app/namestore-page/namestore-page.component.ts |
21 | * @brief | 21 | * @brief |
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | import { Component, OnInit } from '@angular/core'; | 25 | import { Component, OnInit } from '@angular/core'; |
26 | import { ApiService } from '../api.service'; | ||
26 | 27 | ||
27 | @Component({ | 28 | @Component({ |
28 | selector: 'app-namestore-page', | 29 | selector: 'app-namestore-page', |
@@ -30,9 +31,28 @@ import { Component, OnInit } from '@angular/core'; | |||
30 | }) | 31 | }) |
31 | export class NamestorePageComponent implements OnInit { | 32 | export class NamestorePageComponent implements OnInit { |
32 | 33 | ||
33 | constructor() { } | 34 | gns_name:string; |
35 | gns_recordtype:number = 0; | ||
36 | private gns_response:any =[]; | ||
37 | |||
38 | private url: string; | ||
39 | |||
40 | constructor(private apiService:ApiService) { } | ||
34 | 41 | ||
35 | ngOnInit() { | 42 | ngOnInit() { |
36 | } | 43 | } |
37 | 44 | ||
45 | onSearch(){ | ||
46 | this.url = '?name='+this.gns_name; | ||
47 | if(this.gns_recordtype != null){ | ||
48 | this.url += '&record_type='+this.gns_recordtype; | ||
49 | } | ||
50 | console.log(this.url); | ||
51 | this.apiService.searchNameSystem(this.url).subscribe(data => { | ||
52 | this.gns_response = data; | ||
53 | console.log(data); | ||
54 | |||
55 | }); | ||
56 | } | ||
57 | |||
38 | } | 58 | } |