You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2019/12/13 14:17:42 UTC
[brooklyn-ui] 02/03: composer - fix potential NPE if config has
null, and allow wrap of long line
This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git
commit 5309892e04654e5af6a27fcb9527906ba7088475
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Fri Dec 13 10:58:53 2019 +0000
composer - fix potential NPE if config has null, and allow wrap of long line
---
.../app/components/providers/blueprint-service.provider.js | 2 +-
.../blueprint-composer/app/components/spec-editor/spec-editor.less | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js b/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
index 5e43ab7..eec14e5 100644
--- a/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
+++ b/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
@@ -700,7 +700,7 @@ function BlueprintService($log, $q, $sce, paletteApi, iconGenerator, dslService)
});
relationships = Array.from(entity.config.values())
- .filter(config => config[DSL_ENTITY_SPEC] && config[DSL_ENTITY_SPEC] instanceof Entity)
+ .filter(config => config && config[DSL_ENTITY_SPEC] && config[DSL_ENTITY_SPEC] instanceof Entity)
.map(config => config[DSL_ENTITY_SPEC])
.reduce((relationships, spec) => {
return relationships.concat(getRelationships(spec));
diff --git a/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.less b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.less
index 3cc94b9..00abd58 100644
--- a/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.less
+++ b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.less
@@ -91,6 +91,9 @@ spec-editor {
.entity-type-header {
font-size: 105%;
margin-right: 1em;
+ // allow this to wrap, as it's important to be able to read it;
+ // break anywhere in case it's of the form my.type.HasGotAVeryVeryVeryLongName
+ word-break: break-all;
}
.label.version {
vertical-align: 2px;