mirror of
https://github.com/MikroWizard/mikrofront.git
synced 2025-06-27 04:48:48 +02:00
fix some styling and view bugs,fix device filtering in devlogs
This commit is contained in:
parent
d593919fc0
commit
e18d9417c9
15 changed files with 63 additions and 29 deletions
|
@ -23,7 +23,6 @@ export class AppComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
console.log(this.router.url);
|
|
||||||
this.router.events.subscribe((evt) => {
|
this.router.events.subscribe((evt) => {
|
||||||
if (!(evt instanceof NavigationEnd)) {
|
if (!(evt instanceof NavigationEnd)) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -37,9 +37,9 @@
|
||||||
<!--main-->
|
<!--main-->
|
||||||
<div class="wrapper d-flex flex-column min-vh-100 bg-light dark:bg-transparent">
|
<div class="wrapper d-flex flex-column min-vh-100 bg-light dark:bg-transparent">
|
||||||
<!--app-header-->
|
<!--app-header-->
|
||||||
<app-default-header (UserModalEvent)="show_user_modal()" class="mb-4 d-print-none header header-sticky" position="sticky" sidebarId="sidebar" />
|
<app-default-header (UserModalEvent)="show_user_modal()" class="mb-2 d-print-none header header-sticky" position="sticky" sidebarId="sidebar" />
|
||||||
<!--app-body-->
|
<!--app-body-->
|
||||||
<div class="body flex-grow-1 px-3">
|
<div class="main-container body flex-grow-1 px-3" style="display: flex;">
|
||||||
<c-container breakpoint="fluid" class="h-auto">
|
<c-container breakpoint="fluid" class="h-auto">
|
||||||
<router-outlet />
|
<router-outlet />
|
||||||
</c-container>
|
</c-container>
|
||||||
|
|
|
@ -9,4 +9,15 @@
|
||||||
--cui-sidebar-nav-title-margin-top: 0.1rem;
|
--cui-sidebar-nav-title-margin-top: 0.1rem;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.header{
|
||||||
|
--cui-subheader-min-height:2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
::ng-deep .card{
|
||||||
|
--cui-card-border-radius:0.2rem;
|
||||||
|
--cui-card-cap-padding-y:0.4rem;
|
||||||
|
}
|
||||||
|
::ng-deep :root{
|
||||||
|
--cui-body-font-size:0.8rem;
|
||||||
}
|
}
|
|
@ -113,11 +113,14 @@ export class DefaultLayoutComponent implements OnInit {
|
||||||
_self.navItems=_self.navItems.filter((item:any) => {
|
_self.navItems=_self.navItems.filter((item:any) => {
|
||||||
if (item.attributes){
|
if (item.attributes){
|
||||||
if('free' in item.attributes && _self.ispro){
|
if('free' in item.attributes && _self.ispro){
|
||||||
//do nothing
|
return ;
|
||||||
}
|
}
|
||||||
else if('pro' in item.attributes && _self.ispro){
|
else if('pro' in item.attributes && _self.ispro){
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
else if('pro' in item.attributes && !_self.ispro){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,17 @@ border: 1px solid #dfdfdf!important;
|
||||||
padding: 1rem!important;
|
padding: 1rem!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gui-row-detail > div{
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
|
.gui-row-detail .log-detail{
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gui-structure{
|
||||||
|
min-height: 550px;
|
||||||
|
}
|
||||||
|
|
||||||
.log-detail code{
|
.log-detail code{
|
||||||
padding:5px!important;
|
padding:5px!important;
|
||||||
display:block;
|
display:block;
|
||||||
|
|
|
@ -85,7 +85,7 @@ export class AccComponent implements OnInit {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
template: (item) => {
|
template: (item) => {
|
||||||
return `
|
return `
|
||||||
<div class='log-detail'>
|
<div class='log-detail' style="width: 355px;">
|
||||||
<h1>${item.name}</h1>
|
<h1>${item.name}</h1>
|
||||||
<small>${item.devip}</small>
|
<small>${item.devip}</small>
|
||||||
<table>
|
<table>
|
||||||
|
|
|
@ -120,12 +120,12 @@
|
||||||
</form>
|
</form>
|
||||||
</c-col>
|
</c-col>
|
||||||
</c-row>
|
</c-row>
|
||||||
<c-chart [data]="chart_data" [options]="options" [height]="200" type="line">
|
<c-chart [data]="chart_data" [options]="options" [height]="250" type="line">
|
||||||
</c-chart>
|
</c-chart>
|
||||||
</c-card-body>
|
</c-card-body>
|
||||||
</c-card>
|
</c-card>
|
||||||
<c-row>
|
<c-row>
|
||||||
<c-col xl="6" *ngIf="stats" lg="12" class="h-100">
|
<c-col xl="6" *ngIf="stats" lg="12" class="h-100" style="height: 160px!important;">
|
||||||
<c-widget-stat-b [title]="stats['version']" class="mb-1 h-100" value="Version">
|
<c-widget-stat-b [title]="stats['version']" class="mb-1 h-100" value="Version">
|
||||||
<div class="my-1">
|
<div class="my-1">
|
||||||
<code style="padding: 0!important;">Serial:</code> <small
|
<code style="padding: 0!important;">Serial:</code> <small
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
</c-widget-stat-b>
|
</c-widget-stat-b>
|
||||||
</c-col>
|
</c-col>
|
||||||
|
|
||||||
<c-col xl="6" lg="12" class="h-100">
|
<c-col xl="6" lg="12" class="h-100" style="height: 160px!important;">
|
||||||
<c-card class="mb-1 p-1 h-100" *ngIf="stats">
|
<c-card class="mb-1 p-1 h-100" *ngIf="stats">
|
||||||
<c-carousel [dark]="true" [animate]="false" [wrap]="false" [interval]="1000000">
|
<c-carousel [dark]="true" [animate]="false" [wrap]="false" [interval]="1000000">
|
||||||
<c-carousel-indicators></c-carousel-indicators>
|
<c-carousel-indicators></c-carousel-indicators>
|
||||||
|
|
|
@ -5,10 +5,10 @@ import { loginChecker } from "../../providers/login_checker";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
import { formatInTimeZone } from "date-fns-tz";
|
import { formatInTimeZone } from "date-fns-tz";
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: "dashboard.component.html",
|
templateUrl: "dashboard.component.html",
|
||||||
})
|
})
|
||||||
|
|
||||||
export class DashboardComponent implements OnInit {
|
export class DashboardComponent implements OnInit {
|
||||||
public uid: number;
|
public uid: number;
|
||||||
public uname: string;
|
public uname: string;
|
||||||
|
|
|
@ -119,9 +119,14 @@
|
||||||
Fixed</c-badge>
|
Fixed</c-badge>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</gui-grid-column>
|
</gui-grid-column>
|
||||||
<gui-grid-column header="eventtime" width='200' field="eventtime">
|
<gui-grid-column header="eventtime" width='220' field="eventtime">
|
||||||
<ng-template let-value="item.eventtime" let-item="item" let-index="index">
|
<ng-template let-value="item.eventtime" let-item="item" let-index="index">
|
||||||
{{ value }}
|
<div *ngIf="item.fixtime" class="fixed_time"><span><c-badge *ngIf="item.status==true" color="danger" style="font-size: 0.65em!important;padding: 3px 5px;" size="sm"
|
||||||
|
shape="rounded-pill">Event</c-badge> {{value}}</span><span>
|
||||||
|
<c-badge *ngIf="item.status==true" color="success" style="font-size: 0.65em!important;padding: 3px 5px;" size="sm"
|
||||||
|
shape="rounded-pill">Fixed</c-badge> {{item.fixtime}}</span>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="!item.fixtime"> {{ value }}</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</gui-grid-column>
|
</gui-grid-column>
|
||||||
<gui-grid-column header="Device" width='200' field="name">
|
<gui-grid-column header="Device" width='200' field="name">
|
||||||
|
|
|
@ -106,6 +106,12 @@ padding: 0.5rem!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.fixed_time{
|
||||||
|
display:flex;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
padding: 1px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.example-form {
|
.example-form {
|
||||||
@include mat.button-density(-5);
|
@include mat.button-density(-5);
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ export class DevLogsComponent implements OnInit {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
template: (item) => {
|
template: (item) => {
|
||||||
return `
|
return `
|
||||||
<div class='log-detail' style="color:#fff;background-color:${(() => {
|
<div class='log-detail' style="width: 355px;color:#fff;background-color:${(() => {
|
||||||
if (item.level == "Critical") return "#e55353";
|
if (item.level == "Critical") return "#e55353";
|
||||||
else if (item.level == "Warning") return "#f9b115";
|
else if (item.level == "Warning") return "#f9b115";
|
||||||
else item.level == "Info";
|
else item.level == "Info";
|
||||||
|
@ -223,6 +223,12 @@ export class DevLogsComponent implements OnInit {
|
||||||
_self.tz,
|
_self.tz,
|
||||||
"yyyy-MM-dd HH:mm:ss XXX"
|
"yyyy-MM-dd HH:mm:ss XXX"
|
||||||
);
|
);
|
||||||
|
if (d.fixtime)
|
||||||
|
d.fixtime = formatInTimeZone(
|
||||||
|
d.fixtime.split(".")[0] + ".000Z",
|
||||||
|
_self.tz,
|
||||||
|
"yyyy-MM-dd HH:mm:ss XXX"
|
||||||
|
);
|
||||||
index += 1;
|
index += 1;
|
||||||
return d;
|
return d;
|
||||||
});
|
});
|
||||||
|
|
|
@ -190,7 +190,7 @@
|
||||||
<label cFormCheckLabel>Safe Update</label>
|
<label cFormCheckLabel>Safe Update</label>
|
||||||
<c-form-feedback style="display: block;color: #979797;margin-top: 0;" [valid]="true"><code style="padding: 0!important;">PRO</code>
|
<c-form-feedback style="display: block;color: #979797;margin-top: 0;" [valid]="true"><code style="padding: 0!important;">PRO</code>
|
||||||
* Download and install reqired firmware before installing the target firmware . for example it will install
|
* Download and install reqired firmware before installing the target firmware . for example it will install
|
||||||
latest 7.12 then upgrade to newer version >7.13</c-form-feedback>
|
latest 7.12 then upgrade to newer version >7.13 or install Required packages before update</c-form-feedback>
|
||||||
</c-form-check>
|
</c-form-check>
|
||||||
<button cButton color="primary" (click)="saveSysSetting()">Save</button>
|
<button cButton color="primary" (click)="saveSysSetting()">Save</button>
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ import { TimeZones } from "./timezones-data";
|
||||||
styleUrls: ["settings.component.scss"],
|
styleUrls: ["settings.component.scss"],
|
||||||
encapsulation: ViewEncapsulation.None,
|
encapsulation: ViewEncapsulation.None,
|
||||||
})
|
})
|
||||||
|
|
||||||
export class SettingsComponent implements OnInit {
|
export class SettingsComponent implements OnInit {
|
||||||
public uid: number;
|
public uid: number;
|
||||||
public uname: string;
|
public uname: string;
|
||||||
|
@ -65,6 +66,7 @@ export class SettingsComponent implements OnInit {
|
||||||
return value !== undefined && value !== null && value !== "";
|
return value !== undefined && value !== null && value !== "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewChildren(ToasterComponent) viewChildren!: QueryList<ToasterComponent>;
|
@ViewChildren(ToasterComponent) viewChildren!: QueryList<ToasterComponent>;
|
||||||
|
|
||||||
public source: Array<any> = [];
|
public source: Array<any> = [];
|
||||||
|
|
|
@ -81,7 +81,7 @@ export class SyslogComponent implements OnInit {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
template: (item) => {
|
template: (item) => {
|
||||||
return `
|
return `
|
||||||
<div class='log-detail' style="color:#fff;background-color:#3399ff">
|
<div class='log-detail' style="width: 355px;color:#fff;background-color:#3399ff">
|
||||||
<h2>System Log :</h2>
|
<h2>System Log :</h2>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -92,19 +92,6 @@ pre {
|
||||||
background: transparent!important;
|
background: transparent!important;
|
||||||
padding: 0!important;
|
padding: 0!important;
|
||||||
}
|
}
|
||||||
table,
|
|
||||||
tbody,
|
|
||||||
tr,
|
|
||||||
td {
|
|
||||||
background: inherit!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
border-collapse: separate!important;
|
|
||||||
border-spacing: 0!important;
|
|
||||||
background: inherit!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* for block of numbers */
|
/* for block of numbers */
|
||||||
td.hljs-ln-numbers {
|
td.hljs-ln-numbers {
|
||||||
position: sticky!important;
|
position: sticky!important;
|
||||||
|
@ -123,3 +110,7 @@ pre {
|
||||||
padding-left: 10px !important;
|
padding-left: 10px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.gui-structure, .gui-structure *{
|
||||||
|
font-size: inherit!important;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue