diff --git a/src/app/views/dashboard/dashboard.component.html b/src/app/views/dashboard/dashboard.component.html
index 34d9e11..3f6bc46 100644
--- a/src/app/views/dashboard/dashboard.component.html
+++ b/src/app/views/dashboard/dashboard.component.html
@@ -135,7 +135,7 @@
class="fa-solid fa-check">Copy
diff --git a/src/app/views/dashboard/dashboard.component.ts b/src/app/views/dashboard/dashboard.component.ts
index 2637c3b..11b571a 100644
--- a/src/app/views/dashboard/dashboard.component.ts
+++ b/src/app/views/dashboard/dashboard.component.ts
@@ -5,19 +5,6 @@ import { loginChecker } from "../../providers/login_checker";
import { Router } from "@angular/router";
import { formatInTimeZone } from "date-fns-tz";
-interface IUser {
- name: string;
- state: string;
- registered: string;
- country: string;
- usage: number;
- period: string;
- payment: string;
- activity: string;
- avatar: string;
- status: string;
- color: string;
-}
@Component({
templateUrl: "dashboard.component.html",
@@ -195,7 +182,6 @@ export class DashboardComponent implements OnInit {
initStats() {
var _self = this;
this.data_provider.dashboard_stats(true).then((res) => {
- console.dir(res);
_self.stats = res;
});
}
diff --git a/src/app/views/devices/devices.component.ts b/src/app/views/devices/devices.component.ts
index 4cd9a2c..f7d395a 100644
--- a/src/app/views/devices/devices.component.ts
+++ b/src/app/views/devices/devices.component.ts
@@ -401,7 +401,10 @@ export class DevicesComponent implements OnInit, OnDestroy {
get_groups() {
var _self = this;
this.data_provider.get_devgroup_list().then((res) => {
- _self.groups = res;
+ if( "status" in res && res.status == 'failed' )
+ _self.groups=false
+ else
+ _self.groups = res.data;
});
}
diff --git a/src/app/views/syslog/syslog.component.ts b/src/app/views/syslog/syslog.component.ts
index 9586b29..d828d95 100644
--- a/src/app/views/syslog/syslog.component.ts
+++ b/src/app/views/syslog/syslog.component.ts
@@ -166,9 +166,11 @@ export class SyslogComponent implements OnInit {
toggleCollapse(): void {
this.filters_visible = !this.filters_visible;
}
+
logger(item: any) {
console.dir(item);
}
+
reinitgrid(field: string, $event: any) {
if (field == "start") this.filters["start_time"] = $event.target.value;
else if (field == "end") this.filters["end_time"] = $event.target.value;
@@ -177,6 +179,7 @@ export class SyslogComponent implements OnInit {
else if (field == "ip") this.filters["ip"] = $event;
this.initGridTable();
}
+
initGridTable(): void {
var _self = this;
_self.event_section = [];
diff --git a/src/app/views/user_manager/user_manager.component.ts b/src/app/views/user_manager/user_manager.component.ts
index 9c11153..8da80eb 100644
--- a/src/app/views/user_manager/user_manager.component.ts
+++ b/src/app/views/user_manager/user_manager.component.ts
@@ -178,6 +178,11 @@ export class UserManagerComponent implements OnInit {
}
});
} else {
+ console.dir(_self.userperms); if (_self.userperms.length > 0) {
+ _self.SelectedUser["userperms"] = _self.userperms;
+ } else {
+ _self.SelectedUser["userperms"] = [];
+ }
_self.SelectedUser["adminperms"] = _self.adminperms;
this.data_provider.edit_user(_self.SelectedUser).then((res) => {
_self.initGridTable();