cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
529
Views
0
Helpful
1
Replies
Highlighted
Cisco Employee

NeXt UI string concatenation under nx.ui.component

Hi Experts,

first of all I want to send you a lot of kudos for this amazing project.

I’m working in NSO / next ui project and I stuck in a stupid question that regards a String concatenation with a {#...} variable under nx.ui.component working as "MyNodeTooltip".

the code below in red is wrong and I wish know how solve this situation. I thought about another nested content object but i'm stuck.


thank you for your time.


Francesco

content: [{

      tag: 'a',

      content: '{#node.model.address}',

      props: {

           href: 'telnet://{#node.model.address}'

      }

      }]

Everyone's tags (3)
1 REPLY 1
Beginner

Re: NeXt UI string concatenation under nx.ui.component

Hi,

I had the same problem with an http link, here is how I solved this:
nx.define('MyNodeTooltip', nx.ui.Component, {
properties: {
node: {},
topology: {}
},
view: {
content: [{
tag: 'p',
content: {
tag: 'a',
content: 'HW Detail',
props: {
href: '#'
},
events: {
'click': '{#open}'
}
}
}],
},
methods: {
open: function() {
this.inherited();
var hostname = this._node._label;
open('http://192.168.1.1/index.php?filter_RTR_NAME=' + hostname);
}
}
}

Content for Community-Ad
August's Community Spotlight Awards