Skip to content
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

Add compose testing #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion public/css/addon.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@ body {
background: #fff;
}

section + section {
margin-top: 9px;
}

.section-manage {
margin-left: 17px;
}

.container {
display: inline-block;
}

.container + .container::before {
content: ',';
display: inline-block;
padding-right: 4px;
}

.icon-status {
margin-left: 2px;
margin-right: 6px;
Expand All @@ -13,5 +31,4 @@ body {

.link {
display: inline-block;
margin-top: 9px;
}
43 changes: 22 additions & 21 deletions views/web-panel.hbs
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
{{!< layout}}
{{#if instance}}
{{#if isTestingOnly}}
<div>Tests {{{testResults}}} <img src="https://s3-us-west-1.amazonaws.com/runnable-design/status-{{{testColor}}}.svg" title="{{{testResults}}}" width="9" height="9" class="icon-status">{{{repoName}}}/{{{instanceName}}}.</div>
<div><a href=http://{{{url}}} target="_blank" class="link">View on Runnable</a></div>
{{else}}
{{#if status}}
{{!--
possible status colors:
"green"
"orange"
"red"
"gray"
--}}
<div>{{{ state }}} <img src="https://s3-us-west-1.amazonaws.com/runnable-design/status-{{{statusColor}}}.svg" title="{{{status}}}" width="9" height="9" class="icon-status">{{{repoName}}}/{{{instanceName}}}.</div>
<div><a href="{{{environmentUrl}}}" target="_blank" class="link">View output</a></div>
<div><a href=http://{{{url}}} target="_blank" class="link">Manage on Runnable</a></div>
{{else}}
{{!-- if no status (between building and running) --}}
<div>{{{ state }}} <img src="https://s3-us-west-1.amazonaws.com/runnable-design/status-{{{statusColor}}}.svg" title="{{{status}}}" width="9" height="9" class="icon-status">{{{repoName}}}/{{{instanceName}}}</div>
<div><a href="{{{environmentUrl}}}" target="_blank" class="link">View output</a></div>
<div><a href=http://{{{url}}} target="_blank" class="link">Manage on Runnable</a></div>
{{/if}}
{{!-- staging containers --}}
<section>
{{#each container}}
<div class="container">
<img src="https://s3-us-west-1.amazonaws.com/runnable-design/status-{{{statusColor}}}.svg" title="{{{status}}}" width="9" height="9" class="icon-status">
<a href="{{{environmentUrl}}}" target="_blank" class="link">{{{instanceName}}}</a>
</div>
{{/each}}
</section>

{{!-- conditionally show test results --}}
{{#if testResults}}
<section>
<img src="https://s3-us-west-1.amazonaws.com/runnable-design/status-{{{testColor}}}.svg" title="{{{testResults}}}" width="9" height="9" class="icon-status">
<a href="testUrl" class="link" target="_blank">{{{testResults}}}</a>
</section>
{{/if}}

{{!-- manage on runnable url --}}
<section class="section-manage">
<a href=http://{{{url}}} target="_blank" class="link">Manage on Runnable</a>
</section>
{{/if}}

{{#unless instance}}
<div><span class="emoji">🔭</span> {{{text}}}</div>
<div><a href="//runnable.com/" class="link" target="_blank">Go to Runnable</a></div>
Expand Down