Migrate Dataflow interface patterns
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect, useState, type ComponentProps } from "react";
|
||||
import { Play, Trash2 } from "lucide-react";
|
||||
import {
|
||||
DismissibleAlert,
|
||||
FormField,
|
||||
FormField as CoreFormField,
|
||||
IconButton
|
||||
} from "@govoplan/core-webui";
|
||||
import type {
|
||||
@@ -10,6 +10,18 @@ import type {
|
||||
PipelineGraphNode,
|
||||
TabularSource
|
||||
} from "../../api/dataflow";
|
||||
import { DATAFLOW_NODE_DOCUMENTATION } from "./interfacePatterns";
|
||||
|
||||
type NodeFormFieldProps = ComponentProps<typeof CoreFormField>;
|
||||
|
||||
function FormField({ documentation, ...props }: NodeFormFieldProps) {
|
||||
return (
|
||||
<CoreFormField
|
||||
{...props}
|
||||
documentation={documentation ?? DATAFLOW_NODE_DOCUMENTATION}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
type NodeInspectorProps = {
|
||||
node: PipelineGraphNode | null;
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import type { DocumentationHelpReference } from "@govoplan/core-webui";
|
||||
|
||||
export const DATAFLOW_DOCUMENTATION = {
|
||||
topicId: "dataflow.module-boundary",
|
||||
documentationType: "user"
|
||||
} satisfies DocumentationHelpReference;
|
||||
|
||||
export const DATAFLOW_FIELDS_DOCUMENTATION = {
|
||||
topicId: "dataflow.reference.fields-and-consequences",
|
||||
documentationType: "admin"
|
||||
} satisfies DocumentationHelpReference;
|
||||
|
||||
export const DATAFLOW_NODE_DOCUMENTATION = {
|
||||
topicId: "dataflow.reference.nodes-and-expressions",
|
||||
documentationType: "user"
|
||||
} satisfies DocumentationHelpReference;
|
||||
|
||||
export const DATAFLOW_RUN_DOCUMENTATION = {
|
||||
topicId: "dataflow.execution-and-recovery",
|
||||
documentationType: "admin"
|
||||
} satisfies DocumentationHelpReference;
|
||||
|
||||
export const DATAFLOW_I18N = {
|
||||
loading: "i18n:govoplan-dataflow.loading_reason",
|
||||
working: "i18n:govoplan-dataflow.working_reason",
|
||||
writeReason: "i18n:govoplan-dataflow.write_reason",
|
||||
runReason: "i18n:govoplan-dataflow.run_reason",
|
||||
noSelection: "i18n:govoplan-dataflow.no_selection_reason",
|
||||
noChanges: "i18n:govoplan-dataflow.no_changes_reason",
|
||||
saveFirst: "i18n:govoplan-dataflow.save_first_reason",
|
||||
requiredAction: "i18n:govoplan-dataflow.required_action",
|
||||
actor: "i18n:govoplan-dataflow.actor",
|
||||
destination: "i18n:govoplan-dataflow.destination",
|
||||
permissionAction: "i18n:govoplan-dataflow.permission_action",
|
||||
permissionActor: "i18n:govoplan-dataflow.permission_actor",
|
||||
permissionDestination: "i18n:govoplan-dataflow.permission_destination"
|
||||
} as const;
|
||||
@@ -0,0 +1,163 @@
|
||||
import type { PlatformTranslations } from "@govoplan/core-webui";
|
||||
|
||||
const en = {
|
||||
"i18n:govoplan-dataflow.dataflow": "Dataflow",
|
||||
"i18n:govoplan-dataflow.library": "Pipeline library",
|
||||
"i18n:govoplan-dataflow.graph": "Graph editor",
|
||||
"i18n:govoplan-dataflow.sql": "Constrained SQL editor",
|
||||
"i18n:govoplan-dataflow.inspector": "Node inspector",
|
||||
"i18n:govoplan-dataflow.results": "Preview and diagnostics",
|
||||
"i18n:govoplan-dataflow.triggers": "Automation triggers",
|
||||
"i18n:govoplan-dataflow.runs": "Runs and deployments",
|
||||
"i18n:govoplan-dataflow.widget": "Dataflows widget",
|
||||
"i18n:govoplan-dataflow.loading_reason": "The pipeline library is still loading.",
|
||||
"i18n:govoplan-dataflow.working_reason": "Another Dataflow operation is still running.",
|
||||
"i18n:govoplan-dataflow.write_reason": "Your account may not create or change pipeline definitions.",
|
||||
"i18n:govoplan-dataflow.run_reason": "Your account may not preview or run pipelines.",
|
||||
"i18n:govoplan-dataflow.no_selection_reason": "Select or create a pipeline first.",
|
||||
"i18n:govoplan-dataflow.no_changes_reason": "There are no unsaved pipeline changes.",
|
||||
"i18n:govoplan-dataflow.save_first_reason": "Save the pipeline before starting a revision-pinned run.",
|
||||
"i18n:govoplan-dataflow.required_action": "Required action",
|
||||
"i18n:govoplan-dataflow.actor": "Responsible actor",
|
||||
"i18n:govoplan-dataflow.destination": "Where to continue",
|
||||
"i18n:govoplan-dataflow.permission_action": "Ask for Dataflow definition or run permission for the intended operation.",
|
||||
"i18n:govoplan-dataflow.permission_actor": "A tenant administrator or Dataflow manager",
|
||||
"i18n:govoplan-dataflow.permission_destination": "Access administration for Dataflow",
|
||||
"i18n:govoplan-dataflow.unsaved_title": "Unsaved pipeline",
|
||||
"i18n:govoplan-dataflow.unsaved_message": "Save or discard the pipeline changes before leaving this workspace.",
|
||||
"i18n:govoplan-dataflow.unsaved_copy_title": "Uncreated pipeline copy",
|
||||
"i18n:govoplan-dataflow.unsaved_copy_message": "Create the scoped copy or discard its changed settings before leaving.",
|
||||
"i18n:govoplan-dataflow.unsaved_source_title": "Unstaged datasource",
|
||||
"i18n:govoplan-dataflow.unsaved_source_message": "Import the datasource snapshot or discard its staged content before leaving.",
|
||||
"i18n:govoplan-dataflow.unsaved_trigger_title": "Unsaved automation trigger",
|
||||
"i18n:govoplan-dataflow.unsaved_trigger_message": "Save or discard the trigger changes before leaving this editor.",
|
||||
"i18n:govoplan-dataflow.queue_title": "Queue pipeline run",
|
||||
"i18n:govoplan-dataflow.queue_message": "Queue this pinned pipeline revision? The run and its authorization evidence will be retained.",
|
||||
"i18n:govoplan-dataflow.publish_title": "Queue and publish pipeline output",
|
||||
"i18n:govoplan-dataflow.publish_message": "Queue this pinned revision and publish its output to the selected governed Datasource target?",
|
||||
"i18n:govoplan-dataflow.promote_staging_title": "Promote revision to staging",
|
||||
"i18n:govoplan-dataflow.promote_staging_message": "Promote this immutable pipeline revision to the staging execution environment?",
|
||||
"i18n:govoplan-dataflow.promote_production_title": "Promote revision to production",
|
||||
"i18n:govoplan-dataflow.promote_production_message": "Promote this immutable pipeline revision to production? Future production runs may use it.",
|
||||
"Pipelines": "Pipelines",
|
||||
"Search pipelines": "Search pipelines",
|
||||
"No matching pipelines": "No matching pipelines",
|
||||
"No pipelines yet": "No pipelines yet",
|
||||
"Graph": "Graph",
|
||||
"SQL": "SQL",
|
||||
"Validate": "Validate",
|
||||
"Preview": "Preview",
|
||||
"Refresh": "Refresh",
|
||||
"Run": "Run",
|
||||
"Save": "Save",
|
||||
"Saving...": "Saving...",
|
||||
"Nodes": "Nodes",
|
||||
"No pipeline selected": "No pipeline selected",
|
||||
"New pipeline": "New pipeline",
|
||||
"Definition settings": "Definition settings",
|
||||
"Reuse as scoped copy": "Reuse as scoped copy",
|
||||
"Automation triggers": "Automation triggers",
|
||||
"Discard changes": "Discard changes",
|
||||
"Delete pipeline": "Delete pipeline",
|
||||
"Constrained Dataflow SQL": "Constrained Dataflow SQL",
|
||||
"Apply SQL": "Apply SQL",
|
||||
"Stage datasource": "Stage datasource",
|
||||
"Run only": "Run only",
|
||||
"Publish result": "Publish result",
|
||||
"Environment": "Environment",
|
||||
"Development": "Development",
|
||||
"Staging": "Staging",
|
||||
"Production": "Production",
|
||||
"Promote to staging": "Promote to staging",
|
||||
"Promote to production": "Promote to production",
|
||||
"Recent runs": "Recent runs",
|
||||
"Queue run": "Queue run",
|
||||
"New trigger": "New trigger",
|
||||
"Save trigger": "Save trigger",
|
||||
"Delete trigger": "Delete trigger",
|
||||
"Delete automation trigger": "Delete automation trigger",
|
||||
"Pipeline definition is read-only": "Pipeline definition is read-only",
|
||||
"Working...": "Working..."
|
||||
} as const;
|
||||
|
||||
const de: Record<keyof typeof en, string> = {
|
||||
"i18n:govoplan-dataflow.dataflow": "Datenfluss",
|
||||
"i18n:govoplan-dataflow.library": "Datenflussbibliothek",
|
||||
"i18n:govoplan-dataflow.graph": "Graph-Editor",
|
||||
"i18n:govoplan-dataflow.sql": "Eingeschränkter SQL-Editor",
|
||||
"i18n:govoplan-dataflow.inspector": "Knoteninspektor",
|
||||
"i18n:govoplan-dataflow.results": "Vorschau und Diagnosen",
|
||||
"i18n:govoplan-dataflow.triggers": "Automatisierungsauslöser",
|
||||
"i18n:govoplan-dataflow.runs": "Ausführungen und Bereitstellungen",
|
||||
"i18n:govoplan-dataflow.widget": "Datenfluss-Widget",
|
||||
"i18n:govoplan-dataflow.loading_reason": "Die Datenflussbibliothek wird noch geladen.",
|
||||
"i18n:govoplan-dataflow.working_reason": "Eine andere Datenflussoperation läuft noch.",
|
||||
"i18n:govoplan-dataflow.write_reason": "Ihr Konto darf keine Datenflussdefinitionen erstellen oder ändern.",
|
||||
"i18n:govoplan-dataflow.run_reason": "Ihr Konto darf Datenflüsse nicht prüfen oder ausführen.",
|
||||
"i18n:govoplan-dataflow.no_selection_reason": "Wählen oder erstellen Sie zuerst einen Datenfluss.",
|
||||
"i18n:govoplan-dataflow.no_changes_reason": "Es gibt keine ungespeicherten Datenflussänderungen.",
|
||||
"i18n:govoplan-dataflow.save_first_reason": "Speichern Sie den Datenfluss vor einer revisionsgebundenen Ausführung.",
|
||||
"i18n:govoplan-dataflow.required_action": "Erforderliche Aktion",
|
||||
"i18n:govoplan-dataflow.actor": "Verantwortliche Stelle",
|
||||
"i18n:govoplan-dataflow.destination": "Fortsetzung",
|
||||
"i18n:govoplan-dataflow.permission_action": "Fordern Sie die für den Vorgang erforderliche Datenfluss- oder Ausführungsberechtigung an.",
|
||||
"i18n:govoplan-dataflow.permission_actor": "Mandantenadministration oder Datenflussverwaltung",
|
||||
"i18n:govoplan-dataflow.permission_destination": "Zugriffsverwaltung für Datenflüsse",
|
||||
"i18n:govoplan-dataflow.unsaved_title": "Ungespeicherter Datenfluss",
|
||||
"i18n:govoplan-dataflow.unsaved_message": "Speichern oder verwerfen Sie die Datenflussänderungen, bevor Sie diesen Arbeitsbereich verlassen.",
|
||||
"i18n:govoplan-dataflow.unsaved_copy_title": "Nicht erstellte Datenflusskopie",
|
||||
"i18n:govoplan-dataflow.unsaved_copy_message": "Erstellen Sie die eingegrenzte Kopie oder verwerfen Sie ihre geänderten Einstellungen.",
|
||||
"i18n:govoplan-dataflow.unsaved_source_title": "Nicht bereitgestellte Datenquelle",
|
||||
"i18n:govoplan-dataflow.unsaved_source_message": "Importieren Sie den Datenquellenstand oder verwerfen Sie dessen bereitgestellten Inhalt.",
|
||||
"i18n:govoplan-dataflow.unsaved_trigger_title": "Ungespeicherter Automatisierungsauslöser",
|
||||
"i18n:govoplan-dataflow.unsaved_trigger_message": "Speichern oder verwerfen Sie die Änderungen am Auslöser, bevor Sie diesen Editor verlassen.",
|
||||
"i18n:govoplan-dataflow.queue_title": "Datenflussausführung einreihen",
|
||||
"i18n:govoplan-dataflow.queue_message": "Diese gebundene Datenflussrevision einreihen? Ausführung und Berechtigungsnachweis werden aufbewahrt.",
|
||||
"i18n:govoplan-dataflow.publish_title": "Datenflussausgabe einreihen und veröffentlichen",
|
||||
"i18n:govoplan-dataflow.publish_message": "Diese gebundene Revision einreihen und ihre Ausgabe in der ausgewählten verwalteten Datenquelle veröffentlichen?",
|
||||
"i18n:govoplan-dataflow.promote_staging_title": "Revision nach Staging übernehmen",
|
||||
"i18n:govoplan-dataflow.promote_staging_message": "Diese unveränderliche Datenflussrevision in die Staging-Ausführungsumgebung übernehmen?",
|
||||
"i18n:govoplan-dataflow.promote_production_title": "Revision in Produktion übernehmen",
|
||||
"i18n:govoplan-dataflow.promote_production_message": "Diese unveränderliche Datenflussrevision in Produktion übernehmen? Künftige Produktionsausführungen können sie verwenden.",
|
||||
"Pipelines": "Datenflüsse",
|
||||
"Search pipelines": "Datenflüsse suchen",
|
||||
"No matching pipelines": "Keine passenden Datenflüsse",
|
||||
"No pipelines yet": "Noch keine Datenflüsse",
|
||||
"Graph": "Graph",
|
||||
"SQL": "SQL",
|
||||
"Validate": "Validieren",
|
||||
"Preview": "Vorschau",
|
||||
"Refresh": "Aktualisieren",
|
||||
"Run": "Ausführen",
|
||||
"Save": "Speichern",
|
||||
"Saving...": "Speichert...",
|
||||
"Nodes": "Knoten",
|
||||
"No pipeline selected": "Kein Datenfluss ausgewählt",
|
||||
"New pipeline": "Neuer Datenfluss",
|
||||
"Definition settings": "Definitionseinstellungen",
|
||||
"Reuse as scoped copy": "Als eingegrenzte Kopie verwenden",
|
||||
"Automation triggers": "Automatisierungsauslöser",
|
||||
"Discard changes": "Änderungen verwerfen",
|
||||
"Delete pipeline": "Datenfluss löschen",
|
||||
"Constrained Dataflow SQL": "Eingeschränktes Datenfluss-SQL",
|
||||
"Apply SQL": "SQL anwenden",
|
||||
"Stage datasource": "Datenquelle bereitstellen",
|
||||
"Run only": "Nur ausführen",
|
||||
"Publish result": "Ergebnis veröffentlichen",
|
||||
"Environment": "Umgebung",
|
||||
"Development": "Entwicklung",
|
||||
"Staging": "Staging",
|
||||
"Production": "Produktion",
|
||||
"Promote to staging": "Nach Staging übernehmen",
|
||||
"Promote to production": "In Produktion übernehmen",
|
||||
"Recent runs": "Letzte Ausführungen",
|
||||
"Queue run": "Ausführung einreihen",
|
||||
"New trigger": "Neuer Auslöser",
|
||||
"Save trigger": "Auslöser speichern",
|
||||
"Delete trigger": "Auslöser löschen",
|
||||
"Delete automation trigger": "Automatisierungsauslöser löschen",
|
||||
"Pipeline definition is read-only": "Datenflussdefinition ist schreibgeschützt",
|
||||
"Working...": "Vorgang läuft..."
|
||||
};
|
||||
|
||||
export const generatedTranslations: PlatformTranslations = { en, de };
|
||||
+75
-3
@@ -4,6 +4,7 @@ import type {
|
||||
PlatformWebModule
|
||||
} from "@govoplan/core-webui";
|
||||
import DataflowPipelinesWidget from "./features/dataflow/DataflowPipelinesWidget";
|
||||
import { generatedTranslations } from "./i18n/generatedTranslations";
|
||||
import "@xyflow/react/dist/style.css";
|
||||
import "./styles/dataflow.css";
|
||||
|
||||
@@ -57,7 +58,7 @@ const dataflowDashboardWidgets: DashboardWidgetsUiCapability = {
|
||||
|
||||
export const dataflowModule: PlatformWebModule = {
|
||||
id: "dataflow",
|
||||
label: "Dataflow",
|
||||
label: "i18n:govoplan-dataflow.dataflow",
|
||||
version: "0.1.14",
|
||||
optionalDependencies: [
|
||||
"access",
|
||||
@@ -70,23 +71,94 @@ export const dataflowModule: PlatformWebModule = {
|
||||
"risk_compliance",
|
||||
"workflow"
|
||||
],
|
||||
translations: generatedTranslations,
|
||||
viewSurfaces: [
|
||||
{
|
||||
id: "dataflow.page",
|
||||
moduleId: "dataflow",
|
||||
kind: "route",
|
||||
label: "i18n:govoplan-dataflow.dataflow",
|
||||
order: 72
|
||||
},
|
||||
{
|
||||
id: "dataflow.library",
|
||||
moduleId: "dataflow",
|
||||
kind: "section",
|
||||
label: "i18n:govoplan-dataflow.library",
|
||||
parentId: "dataflow.page",
|
||||
order: 10
|
||||
},
|
||||
{
|
||||
id: "dataflow.graph",
|
||||
moduleId: "dataflow",
|
||||
kind: "section",
|
||||
label: "i18n:govoplan-dataflow.graph",
|
||||
parentId: "dataflow.page",
|
||||
order: 20
|
||||
},
|
||||
{
|
||||
id: "dataflow.sql",
|
||||
moduleId: "dataflow",
|
||||
kind: "section",
|
||||
label: "i18n:govoplan-dataflow.sql",
|
||||
parentId: "dataflow.page",
|
||||
order: 30
|
||||
},
|
||||
{
|
||||
id: "dataflow.inspector",
|
||||
moduleId: "dataflow",
|
||||
kind: "section",
|
||||
label: "i18n:govoplan-dataflow.inspector",
|
||||
parentId: "dataflow.page",
|
||||
order: 40
|
||||
},
|
||||
{
|
||||
id: "dataflow.results",
|
||||
moduleId: "dataflow",
|
||||
kind: "section",
|
||||
label: "i18n:govoplan-dataflow.results",
|
||||
parentId: "dataflow.page",
|
||||
order: 50
|
||||
},
|
||||
{
|
||||
id: "dataflow.triggers",
|
||||
moduleId: "dataflow",
|
||||
kind: "action",
|
||||
label: "i18n:govoplan-dataflow.triggers",
|
||||
parentId: "dataflow.page",
|
||||
order: 60
|
||||
},
|
||||
{
|
||||
id: "dataflow.runs",
|
||||
moduleId: "dataflow",
|
||||
kind: "action",
|
||||
label: "i18n:govoplan-dataflow.runs",
|
||||
parentId: "dataflow.page",
|
||||
order: 70
|
||||
},
|
||||
{
|
||||
id: "dataflow.widget.pipelines",
|
||||
moduleId: "dataflow",
|
||||
kind: "section",
|
||||
label: "Dataflows widget",
|
||||
label: "i18n:govoplan-dataflow.widget",
|
||||
order: 70
|
||||
}
|
||||
],
|
||||
navItems: [
|
||||
{ to: "/dataflow", label: "Dataflow", iconName: "waypoints", anyOf: readScopes, order: 72 }
|
||||
{
|
||||
to: "/dataflow",
|
||||
label: "i18n:govoplan-dataflow.dataflow",
|
||||
iconName: "waypoints",
|
||||
anyOf: readScopes,
|
||||
order: 72
|
||||
}
|
||||
],
|
||||
routes: [
|
||||
{
|
||||
path: "/dataflow",
|
||||
anyOf: readScopes,
|
||||
order: 72,
|
||||
surfaceId: "dataflow.page",
|
||||
render: ({ settings, auth }) => createElement(DataflowPage, { settings, auth })
|
||||
}
|
||||
],
|
||||
|
||||
@@ -290,6 +290,10 @@
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
.dataflow-action-guidance {
|
||||
padding: 0 10px 8px;
|
||||
}
|
||||
|
||||
.dataflow-workspace-toolbar {
|
||||
min-height: 58px;
|
||||
padding: 8px 10px;
|
||||
|
||||
Reference in New Issue
Block a user