Skip to content

Commit 56c1ca9

Browse files
Disable connectors in mock data and update status display in Connectors view
1 parent 87df229 commit 56c1ca9

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎frontend/src/data/mockData.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ export function activeSwitcherPeople(cands, n = 12) {
479479
// values here are placeholders for the proof of concept, secrets are never stored in
480480
// the front end (the real app keeps them server-side). status is illustrative.
481481
export const connectors = [
482-
{ id: 'slurm', name: 'SLURM', kind: 'Scheduler', role: 'source & destination', enabled: true, status: 'connected',
482+
{ id: 'slurm', name: 'SLURM', kind: 'Scheduler', role: 'source & destination', enabled: false, status: 'connected',
483483
fields: [
484484
{ key: 'restHost', label: 'slurmrestd host', type: 'text', value: 'slurm-ctld.cluster.internal' },
485485
{ key: 'restPort', label: 'Port', type: 'number', value: '6820' },
@@ -488,14 +488,14 @@ export const connectors = [
488488
{ key: 'token', label: 'JWT token', type: 'password', value: '', placeholder: 'set server-side' },
489489
{ key: 'poll', label: 'Poll interval', type: 'number', value: '30', suffix: 's' },
490490
] },
491-
{ id: 'notion', name: 'Notion', kind: 'Project register', role: 'source', enabled: true, status: 'connected',
491+
{ id: 'notion', name: 'Notion', kind: 'Project register', role: 'source', enabled: false, status: 'connected',
492492
fields: [
493493
{ key: 'token', label: 'Integration token', type: 'password', value: '', placeholder: 'secret_…' },
494494
{ key: 'projDb', label: 'Projects database ID', type: 'text', value: '', placeholder: '32-char id' },
495495
{ key: 'budgetDb', label: 'Budgets database ID', type: 'text', value: '' },
496496
{ key: 'sync', label: 'Sync', type: 'select', value: 'read-only', options: ['read-only', 'two-way'] },
497497
] },
498-
{ id: 'slack', name: 'Slack', kind: 'Notifications', role: 'destination', enabled: true, status: 'connected',
498+
{ id: 'slack', name: 'Slack', kind: 'Notifications', role: 'destination', enabled: false, status: 'connected',
499499
fields: [
500500
{ key: 'workspace', label: 'Workspace', type: 'text', value: 'your-org' },
501501
{ key: 'auth', label: 'Auth', type: 'select', value: 'Bot token', options: ['Bot token', 'Incoming webhook'] },
@@ -504,7 +504,7 @@ export const connectors = [
504504
{ key: 'route', label: 'Route by', type: 'select', value: 'per-team channel', options: ['single channel', 'per-team channel', 'direct message'] },
505505
{ key: 'events', label: 'Notify on', type: 'select', value: 'approvals + alerts', options: ['approvals only', 'approvals + alerts', 'everything'] },
506506
] },
507-
{ id: 'email', name: 'Email (SMTP)', kind: 'Notifications', role: 'destination', enabled: true, status: 'connected',
507+
{ id: 'email', name: 'Email (SMTP)', kind: 'Notifications', role: 'destination', enabled: false, status: 'connected',
508508
fields: [
509509
{ key: 'host', label: 'SMTP host', type: 'text', value: 'smtp.your-org.internal' },
510510
{ key: 'port', label: 'Port', type: 'number', value: '587' },

‎frontend/src/session.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const SessionContext = createContext(null)
1919

2020
export function SessionProvider({ children }) {
2121
// default to operations so a first-time POC visitor sees every view and control
22-
const [session, setSession] = useState(() => (opsPeople[0] ? actorFor('ops', opsPeople[0]) : ROLES.viewer))
22+
const [session, setSession] = useState(() => { const me = personById('p-stephen') || opsPeople[0]; return me ? actorFor('ops', me) : ROLES.viewer })
2323

2424
const can = (action, arg) => {
2525
const { role, teamId } = session

‎frontend/src/views/Connectors.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function Connectors() {
3232
<div className="card-title" style={{ display: 'flex', alignItems: 'center', gap: 10, flexWrap: 'wrap' }}>
3333
<span>{c.name}</span>
3434
<span className="th-unit">{c.kind} · {c.role}</span>
35-
<StatusPill status={c.enabled ? c.status : 'disabled'} />
35+
<StatusPill status={c.enabled ? c.status : 'disconnected'} />
3636
<label style={{ marginLeft: 'auto', display: 'inline-flex', alignItems: 'center', gap: 6, fontWeight: 400, fontSize: 13 }}>
3737
<input type="checkbox" checked={c.enabled} disabled={!editable} onChange={() => toggle(ci)} /> enabled
3838
</label>

0 commit comments

Comments
 (0)