Browse Source

device service getUserDevices

pull/7740/head
Maksym Dudnik 4 years ago
parent
commit
c82bcbafd7
  1. 4
      ui-ngx/proxy.conf.js
  2. 5
      ui-ngx/src/app/core/http/device.service.ts

4
ui-ngx/proxy.conf.js

@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const forwardUrl = "http://localhost:8080";
const wsForwardUrl = "ws://localhost:8080";
const forwardUrl = "https://thingsboard.cloud/";
const wsForwardUrl = "wss://thingsboard.cloud/";
const ruleNodeUiforwardUrl = forwardUrl;
const PROXY_CONFIG = {

5
ui-ngx/src/app/core/http/device.service.ts

@ -42,6 +42,11 @@ export class DeviceService {
private http: HttpClient
) { }
public getUserDevices(pageLink: PageLink, type: string = '', config?: RequestConfig): Observable<PageData<Device>> {
return this.http.get<PageData<Device>>(`/api/user/devices${pageLink.toQuery()}&type=${type}`,
defaultHttpOptionsFromConfig(config));
}
public getTenantDeviceInfos(pageLink: PageLink, type: string = '',
config?: RequestConfig): Observable<PageData<DeviceInfo>> {
return this.http.get<PageData<DeviceInfo>>(`/api/tenant/deviceInfos${pageLink.toQuery()}&type=${type}`,

Loading…
Cancel
Save