Skip to content

Commit

Permalink
Only render the HTTP response time and size components when the endpo…
Browse files Browse the repository at this point in the history
…int requested.

There are no endpoints requested when displaying the example responses, this causes the response time and size components cannot be rendered.
  • Loading branch information
davidhsianturi committed Nov 18, 2019
1 parent 9404b00 commit 71b7d38
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions resources/js/components/ResponseTabs.vue
Expand Up @@ -63,12 +63,14 @@ export default {
</ul>
</div>

<div class="ml-auto">
<div class="ml-auto px-3">
<http-status :response="response" />
<http-response-time :response="response" />
<http-response-size :response="response" />
<div class="inline-block px-1 text-gray-400" v-if="okToSave">|</div>
<button v-if="okToSave" class="inline-block py-2 pl-1 pr-4 text-sm text-primary focus:outline-none" @click="sendResponseData">Save response as example</button>
<http-response-time v-if="okToSave" :response="response" />
<http-response-size v-if="okToSave" :response="response" />
<div class="inline-block text-gray-300" v-if="okToSave">|</div>
<button v-if="okToSave"
class="inline-block py-2 px-1 text-sm text-primary focus:outline-none"
@click="sendResponseData">Save response as example</button>
</div>
</div>

Expand Down

0 comments on commit 71b7d38

Please sign in to comment.