larxius commited on
Commit
7bf7a57
·
verified ·
1 Parent(s): a9e187d

Update frontend/src/pages/OrganizationPage.jsx

Browse files
frontend/src/pages/OrganizationPage.jsx CHANGED
@@ -169,50 +169,46 @@ export const OrganizationPage = () => {
169
 
170
  return (
171
  <div className="w-full text-on-surface animate-fade-in pb-xl">
172
- <div className="flex flex-col md:flex-row md:items-center justify-between mb-xl gap-sm">
173
  <div>
174
- <h1 className="text-[28px] font-extrabold font-display tracking-tight brand-gradient flex items-center gap-2">
175
- <Globe className="w-8 h-8 text-primary" />
176
- LarShield Global Management
177
  </h1>
178
- <p className="text-on-surface-variant text-[14px] mt-1">Centralized oversight for all client organizations, scans, and security nodes.</p>
 
 
179
  </div>
180
- <div className="flex gap-sm flex-wrap">
181
- <button onClick={fetchData} className="flex items-center px-md py-sm bg-surface-container border border-outline-variant text-on-surface rounded-lg hover:bg-surface-container-high transition-colors font-bold text-[13.5px] cursor-pointer">
182
- <Activity className={`w-4 h-4 mr-2 text-primary ${loading ? 'animate-spin' : ''}`} /> Sync Metrics
183
  </button>
184
- <button onClick={() => navigate('/super-admin')} className="flex items-center px-md py-sm bg-surface-container border border-outline-variant text-on-surface rounded-lg hover:bg-surface-container-high transition-colors font-bold text-[13.5px] cursor-pointer">
185
- <Lock className="w-4 h-4 mr-2 text-primary" /> Manage Pricing
186
  </button>
187
- <button onClick={() => navigate('/organization')} className="flex items-center px-md py-sm bg-surface-container border border-outline-variant text-on-surface rounded-lg hover:bg-surface-container-high transition-colors font-bold text-[13.5px] cursor-pointer">
188
- <Activity className="w-4 h-4 mr-2 text-primary" /> Org Dashboard
189
  </button>
190
- <button onClick={() => navigate('/super-admin/logs')} className="flex items-center px-md py-sm bg-surface-container border border-outline-variant text-on-surface rounded-lg hover:bg-surface-container-high transition-colors font-bold text-[13.5px] cursor-pointer">
191
- <ShieldAlert className="w-4 h-4 mr-2 text-primary" /> Logs & Threats
192
- </button>
193
- <button onClick={() => navigate(-1)} className="flex items-center px-md py-sm bg-primary text-white rounded-lg hover:brightness-110 transition-all font-bold text-[13.5px] border-0 cursor-pointer shadow-md shadow-primary/20">
194
- <ArrowLeft className="w-4 h-4 mr-2" /> Back
195
  </button>
196
  </div>
197
  </div>
198
 
199
-
200
-
201
  {/* Top Metrics Grid */}
202
  <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-md mb-xl">
203
  {[
204
- { title: 'Security Score', value: `${score}/100`, icon: Shield, color: score > 80 ? 'text-green-500' : score > 50 ? 'text-orange-500' : 'text-error', bg: score > 80 ? 'bg-green-500/10' : score > 50 ? 'bg-orange-500/10' : 'bg-error/10', border: score > 80 ? 'border-green-500/20' : score > 50 ? 'border-orange-500/20' : 'border-error/20' },
205
- { title: 'Active Assets', value: activeAssets.toString(), icon: Globe, color: 'text-blue-500', bg: 'bg-blue-500/10', border: 'border-blue-500/20' },
206
- { title: 'Total Scans', value: filteredScans.length.toString(), icon: Activity, color: 'text-purple-500', bg: 'bg-purple-500/10', border: 'border-purple-500/20' },
207
- { title: 'Open Risks', value: totalVulnerabilities.toString(), icon: ShieldAlert, color: totalVulnerabilities > 0 ? 'text-orange-500' : 'text-green-500', bg: totalVulnerabilities > 0 ? 'bg-orange-500/10' : 'bg-green-500/10', border: totalVulnerabilities > 0 ? 'border-orange-500/20' : 'border-green-500/20' }
208
  ].map((metric, i) => (
209
- <div key={i} className="bg-surface-container-lowest border border-outline-variant p-md rounded-2xl shadow-sm hover:shadow-md transition-all group">
210
- <div className="flex justify-between items-start">
211
  <div>
212
- <p className="text-on-surface-variant font-bold text-[12px] uppercase tracking-wider mb-1">{metric.title}</p>
213
- <h3 className="text-[32px] font-extrabold tracking-tight text-on-surface">{metric.value}</h3>
214
  </div>
215
- <div className={`${metric.bg} ${metric.border} p-2.5 rounded-xl border group-hover:scale-110 transition-transform`}>
216
  <metric.icon className={`${metric.color} w-6 h-6`} />
217
  </div>
218
  </div>
 
169
 
170
  return (
171
  <div className="w-full text-on-surface animate-fade-in pb-xl">
172
+ <div className="flex flex-col md:flex-row md:items-center justify-between mb-xl gap-sm border-b border-outline-variant/60 pb-md">
173
  <div>
174
+ <h1 className="font-extrabold text-on-surface tracking-tight text-[24px] m-0 flex items-center gap-1.5">
175
+ Support Engineer <span className="text-primary">Operations</span>
 
176
  </h1>
177
+ <p className="font-body-md text-on-surface-variant text-[13.5px] mt-1 m-0">
178
+ Client environment inspection, troubleshooting assistance, and system logs.
179
+ </p>
180
  </div>
181
+ <div className="flex gap-sm flex-wrap items-center">
182
+ <button onClick={fetchData} className="flex items-center px-3.5 py-1.5 bg-surface-container border border-outline-variant text-on-surface rounded-lg hover:bg-surface-container-high transition-colors font-bold text-[12.5px] cursor-pointer shadow-2xs">
183
+ <Activity className={`w-3.5 h-3.5 mr-1.5 text-primary ${loading ? 'animate-spin' : ''}`} /> Sync Metrics
184
  </button>
185
+ <button onClick={() => navigate('/support')} className="flex items-center px-3.5 py-1.5 bg-surface-container border border-outline-variant text-on-surface rounded-lg hover:bg-surface-container-high transition-colors font-bold text-[12.5px] cursor-pointer shadow-2xs">
186
+ <Activity className="w-3.5 h-3.5 mr-1.5 text-primary" /> Global Management
187
  </button>
188
+ <button onClick={() => navigate('/super-admin/logs')} className="flex items-center px-3.5 py-1.5 bg-surface-container border border-outline-variant text-on-surface rounded-lg hover:bg-surface-container-high transition-colors font-bold text-[12.5px] cursor-pointer shadow-2xs">
189
+ <ShieldAlert className="w-3.5 h-3.5 mr-1.5 text-primary" /> Logs & Threats
190
  </button>
191
+ <button onClick={() => navigate(-1)} className="flex items-center px-4 py-1.5 bg-primary text-white rounded-lg hover:brightness-110 transition-all font-bold text-[13px] border-0 cursor-pointer shadow-sm">
192
+ <ArrowLeft className="w-3.5 h-3.5 mr-1" /> Back
 
 
 
193
  </button>
194
  </div>
195
  </div>
196
 
 
 
197
  {/* Top Metrics Grid */}
198
  <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-md mb-xl">
199
  {[
200
+ { title: 'SECURITY SCORE', value: `${score}/100`, icon: Shield, color: score > 80 ? 'text-green-500' : score > 50 ? 'text-orange-500' : 'text-error', bg: score > 80 ? 'bg-green-500/10 border-green-500/20' : score > 50 ? 'bg-orange-500/10 border-orange-500/20' : 'bg-error/10 border-error/20' },
201
+ { title: 'ACTIVE ASSETS', value: activeAssets.toString(), icon: Globe, color: 'text-blue-500', bg: 'bg-blue-500/10 border-blue-500/20' },
202
+ { title: 'TOTAL SCANS', value: filteredScans.length.toString(), icon: Activity, color: 'text-purple-500', bg: 'bg-purple-500/10 border-purple-500/20' },
203
+ { title: 'OPEN RISKS', value: totalVulnerabilities.toString(), icon: ShieldAlert, color: totalVulnerabilities > 0 ? 'text-orange-500' : 'text-green-500', bg: totalVulnerabilities > 0 ? 'bg-orange-500/10 border-orange-500/20' : 'bg-green-500/10 border-green-500/20' }
204
  ].map((metric, i) => (
205
+ <div key={i} className="bg-surface-container-lowest border border-outline-variant p-lg rounded-2xl shadow-2xs hover:shadow-md transition-all group">
206
+ <div className="flex justify-between items-center">
207
  <div>
208
+ <p className="text-on-surface-variant font-bold text-[12px] uppercase tracking-wider mb-1.5">{metric.title}</p>
209
+ <h3 className="text-[30px] font-extrabold tracking-tight text-on-surface leading-none">{metric.value}</h3>
210
  </div>
211
+ <div className={`${metric.bg} p-3 rounded-xl border group-hover:scale-110 transition-transform flex items-center justify-center`}>
212
  <metric.icon className={`${metric.color} w-6 h-6`} />
213
  </div>
214
  </div>