-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ui patch agent show #1326
ui patch agent show #1326
Changes from 4 commits
7fd6ff3
6f46da0
fdbb055
e2f2f47
e6b96b1
caa4c3e
c96e402
6e26e9f
7a9b405
e86045c
f3209c0
61b8e0a
b7f906e
60db396
6b212c8
508fe28
b226a78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,17 +161,26 @@ | |
<b>Options:</b> | ||
<pre><%= Utils.pretty_jsonify @agent.options || {} %></pre> | ||
</p> | ||
|
||
<p id="memory" data-agent-id="<%= @agent.id %>"> | ||
<b>Memory:</b> | ||
<% if @agent.memory.present? %> | ||
<i class="fa fa-spinner fa-pulse spinner"></i> | ||
<i class="fa fa-trash action-icon clear"></i> | ||
<% end %> | ||
<pre class="memory"><%= Utils.pretty_jsonify @agent.memory || {} %></pre> | ||
</p> | ||
<button type="submit" class="btn btn-default" id="target">Hide or Reveal Memory</button> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you rename $('#toggle-memory').click ->
if $('#toggle-memory').text() == 'Show Memory"
$('#toggle-memory').text("Hide Memory")
$('#memory').removeClass 'hidden'
else
$('#toggle-memory').text("Show Memory")
$('#memory').addClass 'hidden' Finally, you don't need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you use the new, longer CoffeeScript though, define it further down in the file like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. with |
||
<div id="memorytoggle" class="hidden"> | ||
<p id="memory" data-agent-id="<%= @agent.id %>"> | ||
<b>Memory:</b> | ||
<% if @agent.memory.present? %> | ||
<i class="fa fa-spinner fa-pulse spinner"></i> | ||
<i class="fa fa-trash action-icon clear"></i> | ||
<% end %> | ||
<pre class="memory"><%= Utils.pretty_jsonify @agent.memory || {} %></pre> | ||
</p> | ||
</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You added one opening |
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
<%#= javascript_tag do %> | ||
<!-- $( "#target" ).click(function() { | ||
$("#memorytoggle").toggleClass("hidden"); | ||
}); --> | ||
<%#end %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not work here even though I tried both passing in a pure js and converted it to coffee. However it works in show.html.erb.