diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-11-16 23:07:38 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-11-20 18:30:01 +0300 |
commit | 5b9495c5db851ec8d1ca2cc6da0da12d6b161130 (patch) | |
tree | f622611ceb4caeda70212a52438a2c9428511a68 /app/assets/javascripts/performance_bar | |
parent | 29d129d21718f8aa9c7d58a8b403cf91f6d4addd (diff) |
Prettify all the things
Diffstat (limited to 'app/assets/javascripts/performance_bar')
4 files changed, 23 insertions, 82 deletions
diff --git a/app/assets/javascripts/performance_bar/components/detailed_metric.vue b/app/assets/javascripts/performance_bar/components/detailed_metric.vue index dc7d6d29b8f..c729198c1d3 100644 --- a/app/assets/javascripts/performance_bar/components/detailed_metric.vue +++ b/app/assets/javascripts/performance_bar/components/detailed_metric.vue @@ -38,20 +38,14 @@ export default { }; </script> <template> - <div - v-if="currentRequest.details" - :id="`peek-view-${metric}`" - class="view" - > + <div v-if="currentRequest.details" :id="`peek-view-${metric}`" class="view"> <button :data-target="`#modal-peek-${metric}-details`" class="btn-blank btn-link bold" type="button" data-toggle="modal" > - {{ metricDetails.duration }} - / - {{ metricDetails.calls }} + {{ metricDetails.duration }} / {{ metricDetails.calls }} </button> <gl-modal :id="`modal-peek-${metric}-details`" @@ -59,35 +53,23 @@ export default { modal-size="xl" class="performance-bar-modal" > - <table - class="table" - > + <table class="table"> <template v-if="detailsList.length"> - <tr - v-for="(item, index) in detailsList" - :key="index" - > - <td><strong>{{ item.duration }}ms</strong></td> - <td - v-for="key in keys" - :key="key" - class="break-word" - > - {{ item[key] }} + <tr v-for="(item, index) in detailsList" :key="index"> + <td> + <strong>{{ item.duration }}ms</strong> </td> + <td v-for="key in keys" :key="key" class="break-word">{{ item[key] }}</td> </tr> </template> <template v-else> <tr> - <td> - No {{ header.toLowerCase() }} for this request. - </td> + <td>No {{ header.toLowerCase() }} for this request.</td> </tr> </template> </table> - <div slot="footer"> - </div> + <div slot="footer"></div> </gl-modal> {{ metric }} </div> diff --git a/app/assets/javascripts/performance_bar/components/performance_bar_app.vue b/app/assets/javascripts/performance_bar/components/performance_bar_app.vue index 300d453c174..74faa35358d 100644 --- a/app/assets/javascripts/performance_bar/components/performance_bar_app.vue +++ b/app/assets/javascripts/performance_bar/components/performance_bar_app.vue @@ -91,25 +91,15 @@ export default { }; </script> <template> - <div - id="js-peek" - :class="env" - > - <div - v-if="currentRequest" - class="d-flex container-fluid container-limited" - > - <div - id="peek-view-host" - class="view" - > + <div id="js-peek" :class="env"> + <div v-if="currentRequest" class="d-flex container-fluid container-limited"> + <div id="peek-view-host" class="view"> <span v-if="hasHost" class="current-host" - :class="{ 'canary' : currentRequest.details.host.canary }" + :class="{ canary: currentRequest.details.host.canary }" > - <span v-html="birdEmoji"></span> - {{ currentRequest.details.host.hostname }} + <span v-html="birdEmoji"></span> {{ currentRequest.details.host.hostname }} </span> </div> <detailed-metric @@ -121,11 +111,7 @@ export default { :details="metric.details" :keys="metric.keys" /> - <div - v-if="initialRequest" - id="peek-view-rblineprof" - class="view" - > + <div v-if="initialRequest" id="peek-view-rblineprof" class="view"> <button v-if="lineProfileModal.length" class="btn-link btn-blank" @@ -134,12 +120,7 @@ export default { > profile </button> - <a - v-else - :href="profileUrl" - > - profile - </a> + <a v-else :href="profileUrl"> profile </a> </div> <simple-metric v-for="metric in $options.simpleMetrics" @@ -147,18 +128,10 @@ export default { :current-request="currentRequest" :metric="metric" /> - <div - id="peek-view-gc" - class="view" - > - <span - v-if="currentRequest.details" - class="bold" - > - <span title="Invoke Time">{{ currentRequest.details.gc.gc_time }}</span>ms - / - <span title="Invoke Count">{{ currentRequest.details.gc.invokes }}</span> - gc + <div id="peek-view-gc" class="view"> + <span v-if="currentRequest.details" class="bold"> + <span title="Invoke Time">{{ currentRequest.details.gc.gc_time }}</span + >ms / <span title="Invoke Count">{{ currentRequest.details.gc.invokes }}</span> gc </span> </div> <request-selector diff --git a/app/assets/javascripts/performance_bar/components/request_selector.vue b/app/assets/javascripts/performance_bar/components/request_selector.vue index ad74f7b38f9..fdb5c0d6939 100644 --- a/app/assets/javascripts/performance_bar/components/request_selector.vue +++ b/app/assets/javascripts/performance_bar/components/request_selector.vue @@ -37,11 +37,7 @@ export default { <template> <div id="peek-request-selector"> <select v-model="currentRequestId"> - <option - v-for="request in requests" - :key="request.id" - :value="request.id" - > + <option v-for="request in requests" :key="request.id" :value="request.id"> {{ truncatedUrl(request.url) }} </option> </select> diff --git a/app/assets/javascripts/performance_bar/components/simple_metric.vue b/app/assets/javascripts/performance_bar/components/simple_metric.vue index 7a558558c4d..358a57d5bc5 100644 --- a/app/assets/javascripts/performance_bar/components/simple_metric.vue +++ b/app/assets/javascripts/performance_bar/components/simple_metric.vue @@ -26,18 +26,8 @@ export default { }; </script> <template> - <div - :id="`peek-view-${metric}`" - class="view" - > - <span - v-if="currentRequest.details" - class="bold" - > - {{ duration }} - / - {{ calls }} - </span> + <div :id="`peek-view-${metric}`" class="view"> + <span v-if="currentRequest.details" class="bold"> {{ duration }} / {{ calls }} </span> {{ metric }} </div> </template> |