From 89a0646d18da6f3290a883121e38f4086a6fb37e Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Wed, 07 Jun 2017 16:35:16 +0000
Subject: [PATCH] #3531 fea - Added acces to packs from license type, organizatins and applications listing
---
securis/src/main/webapp/src/app/resources/packs.ts | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/securis/src/main/webapp/src/app/resources/packs.ts b/securis/src/main/webapp/src/app/resources/packs.ts
index 17ce29b..2bed001 100644
--- a/securis/src/main/webapp/src/app/resources/packs.ts
+++ b/securis/src/main/webapp/src/app/resources/packs.ts
@@ -1,7 +1,7 @@
import { Observable } from 'rxjs/Rx';
import { Injectable } from '@angular/core';
import { Http, RequestOptions } from '@angular/http';
-import { SeCurisResourceServices } from './base';
+import { SeCurisResourceServices, MySearchParams } from './base';
import { LocaleService } from '../common/i18n';
var pack_example = {
@@ -31,6 +31,13 @@
organization_name: 'CurisTec',
preactivation_valid_period: 70,
renew_valid_period: 0,
+}
+
+export type PacksFilter = {
+ licenseTypeId?: number;
+ organizationId?: number;
+ applicationId?: number;
+ name?: string;
}
export const PACK_STATUS = {
@@ -79,6 +86,13 @@
super($L, http, 'pack');
}
+ public get(filter?: PacksFilter) {
+ let searchParams = new MySearchParams(filter);
+ let url = `${this.resource}/?${searchParams}`;
+ console.log(`url: ${url}`);
+ return this.http.get(url).map(response => response.json()).catch(err => super.processErrorResponse(err));
+ }
+
public activate(id: number) {
return super.action(id, "activate");
}
--
Gitblit v1.3.2