Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
alertnative UI if using AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekziade committed Apr 8, 2013
1 parent c58526f commit a2692d0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
Binary file added marteau/web/media/ec2-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added marteau/web/media/ec2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 12 additions & 6 deletions marteau/web/templates/index.mako
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,19 @@ Dude. No workers, no chocolate.

<div id="nodes" class="resource">
<span>Nodes</span> <a href="/nodes">manage</a>
%for node in nodes:
<div>${node.name}</div>
%endfor
%if not nodes:
<div>
C'mon, I need some boxes.
%if request.registry.settings['aws']:
<div>
<img src="/media/ec2-small.png"/><br/> Powered by AWS.
</div>
%else:
%for node in nodes:
<div>${node.name}</div>
%endfor
%if not nodes:
<div>
C'mon, I need some boxes.
</div>
%endif
%endif
</div>

Expand Down
9 changes: 9 additions & 0 deletions marteau/web/templates/nodes.mako
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<%inherit file="base.mako"/>

%if request.registry.settings['aws']:
<div>
<p>Manage your AWS environment.</p>
<a href="https://console.aws.amazon.com/ec2/v2/home"> <img src="/media/ec2.png"/></a>
</div>

%else:

<div class="smallform resource">
<form action="/nodes" method="POST">
Expand Down Expand Up @@ -57,3 +64,5 @@
%endif

</div>

%endif

0 comments on commit a2692d0

Please sign in to comment.