Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4884bea

Browse files
authored
Updates
1 parentf9edf10 commit4884bea

File tree

6 files changed

+186
-438
lines changed

6 files changed

+186
-438
lines changed

‎.github/workflows/stale-issue.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ on:
33
schedule:
44
-cron:'30 1 * * *'
55

6+
permissions:
7+
contents:write
8+
issues:write
9+
pull-requests:write
10+
611
jobs:
712
stale:
813
runs-on:ubuntu-latest

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ Changes are organized by date, with the most recent changes listed first.
1515
-**Removed Loading Delay**: Eliminated hardcoded 1.5s loading screen delay for faster perceived performance
1616
-**Skeleton Loaders**: Added animated skeleton placeholders across all dashboard pages while data loads
1717

18+
###🎨 USER EXPERIENCE IMPROVEMENTS
19+
20+
-**Empty States with Actions**: Added contextual empty state displays across dashboard pages with success/warning/info/error color variants
21+
-**Removed Unused CSS Files**: Cleaned up legacy style.css and custom.css stylesheets no longer used by the modern dashboard
22+
1823
##2025-11-03
1924

2025
###🔧 CONFIGURATION IMPROVEMENTS

‎config/var/www/admin/control-panel/custom.css‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎config/var/www/admin/control-panel/dashboard.css‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ body {
7676
0% {
7777
background-position:-1000px0;
7878
}
79+
7980
100% {
8081
background-position:1000px0;
8182
}
@@ -1174,3 +1175,62 @@ button:focus, select:focus, input:focus {
11741175
font-size:1.5rem;
11751176
}
11761177
}
1178+
1179+
/* Empty States */
1180+
.empty-state {
1181+
display: flex;
1182+
flex-direction: column;
1183+
align-items: center;
1184+
justify-content: center;
1185+
padding:60px20px;
1186+
text-align: center;
1187+
background:var(--card-bg);
1188+
border-radius:var(--border-radius);
1189+
border:1px solidvar(--border-color);
1190+
}
1191+
1192+
.empty-state-icon {
1193+
font-size:4rem;
1194+
margin-bottom:20px;
1195+
opacity:0.6;
1196+
margin-top:10px;
1197+
}
1198+
1199+
.empty-state-title {
1200+
font-size:1.5rem;
1201+
font-weight:600;
1202+
margin-bottom:10px;
1203+
color:var(--text-primary);
1204+
}
1205+
1206+
.empty-state-message {
1207+
font-size:1rem;
1208+
color:var(--text-secondary);
1209+
margin-bottom:20px;
1210+
max-width:400px;
1211+
}
1212+
1213+
.empty-state-action {
1214+
margin-top:20px;
1215+
}
1216+
1217+
.empty-state-action .btn {
1218+
min-width:150px;
1219+
}
1220+
1221+
/* Empty State Variants */
1222+
.empty-state.success .empty-state-icon {
1223+
color:var(--success-color);
1224+
}
1225+
1226+
.empty-state.warning .empty-state-icon {
1227+
color:var(--warning-color);
1228+
}
1229+
1230+
.empty-state.info .empty-state-icon {
1231+
color:var(--info-color);
1232+
}
1233+
1234+
.empty-state.error .empty-state-icon {
1235+
color:var(--error-color);
1236+
}

‎config/var/www/admin/control-panel/dashboard.js‎

Lines changed: 116 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -381,40 +381,29 @@ class EngineScriptDashboard {
381381
constactivities=awaitthis.getApiData("/api/activity/recent",[]);
382382
constactivityList=document.getElementById("recent-activity");
383383

384-
if(activityList&&Array.isArray(activities)&&activities.length>0){
385-
// Clear existing content
386-
activityList.innerHTML="";
387-
388-
// Validate and render each activity safely
389-
activities.forEach((activity)=>{
390-
if(this.isValidActivity(activity)){
391-
constactivityElement=this.createActivityElement(activity);
392-
activityList.appendChild(activityElement);
393-
}
394-
});
384+
if(activityList){
385+
if(Array.isArray(activities)&&activities.length>0){
386+
// Clear existing content
387+
activityList.innerHTML="";
388+
389+
// Validate and render each activity safely
390+
activities.forEach((activity)=>{
391+
if(this.isValidActivity(activity)){
392+
constactivityElement=this.createActivityElement(activity);
393+
activityList.appendChild(activityElement);
394+
}
395+
});
396+
}else{
397+
// Show empty state
398+
this.showEmptyActivity();
399+
}
395400
}
396401
}catch(error){
397402
console.error('Failed to load recent activity:',error);
398-
// Show fallback message
399-
constactivityList=document.getElementById("recent-activity");
400-
if(activityList){
401-
activityList.innerHTML="";
402-
constfallbackDiv=document.createElement("div");
403-
fallbackDiv.className="activity-item";
404-
405-
constcontentDiv=document.createElement("div");
406-
contentDiv.className="activity-content";
407-
408-
constmessage=document.createElement("p");
409-
message.textContent="Unable to load recent activity";
410-
411-
contentDiv.appendChild(message);
412-
fallbackDiv.appendChild(contentDiv);
413-
activityList.appendChild(fallbackDiv);
414-
}
403+
this.showEmptyActivity();
415404
}
416405
}
417-
406+
418407
asyncloadSystemAlerts(){
419408
try{
420409
constalerts=awaitthis.getApiData("/api/alerts",[]);
@@ -432,28 +421,13 @@ class EngineScriptDashboard {
432421
}
433422
});
434423
}else{
435-
// Create default "all systems operational" alert
436-
constdefaultAlert=this.createAlertElement({
437-
message:"All systems operational",
438-
time:"Just now",
439-
type:"info",
440-
});
441-
alertList.appendChild(defaultAlert);
424+
// Show empty state for all systems operational
425+
this.showEmptyAlerts();
442426
}
443427
}
444428
}catch(error){
445429
console.error('Failed to load system alerts:',error);
446-
// Show fallback alert
447-
constalertList=document.getElementById("system-alerts");
448-
if(alertList){
449-
alertList.innerHTML='';
450-
consterrorAlert=this.createAlertElement({
451-
message:"Unable to load system alerts",
452-
time:"Just now",
453-
type:"error",
454-
});
455-
alertList.appendChild(errorAlert);
456-
}
430+
this.showEmptyAlerts();
457431
}
458432
}
459433

@@ -562,23 +536,7 @@ class EngineScriptDashboard {
562536

563537
}catch(error){
564538
console.error('Failed to load system information:',error);
565-
// Show fallback system info
566-
constsystemInfo=document.getElementById("system-info");
567-
if(systemInfo){
568-
systemInfo.innerHTML="";
569-
consterrorDiv=document.createElement("div");
570-
errorDiv.className="info-item";
571-
572-
constlabel=document.createElement("strong");
573-
label.textContent="Error:";
574-
575-
constvalue=document.createElement("span");
576-
value.textContent="Unable to load system information";
577-
578-
errorDiv.appendChild(label);
579-
errorDiv.appendChild(value);
580-
systemInfo.appendChild(errorDiv);
581-
}
539+
this.showErrorSystemInfo();
582540
}
583541
}
584542

@@ -1115,6 +1073,93 @@ class EngineScriptDashboard {
11151073
systemInfo.innerHTML=html;
11161074
}
11171075
}
1076+
1077+
// Empty state helpers
1078+
createEmptyState(type,icon,title,message,actionText=null,actionCallback=null){
1079+
constemptyState=document.createElement('div');
1080+
emptyState.className=`empty-state${type}`;
1081+
1082+
lethtml=`
1083+
<i class="fas fa-${icon} empty-state-icon"></i>
1084+
<h3 class="empty-state-title">${this.sanitizeInput(title)}</h3>
1085+
<p class="empty-state-message">${this.sanitizeInput(message)}</p>
1086+
`;
1087+
1088+
if(actionText&&actionCallback){
1089+
html+=`
1090+
<div class="empty-state-action">
1091+
<button class="btn btn-primary" data-action="empty-state-action">${this.sanitizeInput(actionText)}</button>
1092+
</div>
1093+
`;
1094+
}
1095+
1096+
emptyState.innerHTML=html;
1097+
1098+
if(actionText&&actionCallback){
1099+
constbtn=emptyState.querySelector('[data-action="empty-state-action"]');
1100+
btn.addEventListener('click',actionCallback);
1101+
}
1102+
1103+
returnemptyState;
1104+
}
1105+
1106+
showEmptyActivity(){
1107+
constactivityList=document.getElementById("recent-activity");
1108+
if(activityList){
1109+
constemptyState=this.createEmptyState(
1110+
'info',
1111+
'history',
1112+
'No Recent Activity',
1113+
'Activity will appear here as the system runs'
1114+
);
1115+
activityList.innerHTML='';
1116+
activityList.appendChild(emptyState);
1117+
}
1118+
}
1119+
1120+
showEmptyAlerts(){
1121+
constalertList=document.getElementById("system-alerts");
1122+
if(alertList){
1123+
constemptyState=this.createEmptyState(
1124+
'success',
1125+
'check-circle',
1126+
'All Systems Operational',
1127+
'No alerts at this time'
1128+
);
1129+
alertList.innerHTML='';
1130+
alertList.appendChild(emptyState);
1131+
}
1132+
}
1133+
1134+
showEmptyUptimeMonitors(){
1135+
constuptimeContainer=document.getElementById("uptime-summary");
1136+
if(uptimeContainer){
1137+
constemptyState=this.createEmptyState(
1138+
'warning',
1139+
'radar',
1140+
'Uptime Monitoring Not Configured',
1141+
'Set up Uptime Robot monitoring to track site availability'
1142+
);
1143+
uptimeContainer.innerHTML='';
1144+
uptimeContainer.appendChild(emptyState);
1145+
}
1146+
}
1147+
1148+
showErrorSystemInfo(){
1149+
constsystemInfo=document.getElementById("system-info");
1150+
if(systemInfo){
1151+
constemptyState=this.createEmptyState(
1152+
'error',
1153+
'exclamation-circle',
1154+
'Unable to Load System Information',
1155+
'There was an error retrieving system data',
1156+
'Retry',
1157+
()=>this.loadSystemInfo()
1158+
);
1159+
systemInfo.innerHTML='';
1160+
systemInfo.appendChild(emptyState);
1161+
}
1162+
}
11181163

11191164
isValidActivity(activity){
11201165
return(
@@ -1363,14 +1408,13 @@ class EngineScriptDashboard {
13631408

13641409
if(monitors.length===0){
13651410
monitorsContainer.innerHTML="";
1366-
conststatusDiv=document.createElement("div");
1367-
statusDiv.className="uptime-status";
1368-
1369-
constmessage=document.createElement("p");
1370-
message.textContent="No monitors configured. Add websites to monitor in your Uptime Robot dashboard.";
1371-
1372-
statusDiv.appendChild(message);
1373-
monitorsContainer.appendChild(statusDiv);
1411+
constemptyState=this.createEmptyState(
1412+
'warning',
1413+
'clock',
1414+
'No Monitors Configured',
1415+
'Add websites to monitor in your Uptime Robot dashboard'
1416+
);
1417+
monitorsContainer.appendChild(emptyState);
13741418
return;
13751419
}
13761420

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp