Add flow purpose categories and deployment demo
This commit is contained in:
@@ -14,6 +14,7 @@ The initial landscape contains Website, API, ERP, CRM and Email Platform plus tw
|
||||
- **Place order:** Website → API → ERP, followed by parallel CRM and Email Platform updates.
|
||||
- **Register customer:** Website → API → CRM → Email Platform.
|
||||
- **Monday demo journeys:** Contact enquiry, Sample request, Commercial order, and Order retry and recovery.
|
||||
- **Deployment demo:** Build Server → Octopus release → Sitecore CM and two CD targets, with parallel target outcomes.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -26,6 +27,9 @@ The initial landscape contains Website, API, ERP, CRM and Email Platform plus tw
|
||||
- Model physical operations alongside software with Physical Location and Business Operation categories, plus Physical Goods and Human Task relationships. The Warehouse preset includes receiving, storage, picking, dispatch and returns with clearly labelled physical-goods ports and fictional shipment payloads.
|
||||
- Run the mixed Physical goods receipt demo: SAP purchase order → Supplier shipment → Warehouse → Warehouse Operative decision → Warehouse Management System → SAP confirmation. Physical locations remain independent from their software systems; all transfers are simulated and inspectable.
|
||||
- Model persistent database integrations separately from activity: Direct Database Access, Scheduled Import, Replication / Sync and File Transfer. Configure access mode, trigger/frequency, source tables/views/queries, destination, authoritative source and an optional simulated mapping. Live query requests and returned database rows are separate connections; scheduled imports identify downstream copies such as Sitecore items.
|
||||
- Separate flow purpose from cable relationship, payload type and integration mechanism. Scenarios have editable purposes for Business Transactions, Content & Reference Data, Build & Deployment, Operations & Monitoring, Identity & Access and Physical Logistics; individual transfers can override the scenario purpose and connections can carry multiple purposes without duplicating cables.
|
||||
- Filter flow purposes independently from system categories, colour active packets by purpose and use the accessible purpose legend. Deployment cables retain their relationship styling while the packet colour communicates Build & Deployment.
|
||||
- The deployment demo carries fictional package, release, version, environment and target fields through a sequential package/release step and a parallel CM/CD target step. Each target has an independent simulated outcome; no build or deployment system is contacted.
|
||||
- Compare the example Sitecore live-query and scheduled-import scenarios for the fictional Product / Literature / Webinar Management application and MSSQL database. Database payloads are sample rows/JSON only; no database connection or inventory/accounting engine is implemented.
|
||||
- Place reusable Website, CRM, ERP, Email Platform, Analytics and API presets, selecting only the capabilities needed for each instance.
|
||||
- Browse the layered preset library from the Presets tab: searchable system/product catalog entries, shared capabilities, deployment layouts and starter kits. Entries include tags, version metadata and official documentation sources; favourites are stored locally.
|
||||
@@ -46,4 +50,4 @@ npm run build
|
||||
|
||||
## Limitations
|
||||
|
||||
This is intentionally a local simulation prototype. It has no authentication, collaboration, server persistence, external API calls, real payload delivery, or production-grade graph editing. Custom definitions and placed instances are stored in browser local storage; playback state is transient and is not included in saved JSON. LiteGraph supplies canvas rendering and cable interaction; scenario semantics are managed by the Vue application. The minimap is diagnostic rather than a full viewport navigator, and transformation highlighting currently compares top-level JSON fields. Pipeline mappings are deliberately limited to the listed rule operations; arbitrary JavaScript, network lookups and live middleware execution are not supported. The custom builder exposes pipeline definitions as validated JSON so advanced step graphs can be edited without adding another runtime dependency. Preset documentation URLs are reference metadata only; the simulator does not inspect or synchronize vendor products.
|
||||
This is intentionally a local simulation prototype. It has no authentication, collaboration, server persistence, external API calls, real payload delivery, or production-grade graph editing. Custom definitions and placed instances are stored in browser local storage; playback state is transient and is not included in saved JSON. LiteGraph supplies canvas rendering and cable interaction; scenario semantics are managed by the Vue application. The minimap is diagnostic rather than a full viewport navigator, and transformation highlighting currently compares top-level JSON fields. Pipeline mappings are deliberately limited to the listed rule operations; arbitrary JavaScript, network lookups and live middleware execution are not supported. The custom builder exposes pipeline definitions as validated JSON so advanced step graphs can be edited without adding another runtime dependency. Flow categories are simulation metadata and do not enforce model behaviour; a packet can be displayed on one selected category at a time even when a connection supports multiple categories. Preset documentation URLs are reference metadata only; the simulator does not inspect or synchronize vendor products.
|
||||
|
||||
+23
-10
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
|
||||
import { LGraph, LGraphCanvas, LiteGraph } from 'litegraph.js'
|
||||
import { CAPABILITY_PRESETS, CATALOG_SYSTEM_PRESETS, DEPLOYMENT_TEMPLATES, STARTER_KITS, cloneCapabilities, demoLandscape, executePipeline, SYSTEM_PRESETS, systemFromPreset, type CapabilityModel, type ComponentRole, type ConnectionModel, type DefinitionActionModel, type DeploymentTemplate, type EndpointModel, type EndpointResponseModel, type EnvironmentContainerModel, type EnvironmentModel, type InfrastructureComponent, type LandscapeModel, type PipelineTrace, type ScenarioModel, type ScenarioStep, type SystemDefinition, type SystemModel, type SystemPreset, uid, validateLandscape } from './model'
|
||||
import { CAPABILITY_PRESETS, CATALOG_SYSTEM_PRESETS, DEPLOYMENT_TEMPLATES, FLOW_CATEGORIES, STARTER_KITS, cloneCapabilities, demoLandscape, executePipeline, SYSTEM_PRESETS, systemFromPreset, type CapabilityModel, type ComponentRole, type ConnectionModel, type DefinitionActionModel, type DeploymentTemplate, type EndpointModel, type EndpointResponseModel, type EnvironmentContainerModel, type EnvironmentModel, type FlowCategory, type InfrastructureComponent, type LandscapeModel, type PipelineTrace, type ScenarioModel, type ScenarioStep, type SystemDefinition, type SystemModel, type SystemPreset, uid, validateLandscape } from './model'
|
||||
|
||||
const STORAGE_KEY = 'dumas-system-landscape-v1'
|
||||
const PRESET_STORAGE_KEY = 'dumas-system-presets-v1'
|
||||
@@ -26,6 +26,7 @@ const minimapEl = ref<HTMLCanvasElement | null>(null)
|
||||
const searchQuery = ref('')
|
||||
const categoryFilter = ref('all')
|
||||
const dataTypeFilter = ref('all')
|
||||
const flowCategoryFilter = ref<FlowCategory | 'all'>('all')
|
||||
const tagFilter = ref('all')
|
||||
const connectionTypeFilter = ref('all')
|
||||
const placingPreset = ref<SystemPreset | null>(null)
|
||||
@@ -43,7 +44,7 @@ const presetLayer = ref<'all' | 'system' | 'capability' | 'template' | 'kit'>('a
|
||||
const favouritePresetIds = ref<string[]>(loadFavouritePresets())
|
||||
type TransferKind = 'received' | 'sent' | 'stored'
|
||||
interface TransferChange { key: string; status: 'added' | 'removed' | 'changed' | 'same'; incoming?: unknown; outgoing?: unknown }
|
||||
interface TransferRecord { id: string; kind: TransferKind; scenarioName: string; stepNumber: number; stepExplanation: string; senderId: string; destinationId: string; payload: string; incoming: string; outgoing: string; changes: TransferChange[]; timestamp: string }
|
||||
interface TransferRecord { id: string; kind: TransferKind; scenarioName: string; stepNumber: number; stepExplanation: string; senderId: string; destinationId: string; payload: string; incoming: string; outgoing: string; changes: TransferChange[]; timestamp: string; outcome?: 'success' | 'rejected' | 'timeout'; flowCategory?: FlowCategory; payloadType?: string }
|
||||
const transferHistory = ref<TransferRecord[]>([])
|
||||
const pipelineTrace = ref<PipelineTrace[]>([])
|
||||
const dataTab = ref<TransferKind>('received')
|
||||
@@ -63,6 +64,12 @@ const selectedConnection = computed(() => landscape.value.connections.find((item
|
||||
const selectedScenario = computed(() => landscape.value.scenarios.find((item) => item.id === selectedScenarioId.value))
|
||||
const currentStep = computed(() => selectedScenario.value?.steps[stepIndex.value])
|
||||
const currentConnections = computed(() => { const ids = runtimeConnectionIds.value.length ? runtimeConnectionIds.value : currentStep.value?.connectionIds || []; return ids.map((id) => landscape.value.connections.find((item) => item.id === id)).filter(Boolean) as ConnectionModel[] })
|
||||
function flowCategoryMeta(id: FlowCategory) { return FLOW_CATEGORIES.find((item) => item.id === id) || FLOW_CATEGORIES[0] }
|
||||
function categoriesForConnection(connection: ConnectionModel, scenario = selectedScenario.value): FlowCategory[] {
|
||||
if (currentStep.value?.flowCategories?.length && currentStep.value.connectionIds.includes(connection.id)) return currentStep.value.flowCategories
|
||||
return scenario?.flowCategoryOverrides?.[connection.id] || connection.flowCategories || (scenario?.flowCategory ? [scenario.flowCategory] : ['business-transactions'])
|
||||
}
|
||||
function setStepFlowCategory(step: ScenarioStep, value: string) { step.flowCategories = [value as FlowCategory]; persist() }
|
||||
const isRunning = computed(() => playing.value || stepIndex.value >= 0)
|
||||
const libraryPresets = computed(() => [...SYSTEM_PRESETS, ...customPresets.value.filter((preset) => !SYSTEM_PRESETS.some((item) => item.id === preset.id))])
|
||||
const filteredLibraryPresets = computed(() => { const query = presetQuery.value.trim().toLowerCase(); return libraryPresets.value.filter((preset) => { const haystack = `${preset.name} ${preset.description} ${(preset.tags || []).join(' ')}`.toLowerCase(); return !query || haystack.includes(query) }) })
|
||||
@@ -153,8 +160,10 @@ function advanceStep() {
|
||||
runtimePayload.value = ''
|
||||
if (step.humanDecision) { pendingDecision.value = structuredClone(step.humanDecision); playing.value = false; eventLog.value.unshift(`${new Date().toLocaleTimeString()} · Waiting for ${systemName(step.humanDecision.roleSystemId)} decision`); drawPackets(); return }
|
||||
recordTransfers(step)
|
||||
failureState.value = step.outcome && step.outcome !== 'success' ? step.outcome : 'none'
|
||||
if (failureState.value !== 'none') eventLog.value.unshift(`${new Date().toLocaleTimeString()} · ${step.outcome === 'timeout' ? 'TIMEOUT' : 'REJECTED'} · ${step.explanation}`)
|
||||
const failedTransfer = Object.values(step.transferOutcomes || {}).find((outcome) => outcome !== 'success')
|
||||
failureState.value = failedTransfer || (step.outcome && step.outcome !== 'success' ? step.outcome : 'none')
|
||||
if (failedTransfer) eventLog.value.unshift(`${new Date().toLocaleTimeString()} · ${failedTransfer === 'timeout' ? 'TIMEOUT' : 'REJECTED'} · One deployment target reported an independent outcome`)
|
||||
if (failureState.value !== 'none' && !failedTransfer) eventLog.value.unshift(`${new Date().toLocaleTimeString()} · ${step.outcome === 'timeout' ? 'TIMEOUT' : 'REJECTED'} · ${step.explanation}`)
|
||||
eventLog.value.unshift(`${new Date().toLocaleTimeString()} · ${step.explanation}`)
|
||||
animatePacket(step.delayMs / speed.value)
|
||||
}
|
||||
@@ -172,8 +181,10 @@ function recordTransfers(step: ScenarioModel['steps'][number], selectedConnectio
|
||||
const outgoing = pipelineRun ? (pipelineRun.ok ? pipelineRun.payload : connection.payload || pipelineRun.payload) : selectedPayload || connection.transformation?.outgoing || incoming
|
||||
const changes = comparePayloads(incoming, outgoing)
|
||||
const payload = outgoing
|
||||
const flowCategory = categoriesForConnection(connection)[0]
|
||||
const outcome = step.transferOutcomes?.[connectionId] || step.outcome || 'success'
|
||||
transferHistory.value.push(
|
||||
...(['sent', 'received', 'stored'] as TransferKind[]).map((kind) => ({ id: uid('transfer'), kind, scenarioName: selectedScenario.value!.name, stepNumber: stepIndex.value + 1, stepExplanation: step.explanation, senderId: connection.sourceId, destinationId: connection.targetId, payload, incoming, outgoing, changes, timestamp: now }))
|
||||
...(['sent', 'received', 'stored'] as TransferKind[]).map((kind) => ({ id: uid('transfer'), kind, scenarioName: selectedScenario.value!.name, stepNumber: stepIndex.value + 1, stepExplanation: step.explanation, senderId: connection.sourceId, destinationId: connection.targetId, payload, incoming, outgoing, changes, timestamp: now, outcome, flowCategory, payloadType: connection.payloadType || connection.dataType }))
|
||||
)
|
||||
if (connection.exchangeType === 'request-response') transferHistory.value.push(...(['sent', 'received'] as TransferKind[]).map((kind) => ({ id: uid('transfer'), kind, scenarioName: selectedScenario.value!.name, stepNumber: stepIndex.value + 1, stepExplanation: `${step.explanation} · Response ${connection.responseStatus || 200}`, senderId: connection.targetId, destinationId: connection.sourceId, payload: connection.responsePayload || '{}', incoming: payload, outgoing: connection.responsePayload || '{}', changes: comparePayloads(payload, connection.responsePayload || '{}'), timestamp: now })))
|
||||
}
|
||||
@@ -185,8 +196,8 @@ function enableTransformation() { if (selectedConnection.value && !selectedConne
|
||||
function recordsForSelectedSystem(kind: TransferKind) { if (!selectedSystem.value) return []; return transferHistory.value.filter((record) => kind === 'sent' ? record.senderId === selectedSystem.value?.id : record.destinationId === selectedSystem.value?.id) }
|
||||
function systemName(id: string) { return landscape.value.systems.find((system) => system.id === id)?.name || id }
|
||||
const latestSelectedRecord = computed(() => selectedSystem.value ? transferHistory.value.filter((record) => record.destinationId === selectedSystem.value?.id).slice(-1)[0] : undefined)
|
||||
const matchesSystem = (system: SystemModel) => { const query = searchQuery.value.trim().toLowerCase(); const queryMatch = !query || `${system.name} ${system.description}`.toLowerCase().includes(query); const categoryMatch = categoryFilter.value === 'all' || system.category === categoryFilter.value; const dataMatch = dataTypeFilter.value === 'all' || landscape.value.connections.some((connection) => connection.dataType === dataTypeFilter.value && (connection.sourceId === system.id || connection.targetId === system.id)); const tagMatch = tagFilter.value === 'all' || (system.tags || []).includes(tagFilter.value); return queryMatch && categoryMatch && dataMatch && tagMatch }
|
||||
function connectionVisible(connection: ConnectionModel) { return connectionTypeFilter.value === 'all' || (connection.connectionType || 'data-flow') === connectionTypeFilter.value }
|
||||
const matchesSystem = (system: SystemModel) => { const query = searchQuery.value.trim().toLowerCase(); const queryMatch = !query || `${system.name} ${system.description}`.toLowerCase().includes(query); const categoryMatch = categoryFilter.value === 'all' || system.category === categoryFilter.value; const dataMatch = dataTypeFilter.value === 'all' || landscape.value.connections.some((connection) => connection.dataType === dataTypeFilter.value && (connection.sourceId === system.id || connection.targetId === system.id)); const flowMatch = flowCategoryFilter.value === 'all' || landscape.value.connections.some((connection) => (connection.sourceId === system.id || connection.targetId === system.id) && categoriesForConnection(connection).includes(flowCategoryFilter.value)); const tagMatch = tagFilter.value === 'all' || (system.tags || []).includes(tagFilter.value); return queryMatch && categoryMatch && dataMatch && flowMatch && tagMatch }
|
||||
function connectionVisible(connection: ConnectionModel) { const typeMatch = connectionTypeFilter.value === 'all' || (connection.connectionType || 'data-flow') === connectionTypeFilter.value; const categoryMatch = flowCategoryFilter.value === 'all' || categoriesForConnection(connection).includes(flowCategoryFilter.value); return typeMatch && categoryMatch }
|
||||
function isSystemDimmed(system: SystemModel) { if (!matchesSystem(system)) return true; if (!playing.value || !currentConnections.value.length) return false; return !currentConnections.value.some((connection) => connection.sourceId === system.id || connection.targetId === system.id) }
|
||||
function animatePacket(duration: number) {
|
||||
stopAnimation(); const started = performance.now()
|
||||
@@ -248,7 +259,7 @@ function drawPackets() {
|
||||
if (!from || !to) continue
|
||||
const x = from.pos[0] + from.size[0] + (to.pos[0] - from.pos[0] - from.size[0]) * packetProgress.value
|
||||
const y = from.pos[1] + 50 + (to.pos[1] + 50 - from.pos[1] - 50) * packetProgress.value
|
||||
const packetColor = failureState.value === 'none' ? '#f8c15c' : '#ef627d'; ctx.save(); ctx.fillStyle = packetColor; ctx.shadowColor = packetColor; ctx.shadowBlur = 18; ctx.beginPath(); ctx.arc(x, y, failureState.value === 'none' ? 7 : 9, 0, Math.PI * 2); ctx.fill(); ctx.restore()
|
||||
const packetColor = failureState.value === 'none' ? flowCategoryMeta(categoriesForConnection(connection)[0]).color : '#ef627d'; ctx.save(); ctx.fillStyle = packetColor; ctx.shadowColor = packetColor; ctx.shadowBlur = 18; ctx.beginPath(); ctx.arc(x, y, failureState.value === 'none' ? 7 : 9, 0, Math.PI * 2); ctx.fill(); ctx.restore()
|
||||
}
|
||||
}
|
||||
function fitToScreen() { if (!graphCanvas || !canvasEl.value || !landscape.value.systems.length) return; const xs = landscape.value.systems.map((system) => system.position[0]); const ys = landscape.value.systems.map((system) => system.position[1]); const minX = Math.min(...xs); const minY = Math.min(...ys); const maxX = Math.max(...xs) + 220; const maxY = Math.max(...ys) + 130; graphCanvas.ds.scale = Math.min(.95, Math.max(.45, Math.min((canvasEl.value.width - 80) / (maxX - minX), (canvasEl.value.height - 80) / (maxY - minY)))); graphCanvas.ds.offset = [40 - minX * graphCanvas.ds.scale, 40 - minY * graphCanvas.ds.scale]; graphCanvas.draw(true, true); drawMinimap() }
|
||||
@@ -262,6 +273,7 @@ function importJson(event: Event) {
|
||||
}
|
||||
watch(landscape, persist, { deep: true })
|
||||
watch([searchQuery, categoryFilter, dataTypeFilter, playing, currentStep], () => { graphCanvas?.draw(true, true); drawMinimap() })
|
||||
watch(flowCategoryFilter, () => rebuildGraph())
|
||||
onMounted(() => { if (!canvasEl.value) return; graphCanvas = new LGraphCanvas(canvasEl.value, graph); graphCanvas.background_image = null; graphCanvas.render_shadows = false; graphCanvas.ds.scale = 0.85; graphCanvas.onDrawForeground = drawPackets; rebuildGraph(); drawMinimap() })
|
||||
onUnmounted(stopAnimation)
|
||||
</script>
|
||||
@@ -282,7 +294,7 @@ onUnmounted(stopAnimation)
|
||||
<aside class="inspector panel">
|
||||
<div v-if="selectedSystem" class="inspector-content"><div class="inspector-header"><div><span class="eyebrow">SYSTEM</span><h2>{{ selectedSystem.name }}</h2></div><button class="danger-icon" @click="deleteSystem(selectedSystem.id)">×</button></div><label>Name<input v-model="selectedSystem.name" @change="rebuildGraph" /></label><label>Category<select v-model="selectedSystem.category"><option value="application">Application</option><option value="service">Service</option><option value="data">Data</option><option value="human">Human</option><option value="external">External</option></select></label><label>Colour<input v-model="selectedSystem.color" type="color" /></label><label>Description<textarea v-model="selectedSystem.description" rows="4"></textarea></label><button class="primary full" @click="persist">Save system</button><button class="ghost full" @click="saveSelectedAsPreset">Save as my preset</button><div class="capability-list"><div class="steps-head"><span>Capabilities</span></div><article v-for="capability in selectedSystem.capabilities" :key="capability.id" class="capability-card" :title="capability.description"><strong>{{ capability.name }}</strong><small>{{ capability.description }}</small><div class="port-line"><span>Inputs</span>{{ capability.inputs.map((item) => item.name).join(' · ') || 'None' }}</div><div class="port-line"><span>Outputs</span>{{ capability.outputs.map((item) => item.name).join(' · ') || 'None' }}</div><details><summary>Actions & sample payload</summary><div v-for="action in capability.actions" :key="action.id" class="action-row" :title="action.description"><b>{{ action.name }}</b><small>{{ action.description }}</small><textarea v-model="action.payload" rows="2" class="code"></textarea></div><label>Default capability payload<textarea v-model="capability.payload" rows="2" class="code"></textarea></label></details></article></div></div>
|
||||
<div v-else-if="selectedConnection" class="inspector-content"><div class="inspector-header"><div><span class="eyebrow">CONNECTION</span><h2>{{ selectedConnection.label }}</h2></div><button class="danger-icon" @click="deleteConnection(selectedConnection.id)">×</button></div><label>Label<input v-model="selectedConnection.label" /></label><label>From<select v-model="selectedConnection.sourceId" @change="rebuildGraph"><option v-for="system in landscape.systems" :key="system.id" :value="system.id">{{ system.name }}</option></select></label><label>To<select v-model="selectedConnection.targetId" @change="rebuildGraph"><option v-for="system in landscape.systems" :key="system.id" :value="system.id">{{ system.name }}</option></select></label><label>Description<textarea v-model="selectedConnection.description" rows="3"></textarea></label><label>Exchange type<select v-model="selectedConnection.exchangeType"><option value="event-transfer">Onward event / transfer</option><option value="request-response">Direct request / response</option></select></label><label>Example request payload<textarea v-model="selectedConnection.payload" rows="4" class="code"></textarea></label><div v-if="selectedConnection.exchangeType === 'request-response'" class="response-box"><b>Simulated response</b><label>Status<input v-model.number="selectedConnection.responseStatus" type="number" /></label><label>Response payload<textarea v-model="selectedConnection.responsePayload" rows="4" class="code"></textarea></label></div><p class="compatibility-note">{{ connectionCompatibility(selectedConnection) }}</p></div>
|
||||
<div v-else-if="selectedScenario" class="inspector-content scenario-inspector"><div class="inspector-header"><div><span class="eyebrow">SCENARIO</span><h2>{{ selectedScenario.name }}</h2></div><button class="primary run-button" @click="startScenario()">▶ Run</button></div><label>Name<input v-model="selectedScenario.name" /></label><label>Description<textarea v-model="selectedScenario.description" rows="3"></textarea></label><div class="steps-head"><span>Steps</span><button class="icon-button" @click="addStep">+</button></div><div v-for="(step, index) in selectedScenario.steps" :key="step.id" class="step-editor"><div class="step-number">{{ String(index + 1).padStart(2, '0') }}</div><div class="step-fields"><select v-model="step.connectionIds" multiple><option v-for="connection in landscape.connections" :key="connection.id" :value="connection.id">{{ connection.label }}</option></select><input v-model="step.explanation" placeholder="What happens?" /><textarea v-model="step.payload" rows="2" class="code" placeholder="Payload"></textarea><button class="text-danger" @click="deleteStep(index)">Remove step</button></div></div></div>
|
||||
<div v-else-if="selectedScenario" class="inspector-content scenario-inspector"><div class="inspector-header"><div><span class="eyebrow">SCENARIO</span><h2>{{ selectedScenario.name }}</h2></div><button class="primary run-button" @click="startScenario()">▶ Run</button></div><label>Name<input v-model="selectedScenario.name" /></label><label>Description<textarea v-model="selectedScenario.description" rows="3"></textarea></label><label>Flow purpose<select v-model="selectedScenario.flowCategory"><option v-for="category in FLOW_CATEGORIES" :key="category.id" :value="category.id">{{ category.icon }} {{ category.name }}</option></select></label><div class="steps-head"><span>Steps</span><button class="icon-button" @click="addStep">+</button></div><div v-for="(step, index) in selectedScenario.steps" :key="step.id" class="step-editor"><div class="step-number">{{ String(index + 1).padStart(2, '0') }}</div><div class="step-fields"><select v-model="step.connectionIds" multiple><option v-for="connection in landscape.connections" :key="connection.id" :value="connection.id">{{ connection.label }}</option></select><input v-model="step.explanation" placeholder="What happens?" /><select :value="step.flowCategories?.[0] || selectedScenario.flowCategory || 'business-transactions'" @change="setStepFlowCategory(step, ($event.target as HTMLSelectElement).value)"><option v-for="category in FLOW_CATEGORIES" :key="category.id" :value="category.id">Transfer: {{ category.name }}</option></select><textarea v-model="step.payload" rows="2" class="code" placeholder="Payload"></textarea><button class="text-danger" @click="deleteStep(index)">Remove step</button></div></div></div>
|
||||
<div v-else class="empty-inspector"><div class="empty-icon">⌘</div><h2>Select an item</h2><p>Choose a system, connection, or scenario to inspect and edit its details.</p></div>
|
||||
<div v-if="selectedSystem" class="inspector-content data-inspector"><div class="data-tabs"><button v-for="tab in (['received','sent','stored'] as TransferKind[])" :key="tab" :class="{active: dataTab === tab}" @click="dataTab = tab">{{ tab }}</button></div><div v-if="!recordsForSelectedSystem(dataTab).length" class="muted">No simulated data yet. Run a scenario to populate this history.</div><article v-for="record in recordsForSelectedSystem(dataTab).slice().reverse()" :key="record.id" class="transfer-card"><div class="transfer-meta"><b>Step {{ record.stepNumber }} · {{ record.timestamp }}</b><span>{{ record.scenarioName }}</span></div><div class="transfer-route">{{ systemName(record.senderId) }} → {{ systemName(record.destinationId) }}</div><p>{{ record.stepExplanation }}</p><pre>{{ record.payload }}</pre></article></div>
|
||||
</aside>
|
||||
@@ -295,7 +307,7 @@ onUnmounted(stopAnimation)
|
||||
<section v-if="selectedScenario" class="failure-config panel"><div><span class="eyebrow">STEP OUTCOMES</span><strong>Failure and recovery routing</strong><p class="muted">Choose how a simulated step behaves. Retry is limited to one automatic attempt per reset.</p></div><div v-for="(step, index) in selectedScenario.steps" :key="step.id" class="failure-row"><b>{{ index + 1 }}. {{ step.explanation }}</b><select v-model="step.outcome"><option value="success">Success</option><option value="rejected">Reject data</option><option value="timeout">Time out</option></select><select v-model="step.retryStepId"><option value="">No retry</option><option v-for="candidate in selectedScenario.steps" :key="candidate.id" :value="candidate.id" :disabled="candidate.id === step.id">Retry step {{ selectedScenario.steps.indexOf(candidate) + 1 }}</option></select><select v-model="step.recoveryStepId"><option value="">No recovery step</option><option v-for="candidate in selectedScenario.steps" :key="candidate.id" :value="candidate.id" :disabled="candidate.id === step.id">Recover at step {{ selectedScenario.steps.indexOf(candidate) + 1 }}</option></select></div></section>
|
||||
<section v-if="selectedConnection" class="connection-properties panel"><span class="eyebrow">CONNECTION PROPERTIES</span><div class="property-grid"><label>Protocol<select v-model="selectedConnection.protocol"><option>HTTPS</option><option>HTTP</option><option>GraphQL</option><option>SMTP</option><option>Webhook</option><option>Message queue</option></select></label><label>Data type<select v-model="selectedConnection.dataType"><option>JSON</option><option>Form data</option><option>CSV</option><option>Event</option><option>Binary</option></select></label><label>Delivery<select v-model="selectedConnection.deliveryMethod"><option value="immediate">Immediate</option><option value="scheduled">Scheduled</option><option value="manual">Manual</option></select></label><label class="checkbox-label"><input v-model="selectedConnection.showCableLabel" type="checkbox" /> Show cable label</label></div></section>
|
||||
<section v-if="selectedConnection" class="connection-routing panel"><span class="eyebrow">ENDPOINT ROUTING</span><div class="property-grid"><label>Source endpoint<select v-model="selectedConnection.sourceEndpointId"><option value="">System output / unspecified</option><option v-for="endpoint in (landscape.systems.find((item) => item.id === selectedConnection?.sourceId)?.definition?.endpoints || [])" :key="endpoint.id" :value="endpoint.id">{{ endpoint.name }}</option></select></label><label>Destination input port<select v-model="selectedConnection.targetPortId"><option value="">System input / unspecified</option><option v-for="port in (landscape.systems.find((item) => item.id === selectedConnection?.targetId)?.capabilities.flatMap((capability) => capability.inputs) || [])" :key="port.id" :value="port.id">{{ port.name }}</option></select></label></div><p class="compatibility-note">{{ connectionCompatibility(selectedConnection) }}</p></section>
|
||||
<section class="navigation-panel panel"><div class="nav-fields"><label>Search systems<input v-model="searchQuery" placeholder="Name or description" /></label><label>Category<select v-model="categoryFilter"><option value="all">All categories</option><option value="application">Application</option><option value="service">Service</option><option value="data">Data</option><option value="external">External</option></select></label><label>Data type<select v-model="dataTypeFilter"><option value="all">All data types</option><option>JSON</option><option>Form data</option><option>CSV</option><option>Event</option><option>Binary</option></select></label><button class="ghost" @click="fitToScreen">Fit to screen</button></div><div class="minimap-wrap"><span class="eyebrow">MINIMAP</span><canvas ref="minimapEl" width="220" height="120"></canvas></div></section>
|
||||
<section class="navigation-panel panel"><div class="nav-fields"><label>Search systems<input v-model="searchQuery" placeholder="Name or description" /></label><label>Category<select v-model="categoryFilter"><option value="all">All categories</option><option value="application">Application</option><option value="service">Service</option><option value="data">Data</option><option value="external">External</option></select></label><label>Data type<select v-model="dataTypeFilter"><option value="all">All data types</option><option>JSON</option><option>Form data</option><option>CSV</option><option>Event</option><option>Binary</option></select></label><label>Flow purpose<select v-model="flowCategoryFilter"><option value="all">All purposes</option><option v-for="category in FLOW_CATEGORIES" :key="category.id" :value="category.id">{{ category.icon }} {{ category.name }}</option></select></label><button class="ghost" @click="fitToScreen">Fit to screen</button></div><div class="minimap-wrap"><span class="eyebrow">MINIMAP</span><canvas ref="minimapEl" width="220" height="120"></canvas></div></section>
|
||||
<section v-if="selectedScenario" class="scenario-builder panel"><div><span class="eyebrow">EASY SCENARIO BUILDER</span><strong>Start with an action, then build the journey</strong><p class="muted">Connections remain reusable destinations; parallel branches share one step.</p></div><label>Starting system<select v-model="selectedScenario.startSystemId"><option v-for="system in landscape.systems" :key="system.id" :value="system.id">{{ system.name }}</option></select></label><label>Starting action<select v-model="selectedScenario.startActionId"><option value="">Choose an action</option><option v-for="action in actionsForSystem(selectedScenario.startSystemId)" :key="action.id" :value="action.id">{{ action.capabilityName }} · {{ action.name }}</option></select></label><div class="builder-actions"><button class="ghost" @click="addJourneyStep">+ Sequential step</button><button class="ghost" @click="addParallelBranch">+ Parallel branch</button></div><div class="builder-steps"><article v-for="(step, index) in selectedScenario.steps" :key="step.id"><b>{{ index + 1 }}</b><span>{{ step.explanation }}</span><input v-model="step.payload" class="code" title="Editable sample payload" /></article></div></section>
|
||||
<section class="demo-guide panel"><span class="eyebrow">MONDAY DEMO / START HERE</span><strong>Try a journey in three clicks</strong><ol><li>Open <b>Scenarios</b> and choose Contact enquiry, Sample request or Commercial order.</li><li>Press <b>▶</b> in the journey list, then use pause, next or speed controls.</li><li>Try <b>Order retry and recovery</b> to see a rejection, automatic retry and recovery message. Select a system to inspect its data history.</li></ol></section>
|
||||
<section v-if="pendingDecision" class="decision-panel panel"><div><span class="eyebrow">HUMAN DECISION REQUIRED</span><strong>{{ systemName(pendingDecision.roleSystemId) }}</strong><p>{{ pendingDecision.task }}</p></div><div class="decision-data"><div><b>Information received</b><pre>{{ pendingDecision.receivedData }}</pre></div><div><b>Editable fields</b><label v-for="(_, key) in pendingDecision.editableFields" :key="key">{{ key }}<input v-model="pendingDecision.editableFields[key]" /></label></div></div><div class="decision-actions"><button v-for="action in pendingDecision.actions" :key="action.id" class="decision-button" :class="action.name.toLowerCase()" :title="action.description" @click="chooseHumanAction(action)"><b>{{ action.name }}</b><small>{{ action.description }}</small></button></div></section>
|
||||
@@ -309,5 +321,6 @@ onUnmounted(stopAnimation)
|
||||
<section v-if="customBuilderOpen" class="pipeline-builder-overlay"><div class="pipeline-builder panel"><div class="inspector-header"><div><span class="eyebrow">ACTION PIPELINES</span><h2>Middleware mapping editor</h2><p class="muted">Optional restricted pipelines are saved inside each action definition. No arbitrary JavaScript is executed.</p></div><button class="danger-icon" @click="customBuilderOpen = false">×</button></div><article v-for="action in customDraft.definition.actions" :key="action.id" class="definition-card"><div class="steps-head"><span>{{ action.name }}</span><button v-if="!action.pipeline" class="ghost" @click="attachPipeline(action)">Add pipeline</button></div><p v-if="!action.pipeline" class="muted">Add Receive, Validate, Transform, Route and Send stages to this action.</p><div v-else><label>Pipeline name<input v-model="action.pipeline.name" /></label><label>Pipeline JSON<textarea :value="JSON.stringify(action.pipeline, null, 2)" @change="updatePipeline(action, $event)" rows="14" class="code"></textarea></label><small class="muted">Mapping ops: copy, rename, fixed, default, type-conversion, object-construction and array-item-mapping. Use <code>$ref:key</code> in a fixed value for a reference lookup.</small></div></article><div class="modal-actions"><button class="ghost" @click="customBuilderOpen = false">Continue editing</button><button class="primary" @click="saveCustomBuilder">Save reusable preset</button></div></div></section>
|
||||
<section v-if="activeTab === 'presets'" class="catalog-panel panel"><div class="section-heading"><div><span class="eyebrow">LAYERED PRESET LIBRARY</span><strong>Search → choose → review → insert</strong><small>Versioned fictional definitions with official documentation sources.</small></div><button class="ghost" @click="openCustomBuilder">Custom preset</button></div><div class="catalog-controls"><input v-model="presetQuery" placeholder="Search products, capabilities or tags" /><select v-model="presetLayer"><option value="all">All layers</option><option value="system">Systems</option><option value="capability">Capabilities</option><option value="template">Deployments</option><option value="kit">Starter kits</option></select></div><div v-if="presetLayer === 'all' || presetLayer === 'system'" class="catalog-section"><div class="steps-head"><span>Systems</span><small>{{ filteredLibraryPresets.length }} results · favourites are local</small></div><div class="catalog-grid"><article v-for="preset in filteredLibraryPresets" :key="preset.id" class="catalog-card"><div class="catalog-title"><span class="system-dot" :style="{background: preset.color}"></span><strong>{{ preset.name }}</strong><button class="favourite" @click="togglePresetFavourite(preset.id)">{{ favouritePresetIds.includes(preset.id) ? '★' : '☆' }}</button></div><p>{{ preset.description }}</p><div class="catalog-tags"><span v-for="tag in (preset.tags || []).slice(0, 4)" :key="tag">{{ tag }}</span></div><small>{{ preset.capabilities.length }} shared capabilities · v{{ preset.version || 1 }}</small><div class="catalog-actions"><button class="run-mini" @click="openPreset(preset)">Review & place</button><a v-if="preset.sources?.[0]" :href="preset.sources[0].url" target="_blank" rel="noreferrer">Official docs ↗</a></div></article></div></div><div v-if="presetLayer === 'all' || presetLayer === 'capability'" class="catalog-section"><div class="steps-head"><span>Shared capabilities</span><small>{{ filteredCapabilityPresets.length }} reusable definitions</small></div><div class="catalog-grid compact"><article v-for="preset in filteredCapabilityPresets" :key="preset.id" class="catalog-card"><strong>{{ preset.name }}</strong><p>{{ preset.description }}</p><div class="catalog-tags"><span v-for="tag in preset.tags" :key="tag">{{ tag }}</span></div><small>{{ preset.capability.inputs.length }} inputs · {{ preset.capability.outputs.length }} outputs · editable after placement</small></article></div></div><div v-if="presetLayer === 'all' || presetLayer === 'template'" class="catalog-section"><div class="steps-head"><span>Deployment templates</span><small>{{ filteredTemplates.length }} editable layouts</small></div><div class="catalog-grid compact"><article v-for="template in filteredTemplates" :key="template.id" class="catalog-card"><strong>{{ template.name }}</strong><p>{{ template.description }}</p><div class="catalog-tags"><span v-for="tag in template.tags" :key="tag">{{ tag }}</span></div><button class="run-mini" @click="placeDeploymentTemplate(template)">Insert layout</button></article></div></div><div v-if="presetLayer === 'all' || presetLayer === 'kit'" class="catalog-section"><div class="steps-head"><span>Starter kits</span><small>{{ filteredKits.length }} connected journeys</small></div><div class="catalog-grid compact"><article v-for="kit in filteredKits" :key="kit.id" class="catalog-card"><strong>{{ kit.name }}</strong><p>{{ kit.description }}</p><div class="catalog-tags"><span v-for="tag in kit.tags" :key="tag">{{ tag }}</span></div><button class="run-mini" @click="placeStarterKit(kit)">Insert kit systems</button></article></div></div></section>
|
||||
<section v-if="selectedConnection" class="physical-properties panel"><span class="eyebrow">PHYSICAL / HUMAN RELATIONSHIP</span><label>Connection type<select v-model="selectedConnection.connectionType" @change="rebuildGraph"><option value="data-flow">Information / Data Flow</option><option value="physical-goods">Physical Goods</option><option value="human-task">Human Task</option><option value="deployment">Deployment</option><option value="dependency">Dependency</option><option value="source-repository">Source Repository</option></select></label><p v-if="selectedConnection.connectionType === 'physical-goods'" class="muted">Shipment payloads should describe material, quantity, unit, batch and shipment ID.</p><p v-else-if="selectedConnection.connectionType === 'human-task'" class="muted">Human-task payloads represent a simulated assignment or decision; no person or live workflow is involved.</p></section><section v-if="selectedConnection && selectedConnection.integration" class="integration-properties panel"><span class="eyebrow">PERSISTENT INTEGRATION</span><label>Mechanism<select v-model="selectedConnection.integration!.mechanism"><option value="direct-database-access">Direct Database Access</option><option value="scheduled-import">Scheduled Import</option><option value="replication-sync">Replication / Sync</option><option value="file-transfer">File Transfer</option></select></label><label>Access<select v-model="selectedConnection.integration!.access"><option value="read">Read</option><option value="write">Write</option><option value="read-write">Read / Write</option><option value="unknown">Unknown</option></select></label><label>Trigger<input v-model="selectedConnection.integration!.trigger" placeholder="Application save, scheduler, event..." /></label><label>Frequency<input v-model="selectedConnection.integration!.frequency" placeholder="Every 15 minutes / Unknown" /></label><label>Source objects<textarea :value="(selectedConnection.integration!.sourceObjects || []).join('\n')" @change="selectedConnection.integration!.sourceObjects = ($event.target as HTMLTextAreaElement).value.split('\n').map((item) => item.trim()).filter(Boolean)" rows="2" placeholder="Tables, views or queries"></textarea></label><label>Destination<input v-model="selectedConnection.integration!.destination" placeholder="Sitecore items, cache, search index..." /></label><label>Authoritative source<input v-model="selectedConnection.integration!.authoritativeSource" placeholder="MSSQL / Unknown" /></label><label>Mapping / transformation<textarea v-model="selectedConnection.integration!.transformation" rows="2" placeholder="Optional simulated mapping"></textarea></label></section><section class="connection-legend panel"><span class="eyebrow">CONNECTION LEGEND</span><span><i class="legend-line data"></i> Information / Data</span><span><i class="legend-line goods"></i> Physical Goods</span><span><i class="legend-line human"></i> Human Task</span><span><i class="legend-line deploy"></i> Deployment</span></section>
|
||||
<section v-if="selectedConnection" class="flow-properties panel"><span class="eyebrow">FLOW METADATA</span><label>Payload type<input v-model="selectedConnection.payloadType" placeholder="JSON order, package, SQL rows..." /></label><label>Scope<select v-model="selectedConnection.scope"><option value="internal">Internal</option><option value="external">External</option><option value="unknown">Unknown</option></select></label><label>Flow purposes<select v-model="selectedConnection.flowCategories" multiple><option v-for="category in FLOW_CATEGORIES" :key="category.id" :value="category.id">{{ category.icon }} {{ category.name }}</option></select></label><p class="muted">Purpose, payload type and integration mechanism are separate fields. Existing cable styles continue to describe the relationship type.</p></section><section class="flow-category-legend panel"><span class="eyebrow">FLOW PURPOSE LEGEND</span><span v-for="category in FLOW_CATEGORIES" :key="category.id" class="flow-legend"><i class="legend-dot" :style="{background: category.color}"></i>{{ category.icon }} {{ category.name }}</span></section>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
+16
-3
@@ -1,11 +1,11 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { CAPABILITY_PRESETS, CATALOG_SYSTEM_PRESETS, DEPLOYMENT_TEMPLATES, STARTER_KITS, definitionFromCapabilities, demoLandscape, executePipeline, getPreset, systemFromPreset, validateLandscape } from './model'
|
||||
import { CAPABILITY_PRESETS, CATALOG_SYSTEM_PRESETS, DEPLOYMENT_TEMPLATES, FLOW_CATEGORIES, STARTER_KITS, definitionFromCapabilities, demoLandscape, executePipeline, getPreset, systemFromPreset, validateLandscape } from './model'
|
||||
|
||||
describe('landscape model', () => {
|
||||
it('provides the editable demo landscape', () => {
|
||||
const landscape = demoLandscape()
|
||||
expect(landscape.systems).toHaveLength(17)
|
||||
expect(landscape.scenarios.map((scenario) => scenario.name)).toEqual(expect.arrayContaining(['Place order', 'Register customer', 'Contact enquiry', 'Sample request', 'Commercial order', 'Order retry and recovery', 'Commit, build and deploy', 'Website → Middleware → ERP order', 'Physical goods receipt', 'Sitecore live database query', 'Sitecore scheduled import']))
|
||||
expect(landscape.systems).toHaveLength(22)
|
||||
expect(landscape.scenarios.map((scenario) => scenario.name)).toEqual(expect.arrayContaining(['Place order', 'Register customer', 'Contact enquiry', 'Sample request', 'Commercial order', 'Order retry and recovery', 'Commit, build and deploy', 'Website → Middleware → ERP order', 'Physical goods receipt', 'Sitecore live database query', 'Sitecore scheduled import', 'Sitecore production deployment']))
|
||||
expect(landscape.scenarios[0].steps[2].connectionIds).toHaveLength(2)
|
||||
expect(getPreset('bitbucket')?.category).toBe('development-tool')
|
||||
expect(landscape.connections.find((connection) => connection.id === 'azure-devops-website')?.connectionType).toBe('deployment')
|
||||
@@ -13,6 +13,10 @@ describe('landscape model', () => {
|
||||
expect(landscape.systems.find((system) => system.id === 'warehouse')?.category).toBe('physical-location')
|
||||
expect(landscape.connections.find((connection) => connection.id === 'supplier-warehouse-goods')?.connectionType).toBe('physical-goods')
|
||||
expect(landscape.connections.find((connection) => connection.id === 'warehouse-operative-confirmation')?.connectionType).toBe('human-task')
|
||||
expect(landscape.scenarios.find((scenario) => scenario.id === 'sitecore-deployment')?.flowCategory).toBe('build-deployment')
|
||||
expect(landscape.scenarios.find((scenario) => scenario.id === 'sitecore-deployment')?.steps[1].connectionIds).toHaveLength(3)
|
||||
expect(landscape.connections.find((connection) => connection.id === 'build-octopus-release')?.payloadType).toBe('Versioned deployment package')
|
||||
expect(FLOW_CATEGORIES).toHaveLength(6)
|
||||
})
|
||||
it('round-trips a valid landscape and preserves positions', () => {
|
||||
const source = demoLandscape(); const imported = validateLandscape(JSON.parse(JSON.stringify(source)))
|
||||
@@ -94,4 +98,13 @@ describe('landscape model', () => {
|
||||
expect(request.integration?.authoritativeSource).toBe('MSSQL')
|
||||
expect(landscape.scenarios.find((scenario) => scenario.id === 'sitecore-scheduled-import')?.steps[0].connectionIds).toEqual(['mssql-sitecore-import'])
|
||||
})
|
||||
it('keeps flow purpose, payload type and mechanism independent', () => {
|
||||
const landscape = demoLandscape()
|
||||
const deployment = landscape.connections.find((connection) => connection.id === 'octopus-cm-release')!
|
||||
expect(deployment.flowCategories).toEqual(['build-deployment'])
|
||||
expect(deployment.payloadType).toBe('Release deployment')
|
||||
expect(deployment.integration).toBeUndefined()
|
||||
const imported = validateLandscape(JSON.parse(JSON.stringify(landscape)))
|
||||
expect(imported.connections.find((connection) => connection.id === deployment.id)).toEqual(deployment)
|
||||
})
|
||||
})
|
||||
|
||||
+36
-2
@@ -2,6 +2,15 @@ export type SystemCategory = 'application' | 'saas-service' | 'cloud-service' |
|
||||
export type ConnectionType = 'data-flow' | 'deployment' | 'dependency' | 'source-repository' | 'physical-goods' | 'human-task'
|
||||
export type IntegrationMechanism = 'direct-database-access' | 'scheduled-import' | 'replication-sync' | 'file-transfer'
|
||||
export type DatabaseAccess = 'read' | 'write' | 'read-write' | 'unknown'
|
||||
export type FlowCategory = 'business-transactions' | 'content-reference-data' | 'build-deployment' | 'operations-monitoring' | 'identity-access' | 'physical-logistics'
|
||||
export const FLOW_CATEGORIES: { id: FlowCategory; name: string; color: string; icon: string }[] = [
|
||||
{ id: 'business-transactions', name: 'Business Transactions', color: '#8795ff', icon: '↔' },
|
||||
{ id: 'content-reference-data', name: 'Content & Reference Data', color: '#8f7cf2', icon: '▤' },
|
||||
{ id: 'build-deployment', name: 'Build & Deployment', color: '#f2a65a', icon: '⇧' },
|
||||
{ id: 'operations-monitoring', name: 'Operations & Monitoring', color: '#26c6a6', icon: '◉' },
|
||||
{ id: 'identity-access', name: 'Identity & Access', color: '#dd6bca', icon: '◆' },
|
||||
{ id: 'physical-logistics', name: 'Physical Logistics', color: '#d89555', icon: '□' }
|
||||
]
|
||||
|
||||
export interface PortModel { id: string; name: string; description: string }
|
||||
export interface ActionModel { id: string; name: string; description: string; payload: string }
|
||||
@@ -76,6 +85,9 @@ export interface ConnectionModel {
|
||||
responseStatus?: number
|
||||
connectionType?: ConnectionType
|
||||
integration?: { mechanism: IntegrationMechanism; access: DatabaseAccess; trigger?: string; frequency?: string; sourceObjects?: string[]; destination?: string; authoritativeSource?: string; transformation?: string }
|
||||
flowCategories?: FlowCategory[]
|
||||
payloadType?: string
|
||||
scope?: 'internal' | 'external' | 'unknown'
|
||||
}
|
||||
|
||||
export interface ScenarioStep {
|
||||
@@ -88,6 +100,9 @@ export interface ScenarioStep {
|
||||
retryStepId?: string
|
||||
recoveryStepId?: string
|
||||
humanDecision?: HumanDecisionModel
|
||||
flowCategories?: FlowCategory[]
|
||||
transferOutcomes?: Record<string, 'success' | 'rejected' | 'timeout'>
|
||||
parallelGroup?: string
|
||||
}
|
||||
|
||||
export interface ScenarioModel {
|
||||
@@ -98,6 +113,8 @@ export interface ScenarioModel {
|
||||
startActionId?: string
|
||||
environmentId?: string
|
||||
traceInternal?: boolean
|
||||
flowCategory?: FlowCategory
|
||||
flowCategoryOverrides?: Record<string, FlowCategory[]>
|
||||
steps: ScenarioStep[]
|
||||
}
|
||||
|
||||
@@ -223,6 +240,7 @@ export const CATALOG_SYSTEM_PRESETS: SystemPreset[] = [
|
||||
catalogSystem('azure-storage-catalog', 'Azure Storage', 'Blob, file and queue storage template.', 'cloud-service', '#86bc25', ['object-storage', 'monitoring'], ['Azure', 'storage'], 'https://learn.microsoft.com/en-us/azure/storage/'),
|
||||
catalogSystem('azure-sql', 'Azure SQL Database', 'Managed relational database template.', 'cloud-service', '#0078d4', ['relational-data', 'monitoring', 'identity'], ['Azure', 'database'], 'https://learn.microsoft.com/en-us/azure/azure-sql/'),
|
||||
catalogSystem('azure-service-bus-catalog', 'Azure Service Bus', 'Managed messaging template.', 'cloud-service', '#5d8ee8', ['messaging', 'routing', 'monitoring'], ['Azure', 'messaging'], 'https://learn.microsoft.com/en-us/azure/service-bus-messaging/'),
|
||||
catalogSystem('build-server', 'Build Server', 'Simulated build and packaging server for versioned deployment artifacts.', 'development-tool', '#f2a65a', ['build', 'tests', 'packaging'], ['development', 'build', 'deployment'], 'https://learn.microsoft.com/en-us/azure/devops/pipelines/'),
|
||||
catalogSystem('azure-monitor', 'Azure Monitor', 'Metrics, logs and alerting template.', 'cloud-service', '#5c2d91', ['monitoring', 'analytics'], ['Azure', 'operations'], 'https://learn.microsoft.com/en-us/azure/azure-monitor/'),
|
||||
catalogSystem('bitbucket-catalog', 'Bitbucket', 'Source repository template.', 'development-tool', '#2684ff', ['build', 'tests'], ['development', 'repository', 'Atlassian'], 'https://support.atlassian.com/bitbucket-cloud/docs/'),
|
||||
catalogSystem('github', 'GitHub', 'Source repository and collaboration template.', 'development-tool', '#f0f0f0', ['build', 'tests'], ['development', 'repository'], 'https://docs.github.com/en/repositories'),
|
||||
@@ -297,7 +315,12 @@ export const demoLandscape = (): LandscapeModel => ({
|
||||
{ id: 'warehouse-operative', name: 'Warehouse Operative', description: 'Human role confirming physical goods receipt.', category: 'human', color: '#f06ca9', position: [930, 980], tags: ['Production', 'Physical', 'Human Task'], presetId: 'people-team', capabilities: cloneCapabilities(getPreset('people-team')!.capabilities) },
|
||||
{ id: 'wms', name: 'Warehouse Management System', description: 'Software linked to the warehouse, sending goods-received information to SAP.', category: 'application', color: '#7b9fe8', position: [1200, 980], tags: ['Production', 'Physical', 'Business Function'], presetId: 'warehouse-management-system', capabilities: cloneCapabilities(getPreset('warehouse-management-system')!.capabilities) },
|
||||
{ id: 'product-management', name: 'Product / Literature / Webinar Management', description: 'Application writing product and content records to MSSQL.', category: 'application', color: '#8f7cf2', position: [80, 1260], tags: ['Production', 'Content', 'Business Function'], presetId: 'product-literature-webinar', capabilities: cloneCapabilities(getPreset('product-literature-webinar')!.capabilities) },
|
||||
{ id: 'mssql', name: 'MSSQL', description: 'Authoritative fictional database for content and product records.', category: 'data-store', color: '#a91d22', position: [430, 1260], tags: ['Production', 'Database', 'Authoritative source'], presetId: 'sql-server', capabilities: cloneCapabilities(getPreset('sql-server')!.capabilities) }
|
||||
{ id: 'mssql', name: 'MSSQL', description: 'Authoritative fictional database for content and product records.', category: 'data-store', color: '#a91d22', position: [430, 1260], tags: ['Production', 'Database', 'Authoritative source'], presetId: 'sql-server', capabilities: cloneCapabilities(getPreset('sql-server')!.capabilities) },
|
||||
{ id: 'build-server', name: 'Build Server', description: 'Builds and packages a versioned website artifact.', category: 'development-tool', color: '#f2a65a', position: [80, 1540], tags: ['Production', 'Build & Deployment'], presetId: 'build-server', capabilities: cloneCapabilities(getPreset('build-server')!.capabilities) },
|
||||
{ id: 'octopus', name: 'Octopus Deploy', description: 'Creates a release and coordinates simulated environment deployments.', category: 'development-tool', color: '#2f93e0', position: [360, 1540], tags: ['Production', 'Build & Deployment'], presetId: 'octopus-deploy', capabilities: cloneCapabilities(getPreset('octopus-deploy')!.capabilities) },
|
||||
{ id: 'sitecore-cm-deploy', name: 'Sitecore CM', description: 'Production content management deployment target.', category: 'application', color: '#f06ca9', position: [650, 1450], tags: ['Production', 'Build & Deployment'], presetId: 'sitecore', capabilities: cloneCapabilities(getPreset('sitecore')!.capabilities) },
|
||||
{ id: 'sitecore-cd-1-deploy', name: 'Sitecore CD 1', description: 'First production content delivery deployment target.', category: 'application', color: '#f06ca9', position: [900, 1400], tags: ['Production', 'Build & Deployment'], presetId: 'sitecore', capabilities: cloneCapabilities(getPreset('sitecore')!.capabilities) },
|
||||
{ id: 'sitecore-cd-2-deploy', name: 'Sitecore CD 2', description: 'Second production content delivery deployment target.', category: 'application', color: '#f06ca9', position: [900, 1550], tags: ['Production', 'Build & Deployment'], presetId: 'sitecore', capabilities: cloneCapabilities(getPreset('sitecore')!.capabilities) }
|
||||
],
|
||||
connections: [
|
||||
{ id: 'website-api', sourceId: 'website', targetId: 'api', label: 'Order request', description: 'Website submits a new order to the API.', payload: '{"orderId":"ord_1042","total":129.5}' },
|
||||
@@ -329,7 +352,11 @@ export const demoLandscape = (): LandscapeModel => ({
|
||||
{ id: 'product-mssql-write', sourceId: 'product-management', targetId: 'mssql', label: 'Write product and content data', description: 'The management application writes authoritative product, literature and webinar records.', payload: '{"table":"Products","rows":[{"productId":"prod_42","title":"Blue range"}]}', connectionType: 'data-flow', exchangeType: 'event-transfer', dataType: 'JSON', deliveryMethod: 'immediate', showCableLabel: true, integration: { mechanism: 'direct-database-access', access: 'write', trigger: 'Application save', sourceObjects: ['Products', 'Literature', 'Webinars'], destination: 'MSSQL tables', authoritativeSource: 'MSSQL' } },
|
||||
{ id: 'sitecore-mssql-query', sourceId: 'sitecore', targetId: 'mssql', label: 'Live query request', description: 'Sitecore requests selected content from MSSQL.', payload: '{"query":"SELECT productId,title FROM Products WHERE published=1","parameters":{"locale":"en-GB"}}', connectionType: 'data-flow', exchangeType: 'request-response', dataType: 'SQL query', deliveryMethod: 'immediate', showCableLabel: true, integration: { mechanism: 'direct-database-access', access: 'read', trigger: 'Sitecore page request', sourceObjects: ['Products', 'Literature'], destination: 'Sitecore items', authoritativeSource: 'MSSQL', transformation: 'Map selected rows to Sitecore item fields.' }, responsePayload: '{"rows":[{"productId":"prod_42","title":"Blue range"}],"rowCount":1}', responseStatus: 200 },
|
||||
{ id: 'mssql-sitecore-result', sourceId: 'mssql', targetId: 'sitecore', label: 'Live query result', description: 'MSSQL returns selected rows to Sitecore.', payload: '{"rows":[{"productId":"prod_42","title":"Blue range"}],"rowCount":1}', connectionType: 'data-flow', exchangeType: 'event-transfer', dataType: 'SQL result rows', deliveryMethod: 'immediate', showCableLabel: true, integration: { mechanism: 'direct-database-access', access: 'read', sourceObjects: ['Products', 'Literature'], destination: 'Sitecore items', authoritativeSource: 'MSSQL', transformation: 'Map rows to Sitecore item fields.' } },
|
||||
{ id: 'mssql-sitecore-import', sourceId: 'mssql', targetId: 'sitecore', label: 'Scheduled content import', description: 'A scheduled job copies selected authoritative rows into Sitecore items.', payload: '{"rows":[{"productId":"prod_42","title":"Blue range"}],"importedAt":"2026-11-05T09:00:00Z"}', connectionType: 'data-flow', exchangeType: 'event-transfer', dataType: 'JSON rows', deliveryMethod: 'scheduled', showCableLabel: true, integration: { mechanism: 'scheduled-import', access: 'read', trigger: 'Scheduler', frequency: 'Every 15 minutes', sourceObjects: ['Products', 'Literature', 'Webinars'], destination: 'Sitecore items', authoritativeSource: 'MSSQL', transformation: 'Copy published rows; map productId to item ID.' } }
|
||||
{ id: 'mssql-sitecore-import', sourceId: 'mssql', targetId: 'sitecore', label: 'Scheduled content import', description: 'A scheduled job copies selected authoritative rows into Sitecore items.', payload: '{"rows":[{"productId":"prod_42","title":"Blue range"}],"importedAt":"2026-11-05T09:00:00Z"}', connectionType: 'data-flow', exchangeType: 'event-transfer', dataType: 'JSON rows', deliveryMethod: 'scheduled', showCableLabel: true, integration: { mechanism: 'scheduled-import', access: 'read', trigger: 'Scheduler', frequency: 'Every 15 minutes', sourceObjects: ['Products', 'Literature', 'Webinars'], destination: 'Sitecore items', authoritativeSource: 'MSSQL', transformation: 'Copy published rows; map productId to item ID.' } },
|
||||
{ id: 'build-octopus-release', sourceId: 'build-server', targetId: 'octopus', label: 'Versioned package', description: 'Build Server hands a versioned package to Octopus for release creation.', payload: '{"package":"website.2026.11.05.1.zip","version":"2026.11.05.1","commit":"abc123"}', connectionType: 'deployment', exchangeType: 'event-transfer', protocol: 'HTTPS', dataType: 'Package', payloadType: 'Versioned deployment package', scope: 'internal', deliveryMethod: 'immediate', flowCategories: ['build-deployment'], showCableLabel: true },
|
||||
{ id: 'octopus-cm-release', sourceId: 'octopus', targetId: 'sitecore-cm-deploy', label: 'Deploy to CM', description: 'Octopus deploys the release package to the production content management instance.', payload: '{"release":"rel-2026.11.05.1","package":"website.2026.11.05.1.zip","version":"2026.11.05.1","environment":"Production","target":"CM-01"}', connectionType: 'deployment', exchangeType: 'event-transfer', protocol: 'HTTPS', dataType: 'Deployment', payloadType: 'Release deployment', scope: 'internal', deliveryMethod: 'scheduled', flowCategories: ['build-deployment'], showCableLabel: true },
|
||||
{ id: 'octopus-cd-1-release', sourceId: 'octopus', targetId: 'sitecore-cd-1-deploy', label: 'Deploy to CD 1', description: 'Octopus deploys the release package to the first production delivery instance.', payload: '{"release":"rel-2026.11.05.1","package":"website.2026.11.05.1.zip","version":"2026.11.05.1","environment":"Production","target":"CD-01"}', connectionType: 'deployment', exchangeType: 'event-transfer', protocol: 'HTTPS', dataType: 'Deployment', payloadType: 'Release deployment', scope: 'internal', deliveryMethod: 'scheduled', flowCategories: ['build-deployment'], showCableLabel: true },
|
||||
{ id: 'octopus-cd-2-release', sourceId: 'octopus', targetId: 'sitecore-cd-2-deploy', label: 'Deploy to CD 2', description: 'Octopus deploys the release package to the second production delivery instance.', payload: '{"release":"rel-2026.11.05.1","package":"website.2026.11.05.1.zip","version":"2026.11.05.1","environment":"Production","target":"CD-02"}', connectionType: 'deployment', exchangeType: 'event-transfer', protocol: 'HTTPS', dataType: 'Deployment', payloadType: 'Release deployment', scope: 'internal', deliveryMethod: 'scheduled', flowCategories: ['build-deployment'], showCableLabel: true }
|
||||
],
|
||||
scenarios: [
|
||||
{
|
||||
@@ -421,6 +448,13 @@ export const demoLandscape = (): LandscapeModel => ({
|
||||
steps: [
|
||||
{ id: 'scheduled-import', connectionIds: ['mssql-sitecore-import'], explanation: 'The scheduler reads authoritative MSSQL rows and copies them into Sitecore items.', payload: '{"rows":[{"productId":"prod_42","title":"Blue range"}],"importedAt":"2026-11-05T09:00:00Z"}', delayMs: 1200, outcome: 'success' }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'sitecore-deployment', name: 'Sitecore production deployment', description: 'Build a versioned package, create an Octopus release and deploy independently to CM and two CD instances.', startSystemId: 'build-server', startActionId: 'build-shared-action', flowCategory: 'build-deployment',
|
||||
steps: [
|
||||
{ id: 'deployment-package', connectionIds: ['build-octopus-release'], explanation: 'The Build Server produces a versioned package and hands it to Octopus.', payload: '{"package":"website.2026.11.05.1.zip","version":"2026.11.05.1","commit":"abc123"}', delayMs: 900, outcome: 'success', flowCategories: ['build-deployment'] },
|
||||
{ id: 'deployment-targets', connectionIds: ['octopus-cm-release', 'octopus-cd-1-release', 'octopus-cd-2-release'], explanation: 'Octopus creates the Production release and deploys to CM and both CD instances in parallel. Each target reports its own simulated outcome.', payload: '{"release":"rel-2026.11.05.1","package":"website.2026.11.05.1.zip","version":"2026.11.05.1","environment":"Production"}', delayMs: 1400, outcome: 'success', parallelGroup: 'sitecore-production-targets', flowCategories: ['build-deployment'], transferOutcomes: { 'octopus-cm-release': 'success', 'octopus-cd-1-release': 'success', 'octopus-cd-2-release': 'success' } }
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
@@ -5,3 +5,4 @@
|
||||
.pipeline-inspector{padding:16px;margin-top:14px}.pipeline-trace-row{border-top:1px solid #263149;padding:12px 0}.pipeline-trace-row>div:first-child{display:flex;justify-content:space-between;gap:12px}.pipeline-trace-row small{color:#8996af}.pipeline-trace-row pre{max-height:150px;overflow:auto}.changed-fields{color:#f4ca72;font-size:11px}.pipeline-builder-overlay{position:fixed;inset:0;z-index:30;background:rgba(4,8,15,.78);display:grid;place-items:center;padding:24px}.pipeline-builder{width:min(820px,96vw);max-height:90vh;overflow:auto;padding:20px}.pipeline-builder .definition-card{margin:12px 0}.pipeline-builder textarea{width:100%;box-sizing:border-box}.pipeline-builder code{color:#b9c5ff}
|
||||
.catalog-panel{padding:16px;margin-top:14px}.catalog-panel small{display:block;color:#8996af;margin-top:4px}.catalog-controls{display:grid;grid-template-columns:1fr 180px;gap:8px;margin:14px 0}.catalog-controls input,.catalog-controls select{background:#0d1320;color:#dce4f4;border:1px solid #303d58;border-radius:4px;padding:9px}.catalog-section{border-top:1px solid #263149;padding-top:14px;margin-top:14px}.catalog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}.catalog-grid.compact{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}.catalog-card{border:1px solid #303d58;background:#0d1320;border-radius:5px;padding:12px}.catalog-title{display:flex;align-items:center;gap:8px}.catalog-title strong{flex:1}.catalog-card p{color:#aab5c9;font-size:11px;line-height:1.45;min-height:34px}.catalog-tags{display:flex;gap:4px;flex-wrap:wrap;margin:8px 0}.catalog-tags span{font-size:9px;color:#b9c5ff;border:1px solid #39486a;border-radius:10px;padding:3px 6px}.catalog-actions{display:flex;align-items:center;justify-content:space-between;margin-top:10px}.catalog-actions a{color:#91a4ff;font-size:10px}.favourite{background:transparent;border:0;color:#f4ca72;font-size:18px;cursor:pointer}@media(max-width:700px){.catalog-controls{grid-template-columns:1fr}.catalog-grid{grid-template-columns:1fr}}
|
||||
.physical-properties,.connection-legend{display:flex;align-items:center;gap:14px;padding:12px 16px;margin-top:14px}.physical-properties label{display:flex;align-items:center;gap:8px;color:#aab5c9;font-size:11px;font-weight:700}.physical-properties select{background:#0d1320;color:#dce4f4;border:1px solid #303d58;border-radius:4px;padding:7px}.connection-legend{flex-wrap:wrap;color:#aab5c9;font-size:11px}.connection-legend .eyebrow{margin-right:4px}.legend-line{display:inline-block;width:28px;border-top:2px solid currentColor;margin-right:5px;vertical-align:middle}.legend-line.goods{color:#d89555;border-top-style:dashed}.legend-line.human{color:#f06ca9;border-top-style:dotted}.legend-line.deploy{color:#f2a65a;border-top-style:dashed}.legend-line.data{color:#8795ff}
|
||||
.flow-properties,.flow-category-legend{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 16px;margin-top:14px}.flow-properties label{display:flex;align-items:center;gap:7px;color:#aab5c9;font-size:11px;font-weight:700}.flow-properties input,.flow-properties select{background:#0d1320;color:#dce4f4;border:1px solid #303d58;border-radius:4px;padding:7px}.flow-properties select[multiple]{min-width:210px;min-height:62px}.flow-properties .muted{flex-basis:100%;margin:0}.flow-category-legend{color:#aab5c9;font-size:11px}.flow-legend{display:inline-flex;align-items:center;gap:5px}.legend-dot{width:9px;height:9px;border-radius:50%;display:inline-block}
|
||||
|
||||
Reference in New Issue
Block a user