Skip to content

Commit 2496bab

Browse files
ipweblabVidas P
authored andcommitted
Fix: Take instructions out of ‘Options’ tooltip (most did not display)
1 parent 38cfae2 commit 2496bab

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

app/assets/stylesheets/agent.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,18 @@
161161
h1 {
162162
margin-top: 40px;
163163
}
164+
165+
p:first-of-type {
166+
color: white;
167+
}
168+
169+
a {
170+
text-decoration: underline;
171+
172+
&:hover {
173+
text-decoration: none;
174+
}
175+
}
164176
}
165177

166178
.cannot-be-scheduled,

app/views/agents/_options.erb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,19 @@
1515
<% else %>
1616
<div class="form-group">
1717
<%= label_tag :options, "Agent-specific Options" %>
18-
<%= icon_tag('fa-question-circle', 'data-toggle' => 'tooltip', 'data-html' => true, 'title' => "In this JSON hash, interpolation is available in almost all values using the Liquid templating language.<p>Available template variables include the following:<dl><dt><code>message</code>, <code>url</code>, etc.</dt><dd>Refers to the corresponding key's value of each incoming message's payload.</dd><dt><code>agent</code></dt><dd>Refers to the agent that created each incoming message. It has attributes like <code>type</code>, <code>name</code> and <code>options</code>, so <code>{{agent.type}}</code> will expand to <code>WebsiteAgent</code> if an incoming message is created by that agent.</dd></dl></p><p>To access user credentials, use the <code>credential</code> tag like this: <code>{% credential <em>bare_key_name</em> %}</code></p>") %>
18+
<%= icon_tag('fa-question-circle', 'data-toggle' => 'tooltip', 'data-html' => true, 'title' => "For more available options look at the documentation on the right.") %>
19+
<div class="small">
20+
<p>In this JSON hash, interpolation is available in almost all values using the Liquid templating language.</p>
21+
<p>Available template variables include the following:
22+
<dl>
23+
<dt><code>message</code>, <code>url</code>, etc.</dt>
24+
<dd>Refers to the corresponding key's value of each incoming message's payload.</dd>
25+
<dt><code>agent</code></dt>
26+
<dd>Refers to the agent that created each incoming message. It has attributes like <code>type</code>, <code>name</code> and <code>options</code>, so <code>{{agent.type}}</code> will expand to <code>WebsiteAgent</code> if an incoming message is created by that agent.</dd>
27+
</dl>
28+
</p>
29+
<p>To access user credentials, use the <code>credential</code> tag like this:<br><code>{% credential <em>bare_key_name</em> %}</code></p>
30+
</div>
1931
<textarea rows="15" id="agent_options" name="agent[options]" class="form-control"><%= JSON.pretty_generate((agent.new_record? && agent.options == {}) ? agent.default_options : agent.options) %></textarea>
2032
<div id="ace-agent-options" class="ace-editor" data-source="#agent_options" data-mode="ace/mode/json"></div>
2133
</div>

0 commit comments

Comments
 (0)