Use visualization name as default value for widget title in dashboard
@@ -31,6 +31,8 @@ import {VisualizablePipeline} from "../../../core-model/dashboard/VisualizablePi
import {Dashboard} from "../../models/dashboard.model";
import {MappingPropertyNary} from "../../../connect/model/MappingPropertyNary";
import {ConfigurationInfo} from "../../../connect/model/message/ConfigurationInfo";
+import {FreeTextStaticProperty} from "../../../connect/model/FreeTextStaticProperty";
+import {WidgetConfigBuilder} from "../../registry/widget-config-builder";
@Component({
selector: 'add-visualization-dialog-component',
@@ -139,6 +141,9 @@ export class AddVisualizationDialogComponent {
let requirement: EventProperty = this.findRequirement(this.selectedWidget.requiredSchema, sp.internalName);
sp.mapsFromOptions = new MappingPropertyGenerator(requirement, this.selectedPipeline.schema.eventProperties).computeMatchingProperties();
}
+ if (sp instanceof FreeTextStaticProperty && sp.internalName === WidgetConfigBuilder.TITLE_KEY) {
+ sp.value = this.selectedPipeline.visualizationName;
+ }
});
this.next();
}
