Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
portal-apps-manage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angular
portal-apps-manage
Commits
ddbcfa1f
Commit
ddbcfa1f
authored
Sep 07, 2025
by
Ooh-Ao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
icon
parent
eed0a650
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
99 deletions
+51
-99
dashboard-management.component.html
.../dashboard-management/dashboard-management.component.html
+7
-79
widget-config.component.html
...ard-management/widget-config/widget-config.component.html
+11
-2
widget-config-generator.service.ts
...portal-manage/services/widget-config-generator.service.ts
+7
-1
simple-kpi-widget.component.html
...idgets/simple-kpi-widget/simple-kpi-widget.component.html
+22
-17
simple-kpi-widget.component.ts
.../widgets/simple-kpi-widget/simple-kpi-widget.component.ts
+4
-0
No files found.
src/app/portal-manage/dashboard-management/dashboard-management.component.html
View file @
ddbcfa1f
...
...
@@ -138,7 +138,14 @@
</div>
<div
class=
"dashboard-content"
>
<div
*
ngIf=
"!panels || panels.length === 0"
class=
"flex flex-col justify-center items-center h-full text-center text-gray-500 bg-gray-50 rounded-lg"
>
<i
class=
"bi bi-kanban text-6xl text-gray-300"
></i>
<h3
class=
"mt-4 text-xl font-semibold text-gray-700"
>
Empty Dashboard
</h3>
<p
class=
"mt-2 max-w-md"
>
To get started, select a dashboard from the dropdown above or create a new one. Then, click on a widget from the sidebar on the left to add it to this canvas.
</p>
</div>
<ejs-dashboardlayout
*
ngIf=
"panels.length > 0"
id=
"dashboard_default"
[
columns
]="
6
"
[
cellSpacing
]="
cellSpacing
"
...
...
@@ -182,85 +189,6 @@
></ng-container>
</ng-template>
</e-panel>
<!-- <e-panel [sizeX]="3" [sizeY]="2" [row]="0" [col]="3">
<ng-template #header>
<div>Last year Sales Comparison</div>
</ng-template>
<ng-template #content>
<div id="line">
<ejs-chart
id="lineChart"
height="162px"
[primaryXAxis]="primaryXAxis"
>
<e-series-collection>
<e-series
[dataSource]="lineData"
xName="x"
yName="y"
type="Line"
>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</ng-template>
</e-panel>
<e-panel [sizeX]="3" [sizeY]="2" [row]="2" [col]="0">
<ng-template #header>
<div>Sales increase percentage 1</div>
</ng-template>
<ng-template #content>
<div id="pie">
<ejs-accumulationchart
id="pieChart"
height="162px"
[legendSettings]="legendSettings"
[tooltip]="tooltip"
>
<e-accumulation-series-collection>
<e-accumulation-series
[dataSource]="piechart"
xName="x"
yName="y"
innerRadius="20%"
name="Browser"
[dataLabel]="datalabel"
>
</e-accumulation-series>
</e-accumulation-series-collection>
</ejs-accumulationchart>
</div>
</ng-template>
</e-panel>
<e-panel [sizeX]="3" [sizeY]="2" [row]="2" [col]="3">
<ng-template #header>
<div>Sales increase percentage 2</div>
</ng-template>
<ng-template #content>
<div id="pie1">
<ejs-accumulationchart
id="pieChart1"
[enableAnimation]="false"
height="162px"
[tooltip]="tooltip"
[legendSettings]="legendSettings"
>
<e-accumulation-series-collection>
<e-accumulation-series
[dataSource]="piechart1"
xName="x"
yName="y"
radius="70%"
name="Browser"
[dataLabel]="datalabel"
>
</e-accumulation-series>
</e-accumulation-series-collection>
</ejs-accumulationchart>
</div>
</ng-template>
</e-panel> -->
</e-panels>
</ejs-dashboardlayout>
</div>
...
...
src/app/portal-manage/dashboard-management/widget-config/widget-config.component.html
View file @
ddbcfa1f
...
...
@@ -558,6 +558,10 @@
<div
*
ngIf=
"widgetType === 'SimpleKpiWidgetComponent'"
>
<mat-form-field
appearance=
"fill"
>
<mat-label>
Title
</mat-label>
<input
matInput
[(
ngModel
)]="
currentConfig
.
title
"
name=
"title"
>
</mat-form-field>
<mat-form-field
appearance=
"fill"
>
<mat-label>
Value Field
</mat-label>
<mat-select
[(
ngModel
)]="
currentConfig
.
valueField
"
name=
"valueField"
>
<mat-option
*
ngFor=
"let col of availableColumns"
[
value
]="
col
"
>
{{ col }}
</mat-option>
...
...
@@ -575,8 +579,13 @@
<input
matInput
[(
ngModel
)]="
currentConfig
.
unit
"
name=
"unit"
>
</mat-form-field>
<mat-form-field
appearance=
"fill"
>
<mat-label>
Title
</mat-label>
<input
matInput
[(
ngModel
)]="
currentConfig
.
title
"
name=
"title"
>
<mat-label>
Icon (e.g., 'person-fill')
</mat-label>
<input
matInput
[(
ngModel
)]="
currentConfig
.
icon
"
name=
"icon"
>
<mat-hint>
Find icons at icons.getbootstrap.com
</mat-hint>
</mat-form-field>
<mat-form-field
appearance=
"fill"
>
<mat-label>
Icon Color
</mat-label>
<input
matInput
type=
"color"
[(
ngModel
)]="
currentConfig
.
color
"
name=
"color"
class=
"h-[40px]"
>
</mat-form-field>
</div>
...
...
src/app/portal-manage/services/widget-config-generator.service.ts
View file @
ddbcfa1f
...
...
@@ -45,12 +45,18 @@ export class WidgetConfigGeneratorService {
newConfig
.
yField
=
col2
;
break
;
case
'SimpleKpiWidgetComponent'
:
case
'GaugeChartWidgetComponent'
:
newConfig
.
title
=
widget
.
thName
;
newConfig
.
valueField
=
col1
;
break
;
case
'SimpleKpiWidgetComponent'
:
newConfig
.
title
=
widget
.
thName
;
newConfig
.
valueField
=
col1
;
newConfig
.
icon
=
'info-circle-fill'
;
newConfig
.
color
=
'#000000'
;
break
;
case
'SlicerWidgetComponent'
:
newConfig
.
title
=
widget
.
thName
;
newConfig
.
optionsField
=
col1
;
...
...
src/app/portal-manage/widgets/simple-kpi-widget/simple-kpi-widget.component.html
View file @
ddbcfa1f
...
...
@@ -23,23 +23,28 @@
<!-- Content -->
<div
*
ngIf=
"!isLoading && !hasError"
class=
"text-center"
>
<div
class=
"text-4xl sm:text-5xl md:text-6xl font-extrabold text-gray-900"
>
{{ value }}
<span
*
ngIf=
"unit"
class=
"text-xl sm:text-2xl font-medium text-gray-400 ml-1"
>
{{ unit }}
</span>
</div>
<div
*
ngIf=
"trendValue"
class=
"flex items-center justify-center text-sm sm:text-base mt-2"
>
<span
*
ngIf=
"trend === 'up'"
class=
"text-green-500 flex items-center font-semibold"
>
<i
class=
"bi bi-arrow-up-right mr-1"
></i>
{{ trendValue }}
</span>
<span
*
ngIf=
"trend === 'down'"
class=
"text-red-500 flex items-center font-semibold"
>
<i
class=
"bi bi-arrow-down-right mr-1"
></i>
{{ trendValue }}
</span>
<span
*
ngIf=
"trend === 'neutral' && trendValue"
class=
"text-gray-500 font-medium"
>
{{ trendValue }}
</span>
</div>
<div
class=
"flex justify-center items-center gap-4"
>
<i
*
ngIf=
"icon"
[
style
.
color
]="
color
"
[
class
]="'
bi
bi-
'
+
icon
+
'
text-5xl
sm:text-6xl
md:text-7xl
'"
></i>
<div>
<div
class=
"text-4xl sm:text-5xl md:text-6xl font-extrabold text-gray-900"
>
{{ value }}
<span
*
ngIf=
"unit"
class=
"text-xl sm:text-2xl font-medium text-gray-400 ml-1"
>
{{ unit }}
</span>
</div>
<div
*
ngIf=
"trendValue"
class=
"flex items-center justify-center text-sm sm:text-base mt-2"
>
<span
*
ngIf=
"trend === 'up'"
class=
"text-green-500 flex items-center font-semibold"
>
<i
class=
"bi bi-arrow-up-right mr-1"
></i>
{{ trendValue }}
</span>
<span
*
ngIf=
"trend === 'down'"
class=
"text-red-500 flex items-center font-semibold"
>
<i
class=
"bi bi-arrow-down-right mr-1"
></i>
{{ trendValue }}
</span>
<span
*
ngIf=
"trend === 'neutral' && trendValue"
class=
"text-gray-500 font-medium"
>
{{ trendValue }}
</span>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/portal-manage/widgets/simple-kpi-widget/simple-kpi-widget.component.ts
View file @
ddbcfa1f
...
...
@@ -16,6 +16,8 @@ export class SimpleKpiWidgetComponent extends BaseWidgetComponent {
public
unit
:
string
=
''
;
public
trend
:
'up'
|
'down'
|
'neutral'
=
'neutral'
;
public
trendValue
:
string
=
''
;
public
icon
:
string
=
''
;
public
color
:
string
=
'#000000'
;
constructor
(
protected
override
dashboardStateService
:
DashboardStateService
)
{
super
(
dashboardStateService
);
...
...
@@ -26,6 +28,8 @@ export class SimpleKpiWidgetComponent extends BaseWidgetComponent {
this
.
unit
=
this
.
config
.
unit
||
''
;
this
.
trend
=
this
.
config
.
trend
||
'neutral'
;
this
.
trendValue
=
this
.
config
.
trendValue
||
''
;
this
.
icon
=
this
.
config
.
icon
||
'info'
;
this
.
color
=
this
.
config
.
color
||
'#000000'
;
this
.
value
=
'-'
;
// Initial state before data loads
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment