Skip to content

Commit

Permalink
Rename "JSON" button to "Export" (#7568)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrp authored Feb 17, 2025
1 parent e7e62b0 commit 3195172
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 16 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export enum BuiltinButtonTypes {
processCompare = "process-compare",
processMigrate = "process-migrate",
processImport = "process-import",
processJSON = "process-json",
processExport = "process-export",
processPDF = "process-pdf",
processArchiveToggle = "process-archive-toggle",
processArchive = "process-archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ArchiveButton from "../../toolbars/process/buttons/ArchiveButton";
import { ArchiveToggleButton } from "../../toolbars/process/buttons/ArchiveToggleButton";
import CompareButton from "../../toolbars/process/buttons/CompareButton";
import ImportButton from "../../toolbars/process/buttons/ImportButton";
import JSONButton from "../../toolbars/process/buttons/JSONButton";
import ExportButton from "../../toolbars/process/buttons/ExportButton";
import MigrateButton from "../../toolbars/process/buttons/MigrateButton";
import PDFButton from "../../toolbars/process/buttons/PDFButton";
import SaveButton from "../../toolbars/process/buttons/SaveButton";
Expand Down Expand Up @@ -58,7 +58,7 @@ export const TOOLBAR_BUTTONS_MAP: ToolbarButtonsMap = {
[BuiltinButtonTypes.processCompare]: CompareButton,
[BuiltinButtonTypes.processMigrate]: MigrateButton,
[BuiltinButtonTypes.processImport]: ImportButton,
[BuiltinButtonTypes.processJSON]: JSONButton,
[BuiltinButtonTypes.processExport]: ExportButton,
[BuiltinButtonTypes.processPDF]: PDFButton,
[BuiltinButtonTypes.processArchiveToggle]: ArchiveToggleButton,
[BuiltinButtonTypes.processArchive]: ArchiveButton,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function defaultToolbarsConfig(isFragment: boolean, isArchived: boolean):
{ type: BuiltinButtonTypes.processCompare },
{ type: BuiltinButtonTypes.processMigrate },
{ type: BuiltinButtonTypes.processImport },
{ type: BuiltinButtonTypes.processJSON },
{ type: BuiltinButtonTypes.processExport },
{ type: BuiltinButtonTypes.processPDF },
{ type: BuiltinButtonTypes.processArchiveToggle },
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import HttpService from "../../../../http/HttpService";

type Props = StateProps & ToolbarButtonProps;

function JSONButton(props: Props) {
function ExportButton(props: Props) {
const { scenarioName, scenarioGraph, versionId, canExport, disabled, type } = props;
const available = !disabled && canExport;
const { t } = useTranslation();

return (
<ToolbarButton
name={t("panels.actions.process-JSON.button", "JSON")}
name={t("panels.actions.process-export.button", "export")}
icon={<Icon />}
disabled={!available}
onClick={() => {
Expand All @@ -42,4 +42,4 @@ const mapDispatch = {};

type StateProps = typeof mapDispatch & ReturnType<typeof mapState>;

export default connect(mapState, mapDispatch)(JSONButton);
export default connect(mapState, mapDispatch)(ExportButton);
4 changes: 2 additions & 2 deletions designer/client/src/containers/event-tracking/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export const mapToolbarButtonToStatisticsEvent = (
case BuiltinButtonTypes.generateAndTest: {
return EventTrackingSelector.TestGenerateFile;
}
case BuiltinButtonTypes.processJSON: {
return EventTrackingSelector.ScenarioJson;
case BuiltinButtonTypes.processExport: {
return EventTrackingSelector.ScenarioExport;
}
case BuiltinButtonTypes.processArchive: {
return EventTrackingSelector.ScenarioArchive;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ enum ClickEventsSelector {
EditRedo = "EDIT_REDO",
EditUndo = "EDIT_UNDO",
TestGenerateFile = "TEST_GENERATE_FILE",
ScenarioJson = "SCENARIO_JSON",
ScenarioExport = "SCENARIO_EXPORT",
ScenarioArchive = "SCENARIO_ARCHIVE",
ScenarioCompare = "SCENARIO_COMPARE",
ActionDeploy = "ACTION_DEPLOY",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ processToolbarConfig {
{ type: "process-compare" }
{ type: "process-migrate", disabled: { archived: true } }
{ type: "process-import", disabled: { archived: true } }
{ type: "process-json" }
{ type: "process-export" }
{ type: "process-pdf" }
{ type: "process-archive", hidden: { archived: true } }
{ type: "process-unarchive", hidden: { archived: false } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ object StatisticsApiEndpoints {
case object ClickScenarioCompare extends StatisticName { override val shortName = "f_csco" }
case object ClickScenarioMigrate extends StatisticName { override val shortName = "f_csm" }
case object ClickScenarioImport extends StatisticName { override val shortName = "f_csi" }
case object ClickScenarioJson extends StatisticName { override val shortName = "f_csj" }
case object ClickScenarioExport extends StatisticName { override val shortName = "f_csj" }
case object ClickScenarioPdf extends StatisticName { override val shortName = "f_cspd" }
case object ClickScenarioArchive extends StatisticName { override val shortName = "f_csa" }
case object ClickTestGenerated extends StatisticName { override val shortName = "f_ctg" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ object ToolbarButtonConfigType extends Enumeration {
val ProcessCompare: Value = Value("process-compare")
val ProcessMigrate: Value = Value("process-migrate")
val ProcessImport: Value = Value("process-import")
val ProcessJSON: Value = Value("process-json")
val ProcessExport: Value = Value("process-export")
val ProcessPDF: Value = Value("process-pdf")

val ProcessArchiveToggle: Value = Value("process-archive-toggle")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class NuDesignerApiAvailableToExposeYamlSpec extends AnyFunSuite with Matchers {
"CLICK_SCENARIO_COMPARE",
"CLICK_SCENARIO_MIGRATE",
"CLICK_SCENARIO_IMPORT",
"CLICK_SCENARIO_JSON",
"CLICK_SCENARIO_EXPORT",
"CLICK_SCENARIO_PDF",
"CLICK_SCENARIO_ARCHIVE",
"CLICK_TEST_GENERATED",
Expand Down
2 changes: 1 addition & 1 deletion docs-internal/api/nu-designer-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7266,7 +7266,7 @@ components:
- CLICK_SCENARIO_COMPARE
- CLICK_SCENARIO_MIGRATE
- CLICK_SCENARIO_IMPORT
- CLICK_SCENARIO_JSON
- CLICK_SCENARIO_EXPORT
- CLICK_SCENARIO_PDF
- CLICK_SCENARIO_ARCHIVE
- CLICK_TEST_GENERATED
Expand Down
1 change: 1 addition & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
* Kafka source has "offset reset strategy" parameter that controls starting point for reading events.
* Configuration entry `kafkaEspProperties.forceLatestRead` is replaced with `kafkaEspProperties.defaultOffsetResetStrategy`
* [#7545](https://github.com/TouK/nussknacker/pull/7545) Added `useMiniClusterForDeployment` option allowing to run Flink scenarios on Flink MiniCluster
* [#7568](https://github.com/TouK/nussknacker/pull/7568) The "JSON" button was renamed to "Export" to mark that it generates data usable in "Import"

## 1.18

Expand Down
1 change: 1 addition & 0 deletions docs/MigrationGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ To see the biggest differences please consult the [changelog](Changelog.md).
* enabled - if set to false stickyNotes feature is disabled, stickyNotes cant be created, they are also not loaded to graph
* [#7534](https://github.com/TouK/nussknacker/pull/7534) `shouldVerifyBeforeDeploy` configuration entry available for Flink deployment
was renamed to `scenarioStateVerification.enabled`
* [#7568](https://github.com/TouK/nussknacker/pull/7568) The `process-json` button in `processToolbarConfig` was renamed to `process-export`

### REST API changes

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/DesignerConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ processToolbarConfig {
{ type: "process-compare" }
{ type: "process-migrate", disabled: { archived: true } }
{ type: "process-import", disabled: { archived: true } }
{ type: "process-json" }
{ type: "process-export" }
{ type: "process-pdf" }
{ type: "process-archive", hidden: { archived: true } }
{ type: "process-unarchive", hidden: { archived: false } }
Expand Down

0 comments on commit 3195172

Please sign in to comment.