Subh775 commited on
Commit
8cb6af1
·
1 Parent(s): 846f0f7

new section for quick help added..

Browse files
Files changed (2) hide show
  1. frontend/js/vehicles.js +14 -2
  2. frontend/vehicles.html +136 -2
frontend/js/vehicles.js CHANGED
@@ -78,7 +78,7 @@
78
 
79
  // =========== Tab switching ===========
80
  function switchTab(tab) {
81
- ['about', 'overview', 'run-details', 'reports', 'settings', 'feedback'].forEach(t => {
82
  const el = document.getElementById('tab-' + t);
83
  const nav = document.getElementById('nav-' + t);
84
  if (el) el.classList.toggle('hidden', tab !== t);
@@ -106,7 +106,7 @@
106
  }
107
 
108
  // =========== Keyboard Shortcuts ===========
109
- const TAB_KEYS = { '1': 'about', '2': 'overview', '3': 'run-details', '4': 'reports', '5': 'settings', '6': 'feedback' };
110
  document.addEventListener('keydown', function(e) {
111
  if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA' || e.target.tagName === 'SELECT') return;
112
  if (TAB_KEYS[e.key]) { switchTab(TAB_KEYS[e.key]); return; }
@@ -1093,5 +1093,17 @@
1093
  }
1094
  }
1095
 
 
 
 
 
 
 
 
 
 
 
 
 
1096
  init();
1097
 
 
78
 
79
  // =========== Tab switching ===========
80
  function switchTab(tab) {
81
+ ['about', 'overview', 'run-details', 'reports', 'settings', 'help', 'feedback'].forEach(t => {
82
  const el = document.getElementById('tab-' + t);
83
  const nav = document.getElementById('nav-' + t);
84
  if (el) el.classList.toggle('hidden', tab !== t);
 
106
  }
107
 
108
  // =========== Keyboard Shortcuts ===========
109
+ const TAB_KEYS = { '1': 'about', '2': 'overview', '3': 'run-details', '4': 'reports', '5': 'settings', '6': 'help', '7': 'feedback' };
110
  document.addEventListener('keydown', function(e) {
111
  if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA' || e.target.tagName === 'SELECT') return;
112
  if (TAB_KEYS[e.key]) { switchTab(TAB_KEYS[e.key]); return; }
 
1093
  }
1094
  }
1095
 
1096
+ function toggleHelp(id) {
1097
+ const ans = document.getElementById(id + '-ans');
1098
+ const icon = document.getElementById(id + '-icon');
1099
+ if (ans.classList.contains('hidden')) {
1100
+ ans.classList.remove('hidden');
1101
+ icon.classList.replace('fa-plus', 'fa-minus');
1102
+ } else {
1103
+ ans.classList.add('hidden');
1104
+ icon.classList.replace('fa-minus', 'fa-plus');
1105
+ }
1106
+ }
1107
+
1108
  init();
1109
 
frontend/vehicles.html CHANGED
@@ -44,6 +44,10 @@
44
  class="flex items-center px-4 py-2.5 rounded-lg transition cursor-pointer nav-item-inactive">
45
  <i class="fa-solid fa-sliders w-6"></i> <span class="font-medium">Settings</span>
46
  </a>
 
 
 
 
47
  <a onclick="switchTab('feedback')" id="nav-feedback"
48
  class="flex items-center px-4 py-2.5 rounded-lg transition cursor-pointer nav-item-inactive">
49
  <i class="fa-solid fa-comment-dots w-6"></i> <span class="font-medium">Feedback</span>
@@ -72,6 +76,7 @@
72
  <button onclick="switchTab('run-details')" class="text-[9px] px-2 py-1 rounded" style="color:#a89f97"><i class="fa-solid fa-microchip"></i></button>
73
  <button onclick="switchTab('reports')" class="text-[9px] px-2 py-1 rounded" style="color:#a89f97"><i class="fa-solid fa-file-lines"></i></button>
74
  <button onclick="switchTab('settings')" class="text-[9px] px-2 py-1 rounded" style="color:#a89f97"><i class="fa-solid fa-sliders"></i></button>
 
75
  <button onclick="switchTab('feedback')" class="text-[9px] px-2 py-1 rounded" style="color:#a89f97"><i class="fa-solid fa-comment-dots"></i></button>
76
  </div>
77
  </div>
@@ -695,7 +700,132 @@
695
  </div>
696
  </div>
697
 
698
- <!-- TAB: Feedback -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
699
  <div id="tab-feedback" class="hidden flex-1 min-h-0 overflow-y-auto">
700
  <!-- Full Header Area -->
701
  <div class="max-w-6xl mx-auto space-y-6">
@@ -941,9 +1071,13 @@
941
  <kbd style="background:#1a1a1a;color:#c89a6c;font-size:11px;font-weight:700;padding:3px 10px;border-radius:6px;border:1px solid #2a2a2a;font-family:'JetBrains Mono',monospace">5</kbd>
942
  </div>
943
  <div style="display:flex;justify-content:space-between;align-items:center;padding:6px 0;border-bottom:1px solid #1a1a1a">
944
- <span style="color:#a89f97;font-size:11px;font-weight:500">Feedback</span>
945
  <kbd style="background:#1a1a1a;color:#c89a6c;font-size:11px;font-weight:700;padding:3px 10px;border-radius:6px;border:1px solid #2a2a2a;font-family:'JetBrains Mono',monospace">6</kbd>
946
  </div>
 
 
 
 
947
  <div style="display:flex;justify-content:space-between;align-items:center;padding:6px 0">
948
  <span style="color:#a89f97;font-size:11px;font-weight:500">Download Artifacts</span>
949
  <kbd style="background:#1a1a1a;color:#c89a6c;font-size:11px;font-weight:700;padding:3px 10px;border-radius:6px;border:1px solid #2a2a2a;font-family:'JetBrains Mono',monospace">D</kbd>
 
44
  class="flex items-center px-4 py-2.5 rounded-lg transition cursor-pointer nav-item-inactive">
45
  <i class="fa-solid fa-sliders w-6"></i> <span class="font-medium">Settings</span>
46
  </a>
47
+ <a onclick="switchTab('help')" id="nav-help"
48
+ class="flex items-center px-4 py-2.5 rounded-lg transition cursor-pointer nav-item-inactive">
49
+ <i class="fa-solid fa-circle-question w-6"></i> <span class="font-medium">Quick Help</span>
50
+ </a>
51
  <a onclick="switchTab('feedback')" id="nav-feedback"
52
  class="flex items-center px-4 py-2.5 rounded-lg transition cursor-pointer nav-item-inactive">
53
  <i class="fa-solid fa-comment-dots w-6"></i> <span class="font-medium">Feedback</span>
 
76
  <button onclick="switchTab('run-details')" class="text-[9px] px-2 py-1 rounded" style="color:#a89f97"><i class="fa-solid fa-microchip"></i></button>
77
  <button onclick="switchTab('reports')" class="text-[9px] px-2 py-1 rounded" style="color:#a89f97"><i class="fa-solid fa-file-lines"></i></button>
78
  <button onclick="switchTab('settings')" class="text-[9px] px-2 py-1 rounded" style="color:#a89f97"><i class="fa-solid fa-sliders"></i></button>
79
+ <button onclick="switchTab('help')" class="text-[9px] px-2 py-1 rounded" style="color:#a89f97"><i class="fa-solid fa-circle-question"></i></button>
80
  <button onclick="switchTab('feedback')" class="text-[9px] px-2 py-1 rounded" style="color:#a89f97"><i class="fa-solid fa-comment-dots"></i></button>
81
  </div>
82
  </div>
 
700
  </div>
701
  </div>
702
 
703
+ <!-- TAB: Quick Help -->
704
+ <div id="tab-help" class="hidden flex-1 min-h-0 overflow-y-auto">
705
+ <div class="max-w-4xl mx-auto space-y-6">
706
+ <div class="bg-black border border-slate-800 rounded-xl overflow-hidden shadow-sm">
707
+ <div class="px-6 py-4 border-b border-slate-800 bg-[#050505]">
708
+ <h3 class="font-bold text-white text-sm flex items-center">Knowledge Center</h3>
709
+ <p class="text-[10px] text-slate-400 mt-0.1 uppercase tracking-widest font-medium">Quick assistance and platform documentation</p>
710
+ </div>
711
+
712
+ <div class="p-6 space-y-8">
713
+ <!-- Category: Technical -->
714
+ <section>
715
+ <h4 class="text-[11px] font-bold uppercase tracking-[0.2em] mb-4 pb-2 border-b border-slate-900" style="color:#c89a6c">Technical & Performance</h4>
716
+ <div class="space-y-3">
717
+ <div class="bg-[#050505] border border-slate-900 rounded-lg overflow-hidden">
718
+ <button onclick="toggleHelp('h1')" class="w-full px-5 py-4 text-left flex items-center justify-between hover:bg-[#080808] transition">
719
+ <span class="text-xs font-semibold text-slate-300">Why is no live feed analysis available instead of video exports?</span>
720
+ <i id="h1-icon" class="fa-solid fa-plus text-[10px] text-slate-600"></i>
721
+ </button>
722
+ <div id="h1-ans" class="hidden px-5 pb-5 text-[11px] text-slate-500 leading-relaxed">
723
+ UrbanFlow Demo is currently hosted on standard CPU instances to demonstrate accessibility. Real-time live analysis is exceptionally resource-intensive on CPUs, which can lead to processing instability. By utilizing asynchronous processing (Export Annotated Video), we optimize for low-hardware environments, significantly reducing unnecessary energy consumption and contributing to lower carbon emissions.
724
+ </div>
725
+ </div>
726
+ <div class="bg-[#050505] border border-slate-900 rounded-lg overflow-hidden">
727
+ <button onclick="toggleHelp('h2')" class="w-full px-5 py-4 text-left flex items-center justify-between hover:bg-[#080808] transition">
728
+ <span class="text-xs font-semibold text-slate-300">Why is auto-download not functioning correctly?</span>
729
+ <i id="h2-icon" class="fa-solid fa-plus text-[10px] text-slate-600"></i>
730
+ </button>
731
+ <div id="h2-ans" class="hidden px-5 pb-5 text-[11px] text-slate-500 leading-relaxed">
732
+ Auto-download failures are typically caused by browser popup blockers. Please ensure you have allowed popups for this site in your browser settings. Alternatively, you can use the keyboard shortcut 'D' to trigger a bundled ZIP report download once processing reaches 100%.
733
+ </div>
734
+ </div>
735
+ <div class="bg-[#050505] border border-slate-900 rounded-lg overflow-hidden">
736
+ <button onclick="toggleHelp('h3')" class="w-full px-5 py-4 text-left flex items-center justify-between hover:bg-[#080808] transition">
737
+ <span class="text-xs font-semibold text-slate-300">Once processing completes, how can I analyze another video?</span>
738
+ <i id="h3-icon" class="fa-solid fa-plus text-[10px] text-slate-600"></i>
739
+ </button>
740
+ <div id="h3-ans" class="hidden px-5 pb-5 text-[11px] text-slate-500 leading-relaxed">
741
+ To analyze a new dataset, navigate to the 'Settings' tab and select the 'Analyze Another Video' button. This will reset your current session state and return you to the upload interface without requiring a full browser refresh.
742
+ </div>
743
+ </div>
744
+ <div class="bg-[#050505] border border-slate-900 rounded-lg overflow-hidden">
745
+ <button onclick="toggleHelp('h4')" class="w-full px-5 py-4 text-left flex items-center justify-between hover:bg-[#080808] transition">
746
+ <span class="text-xs font-semibold text-slate-300">How accurate are UrbanFlow's traffic calculations?</span>
747
+ <i id="h4-icon" class="fa-solid fa-plus text-[10px] text-slate-600"></i>
748
+ </button>
749
+ <div id="h4-ans" class="hidden px-5 pb-5 text-[11px] text-slate-500 leading-relaxed">
750
+ In the field of computer vision, no model achieves 100% accuracy under all conditions. UrbanFlow provides highly reliable analytical overviews, but variables such as severe occlusion, extreme lighting, or complex mis-classifications can occur. Our development goal is constant iteration toward human-level perception.
751
+ </div>
752
+ </div>
753
+ <div class="bg-[#050505] border border-slate-900 rounded-lg overflow-hidden">
754
+ <button onclick="toggleHelp('h5')" class="w-full px-5 py-4 text-left flex items-center justify-between hover:bg-[#080808] transition">
755
+ <span class="text-xs font-semibold text-slate-300">What is PCU analysis and which speed metrics are calculated?</span>
756
+ <i id="h5-icon" class="fa-solid fa-plus text-[10px] text-slate-600"></i>
757
+ </button>
758
+ <div id="h5-ans" class="hidden px-5 pb-5 text-[11px] text-slate-500 leading-relaxed">
759
+ Passenger Car Unit (PCU) is a standard metric used in transportation engineering to convert heterogeneous traffic (bikes, trucks, cars) into a common denominator for capacity analysis. Speed profile metrics provide insights into velocity distribution, helping identify congestion bottlenecks and overall throughput efficiency.
760
+ </div>
761
+ </div>
762
+ </div>
763
+ </section>
764
+
765
+ <!-- Category: About -->
766
+ <section>
767
+ <h4 class="text-[11px] font-bold uppercase tracking-[0.2em] mb-4 pb-2 border-b border-slate-900" style="color:#c89a6c">About UrbanFlow</h4>
768
+ <div class="space-y-3">
769
+ <div class="bg-[#050505] border border-slate-900 rounded-lg overflow-hidden">
770
+ <button onclick="toggleHelp('h6')" class="w-full px-5 py-4 text-left flex items-center justify-between hover:bg-[#080808] transition">
771
+ <span class="text-xs font-semibold text-slate-300">Is UrbanFlow an independent workspace or a collaborative project?</span>
772
+ <i id="h6-icon" class="fa-solid fa-plus text-[10px] text-slate-600"></i>
773
+ </button>
774
+ <div id="h6-ans" class="hidden px-5 pb-5 text-[11px] text-slate-500 leading-relaxed">
775
+ UrbanFlow is an emerging, independent technology initiative currently in its development phase. We are continuously scaling our internal infrastructure and exploring future strategic collaborations with global leaders such as Google, AWS, and Lambda to ensure compliance with international regulations and standards.
776
+ </div>
777
+ </div>
778
+ <div class="bg-[#050505] border border-slate-900 rounded-lg overflow-hidden">
779
+ <button onclick="toggleHelp('h7')" class="w-full px-5 py-4 text-left flex items-center justify-between hover:bg-[#080808] transition">
780
+ <span class="text-xs font-semibold text-slate-300">Why is this demo focused on a single model?</span>
781
+ <i id="h7-icon" class="fa-solid fa-plus text-[10px] text-slate-600"></i>
782
+ </button>
783
+ <div id="h7-ans" class="hidden px-5 pb-5 text-[11px] text-slate-500 leading-relaxed">
784
+ This platform serves as a focused demonstration of a specific computer vision model for requirements gathering. The full production suite integrates multiple specialized models, real-time edge processing, and advanced telemetry designed for complex enterprise-grade deployments.
785
+ </div>
786
+ </div>
787
+ <div class="bg-[#050505] border border-slate-900 rounded-lg overflow-hidden">
788
+ <button onclick="toggleHelp('h8')" class="w-full px-5 py-4 text-left flex items-center justify-between hover:bg-[#080808] transition">
789
+ <span class="text-xs font-semibold text-slate-300">How can UrbanFlow assist my business operations?</span>
790
+ <i id="h8-icon" class="fa-solid fa-plus text-[10px] text-slate-600"></i>
791
+ </button>
792
+ <div id="h8-ans" class="hidden px-5 pb-5 text-[11px] text-slate-500 leading-relaxed">
793
+ UrbanFlow transforms passive visual data into actionable business intelligence. By quantifying traffic patterns and demand, businesses can optimize site selection, manage logistics more effectively, and improve general customer accessibility through data-driven planning.
794
+ </div>
795
+ </div>
796
+ <div class="bg-[#050505] border border-slate-900 rounded-lg overflow-hidden">
797
+ <button onclick="toggleHelp('h9')" class="w-full px-5 py-4 text-left flex items-center justify-between hover:bg-[#080808] transition">
798
+ <span class="text-xs font-semibold text-slate-300">Where can I learn more or verify the platform's reliability?</span>
799
+ <i id="h9-icon" class="fa-solid fa-plus text-[10px] text-slate-600"></i>
800
+ </button>
801
+ <div id="h9-ans" class="hidden px-5 pb-5 text-[11px] text-slate-500 leading-relaxed">
802
+ UrbanFlow is built on a foundation of transparency. While currently in the demonstration phase, we are establishing trust through rigorous internal testing and by providing clear documentation on our data privacy and operational standards.
803
+ </div>
804
+ </div>
805
+ <div class="bg-[#050505] border border-slate-900 rounded-lg overflow-hidden">
806
+ <button onclick="toggleHelp('h10')" class="w-full px-5 py-4 text-left flex items-center justify-between hover:bg-[#080808] transition">
807
+ <span class="text-xs font-semibold text-slate-300">Is UrbanFlow a Non-profit organization?</span>
808
+ <i id="h10-icon" class="fa-solid fa-plus text-[10px] text-slate-600"></i>
809
+ </button>
810
+ <div id="h10-ans" class="hidden px-5 pb-5 text-[11px] text-slate-500 leading-relaxed">
811
+ UrbanFlow is a commercial technology initiative focused on sustainable urban development and providing scalable traffic intelligence solutions globally.
812
+ </div>
813
+ </div>
814
+ <div class="bg-[#050505] border border-slate-900 rounded-lg overflow-hidden">
815
+ <button onclick="toggleHelp('h11')" class="w-full px-5 py-4 text-left flex items-center justify-between hover:bg-[#080808] transition">
816
+ <span class="text-xs font-semibold text-slate-300">What will UrbanFlow provide in the future?</span>
817
+ <i id="h11-icon" class="fa-solid fa-plus text-[10px] text-slate-600"></i>
818
+ </button>
819
+ <div id="h11-ans" class="hidden px-5 pb-5 text-[11px] text-slate-500 leading-relaxed">
820
+ Our roadmap includes multi-model fusion, real-time edge processing, advanced ANPR integration, and deeper predictive analytics to support smarter city infrastructure.
821
+ </div>
822
+ </div>
823
+ </div>
824
+ </section>
825
+ </div>
826
+ </div>
827
+ </div>
828
+ </div>
829
  <div id="tab-feedback" class="hidden flex-1 min-h-0 overflow-y-auto">
830
  <!-- Full Header Area -->
831
  <div class="max-w-6xl mx-auto space-y-6">
 
1071
  <kbd style="background:#1a1a1a;color:#c89a6c;font-size:11px;font-weight:700;padding:3px 10px;border-radius:6px;border:1px solid #2a2a2a;font-family:'JetBrains Mono',monospace">5</kbd>
1072
  </div>
1073
  <div style="display:flex;justify-content:space-between;align-items:center;padding:6px 0;border-bottom:1px solid #1a1a1a">
1074
+ <span style="color:#a89f97;font-size:11px;font-weight:500">Quick Help</span>
1075
  <kbd style="background:#1a1a1a;color:#c89a6c;font-size:11px;font-weight:700;padding:3px 10px;border-radius:6px;border:1px solid #2a2a2a;font-family:'JetBrains Mono',monospace">6</kbd>
1076
  </div>
1077
+ <div style="display:flex;justify-content:space-between;align-items:center;padding:6px 0;border-bottom:1px solid #1a1a1a">
1078
+ <span style="color:#a89f97;font-size:11px;font-weight:500">Feedback</span>
1079
+ <kbd style="background:#1a1a1a;color:#c89a6c;font-size:11px;font-weight:700;padding:3px 10px;border-radius:6px;border:1px solid #2a2a2a;font-family:'JetBrains Mono',monospace">7</kbd>
1080
+ </div>
1081
  <div style="display:flex;justify-content:space-between;align-items:center;padding:6px 0">
1082
  <span style="color:#a89f97;font-size:11px;font-weight:500">Download Artifacts</span>
1083
  <kbd style="background:#1a1a1a;color:#c89a6c;font-size:11px;font-weight:700;padding:3px 10px;border-radius:6px;border:1px solid #2a2a2a;font-family:'JetBrains Mono',monospace">D</kbd>