Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit 600cf4d

Browse files
authored
remove abtest, use tabs version only, log tab if pageType is logs, meta_data_5 removal (#444)
1 parent a15372e commit 600cf4d

3 files changed

Lines changed: 54 additions & 100 deletions

File tree

api_server/modules/apiweb/newrelic_ide_redirect_request.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const { defaultCookieName, ides} = require('./config');
88
class NewRelicIdeRedirectRequest extends IdeRedirectRequest {
99
constructor(options) {
1010
super(options);
11-
this.abTest = Math.random() < 0.5 ? "feature_tabs" : "feature_bullets";
11+
this.pageType = ''
1212
}
1313

1414
async prepareTemplateProps () {
@@ -26,22 +26,22 @@ class NewRelicIdeRedirectRequest extends IdeRedirectRequest {
2626
let pageType, pageWhat, analyticsContentType, entityId, itemGuid;
2727
switch (this.redirectType) {
2828
case 'error':
29-
pageType = 'errorsinbox';
29+
this.pageType = 'errorsinbox';
3030
pageWhat = 'ErrorsInbox';
3131
analyticsContentType = 'error';
3232
itemGuid = this.parsedPayload.errorGroupGuid;
3333
this.showVideo = true;
3434
break;
3535
case 'span':
36-
pageType = 'span';
36+
this.pageType = 'span';
3737
pageWhat = 'Span';
3838
analyticsContentType = 'span';
3939
entityId = this.parsedPayload.spanId;
4040
itemGuid = this.parsedPayload.spanId;
4141
this.showVideo = false;
4242
break;
4343
case 'logs':
44-
pageType = 'logs';
44+
this.pageType = 'logs';
4545
pageWhat = 'Logs';
4646
analyticsContentType = 'logs';
4747
entityId = this.parsedPayload.entityId;
@@ -53,8 +53,7 @@ class NewRelicIdeRedirectRequest extends IdeRedirectRequest {
5353
}
5454
const launcherModel = this.createLauncherModel('');
5555
this.templateProps = {
56-
abTest: this.abTest,
57-
pageType,
56+
pageType: this.pageType,
5857
pageWhat,
5958
analyticsContentType,
6059
launchIde: this.parsedPayload?.ide === '' ? 'default' : this.parsedPayload?.ide,
@@ -113,11 +112,11 @@ class NewRelicIdeRedirectRequest extends IdeRedirectRequest {
113112
}
114113
}).bind(this))();
115114
const result = {
116-
abTest: this.abTest,
117115
environment,
118116
ides: ides,
119117
src: decodeURIComponent(this.parsedPayload.src || ''),
120118
csrf: this.request.csrfToken(),
119+
pageType: this.pageType,
121120
showVideo: this.showVideo,
122121
...lastOrigin
123122
};

api_server/modules/apiweb/templates/ide_redirect.hbs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"meta_data_2": "source: {{src}}",
1818
"meta_data_3": "new_to_codestream: {{newToCodeStream}}",
1919
"meta_data_4": "item_guid: {{itemGuid}}",
20-
"meta_data_5": "ab_test_version: {{abTest}}",
2120
}, "{{nrUserId}}");
2221
}();
2322
</script>

api_server/modules/apiweb/templates/partial_launcher_detailed.hbs

Lines changed: 48 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -629,117 +629,71 @@ function onIdeSelected(e, moniker) {
629629
</div>
630630
</div>
631631
</div>
632-
{{#if (eq abTest "feature_tabs")}}
633-
<div class="content-body-container">
634-
<h4 style="text-align: center" class="content-body-header">
635-
All the power of New Relic, right in your IDE
636-
</h4>
637-
<div>
638-
Install New Relic's CodeStream IDE extension to see how the services built from your code
639-
are performing, and access powerful tools for identifying and investigating performance issues.
640-
</div>
632+
<div class="content-body-container">
633+
<h4 style="text-align: center" class="content-body-header">
634+
All the power of New Relic, right in your IDE
635+
</h4>
636+
<div>
637+
Install New Relic's CodeStream IDE extension to see how the services built from your code
638+
are performing, and access powerful tools for identifying and investigating performance issues.
639+
</div>
641640

642-
<div class="content-body-tab-container">
643-
<div style="width: 17%" class="content-body-tab-header" onclick="openTab(event, 'content-body-tab1')">
644-
<svg class="content-body-tab-icon" style="margin-top: -5px; width: 16px; fill: rgb(220, 223, 228)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" focusable="false"><path fill-rule="evenodd" d="M4.446 1h7.108c.377 0 .747.114 1.067.327a2.131 2.131 0 01.747.882l2.576 5.534A.61.61 0 0116 8v4.82c0 .578-.213 1.133-.594 1.541-.38.41-.895.639-1.433.639H2.027c-.538 0-1.053-.23-1.433-.639A2.267 2.267 0 010 12.82V8c0-.09.02-.177.056-.257L2.632 2.21c.168-.363.426-.669.747-.883.32-.213.69-.327 1.067-.327zm0 1.148a.91.91 0 00-.505.155 1.01 1.01 0 00-.354.418v.001l-2.19 4.704h3.616c.179 0 .345.096.444.256l1.335 2.154h2.416l1.335-2.154a.524.524 0 01.444-.256h3.616l-2.19-4.704v-.001a1.009 1.009 0 00-.354-.418.91.91 0 00-.505-.155m3.38 6.426h-3.662l-1.335 2.154a.524.524 0 01-.444.256H6.507a.524.524 0 01-.444-.256L4.728 8.574H1.067v4.246c0 .274.1.536.28.73.18.194.425.302.68.302h11.946a.928.928 0 00.68-.302c.18-.194.28-.456.28-.73V8.574z" clip-rule="evenodd"></path></svg>
645-
Errors
646-
</div>
647-
<div style="width: 17%" class="content-body-tab-header" onclick="openTab(event, 'content-body-tab2')">
648-
<svg class="content-body-tab-icon" style="margin-top: -5px; width: 16px; fill: rgb(220, 223, 228)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" focusable="false"><path fill-rule="evenodd" d="M7.7 0H2v15h11V5.3L7.7 0zm3.6 5H8V1.7L11.3 5zM3 1v13h9V6H7V1H3zm2 7h5v1H5V8zm3 3H5v1h3v-1z" clip-rule="evenodd"></path></svg>
649-
Logs
650-
</div>
651-
<div style="width: 29%" class="content-body-tab-header" onclick="openTab(event, 'content-body-tab3')">
652-
<svg class="content-body-tab-icon" style="margin-top: -5px; width: 16px; fill: rgb(220, 223, 228)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" focusable="false"><path fill-rule="evenodd" d="M13 1H2C.9 1 0 1.9 0 3v10c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm1 12c0 .6-.4 1-1 1H2c-.6 0-1-.4-1-1V5h13v8zM1 4h13V3c0-.6-.4-1-1-1H2c-.6 0-1 .4-1 1v1zm3.4 8.4l2.8-2.9-2.8-2.9-.8.8 2.2 2.1-2.2 2.1.8.8zM12 11H8v1h4v-1z" clip-rule="evenodd"></path></svg>
653-
NRQL Queries
654-
</div>
655-
<div style="width: 32%" class="content-body-tab-header" onclick="openTab(event, 'content-body-tab4')">
656-
<svg class="content-body-tab-icon" style="margin-top: -5px; width: 16px; fill: rgb(220, 223, 228)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" focusable="false"><path fill-rule="evenodd" d="M9 12v3H1v-3h8zm-1 1H2v1h6v-1zm4-6v3H1V7h11zm-1 1H2v1h9V8zm4-6v3H1V2h14zm-1 1H2v1h12V3z" clip-rule="evenodd"></path></svg>
657-
Code Performance
658-
</div>
641+
<div class="content-body-tab-container">
642+
<div style="width: 17%" class="content-body-tab-header" onclick="openTab(event, 'content-body-tab1')">
643+
<svg class="content-body-tab-icon" style="margin-top: -5px; width: 16px; fill: rgb(220, 223, 228)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" focusable="false"><path fill-rule="evenodd" d="M4.446 1h7.108c.377 0 .747.114 1.067.327a2.131 2.131 0 01.747.882l2.576 5.534A.61.61 0 0116 8v4.82c0 .578-.213 1.133-.594 1.541-.38.41-.895.639-1.433.639H2.027c-.538 0-1.053-.23-1.433-.639A2.267 2.267 0 010 12.82V8c0-.09.02-.177.056-.257L2.632 2.21c.168-.363.426-.669.747-.883.32-.213.69-.327 1.067-.327zm0 1.148a.91.91 0 00-.505.155 1.01 1.01 0 00-.354.418v.001l-2.19 4.704h3.616c.179 0 .345.096.444.256l1.335 2.154h2.416l1.335-2.154a.524.524 0 01.444-.256h3.616l-2.19-4.704v-.001a1.009 1.009 0 00-.354-.418.91.91 0 00-.505-.155m3.38 6.426h-3.662l-1.335 2.154a.524.524 0 01-.444.256H6.507a.524.524 0 01-.444-.256L4.728 8.574H1.067v4.246c0 .274.1.536.28.73.18.194.425.302.68.302h11.946a.928.928 0 00.68-.302c.18-.194.28-.456.28-.73V8.574z" clip-rule="evenodd"></path></svg>
644+
Errors
659645
</div>
660-
661-
<div class="content-body-tab" id="content-body-tab1">
662-
<div class="content-body-copy">
663-
Use the frames of the stack trace to navigate the code. Leverage the power of New Relic AI, and the help of
664-
your teammates, to collaborate on the investigation.
665-
</div>
666-
<div>
667-
<img class="observability-gif" src="https://raw.githubusercontent.com/TeamCodeStream/CodeStream/develop/images/animated/ErrorsAI-VSC.gif" alt="CodeStream Observability" />
668-
</div>
646+
<div style="width: 17%" class="content-body-tab-header" onclick="openTab(event, 'content-body-tab2')">
647+
<svg class="content-body-tab-icon" style="margin-top: -5px; width: 16px; fill: rgb(220, 223, 228)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" focusable="false"><path fill-rule="evenodd" d="M7.7 0H2v15h11V5.3L7.7 0zm3.6 5H8V1.7L11.3 5zM3 1v13h9V6H7V1H3zm2 7h5v1H5V8zm3 3H5v1h3v-1z" clip-rule="evenodd"></path></svg>
648+
Logs
669649
</div>
670-
<div class="content-body-tab" id="content-body-tab2">
671-
<div class="content-body-copy">
672-
Search logs for your APM or OTel services, or even an Infra container. Intiate a log search
673-
directly from specific log lines in your code.
674-
</div>
675-
<div>
676-
<img class="observability-gif" src="https://images.codestream.com/misc/redirect-logs.png" />
677-
</div>
650+
<div style="width: 29%" class="content-body-tab-header" onclick="openTab(event, 'content-body-tab3')">
651+
<svg class="content-body-tab-icon" style="margin-top: -5px; width: 16px; fill: rgb(220, 223, 228)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" focusable="false"><path fill-rule="evenodd" d="M13 1H2C.9 1 0 1.9 0 3v10c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm1 12c0 .6-.4 1-1 1H2c-.6 0-1-.4-1-1V5h13v8zM1 4h13V3c0-.6-.4-1-1-1H2c-.6 0-1 .4-1 1v1zm3.4 8.4l2.8-2.9-2.8-2.9-.8.8 2.2 2.1-2.2 2.1.8.8zM12 11H8v1h4v-1z" clip-rule="evenodd"></path></svg>
652+
NRQL Queries
678653
</div>
679-
<div class="content-body-tab" id="content-body-tab3">
680-
<div class="content-body-copy">
681-
Run queries right from your IDE, with auto-complete, visualizations, and export. Share commonly
682-
used queries in .nrql files added to your repo, and run queries right from the file.
683-
</div>
684-
<div>
685-
<img class="observability-gif" src="https://images.codestream.com/misc/redirect-queries.png" />
686-
</div>
687-
</div>
688-
<div class="content-body-tab" id="content-body-tab4">
689-
<div class="content-body-copy">
690-
Identify transactions that are exhibiting performance problems since your last release, and drill down
691-
into specific methods, database operations or external services that are at the root of the problem.
692-
</div>
693-
<div>
694-
<img class="observability-gif" src="https://images.codestream.com/misc/redirect-anomalies.png" />
695-
</div>
654+
<div style="width: 32%" class="content-body-tab-header" onclick="openTab(event, 'content-body-tab4')">
655+
<svg class="content-body-tab-icon" style="margin-top: -5px; width: 16px; fill: rgb(220, 223, 228)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" focusable="false"><path fill-rule="evenodd" d="M9 12v3H1v-3h8zm-1 1H2v1h6v-1zm4-6v3H1V7h11zm-1 1H2v1h9V8zm4-6v3H1V2h14zm-1 1H2v1h12V3z" clip-rule="evenodd"></path></svg>
656+
Code Performance
696657
</div>
697658
</div>
698-
{{/if}}
699659

700-
{{#if (eq abTest "feature_bullets")}}
701-
<div class="content-body-container">
702-
<h4 class="content-body-header">
703-
All the power of New Relic, right in your IDE
704-
</h4>
705-
<div>
706-
Install New Relic's CodeStream IDE extension to see how the services built from your code
707-
are performing, and access powerful tools for identifying and investigating performance issues.
660+
<div class="content-body-tab" id="content-body-tab1">
661+
<div class="content-body-copy">
662+
Use the frames of the stack trace to navigate the code. Leverage the power of New Relic AI, and the help of
663+
your teammates, to collaborate on the investigation.
708664
</div>
709-
<h4 class="content-body-section-header">
710-
<svg style="margin-top: -5px; width: 22px; fill: rgb(220, 223, 228)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" focusable="false"><path fill-rule="evenodd" d="M7.7 0H2v15h11V5.3L7.7 0zm3.6 5H8V1.7L11.3 5zM3 1v13h9V6H7V1H3zm2 7h5v1H5V8zm3 3H5v1h3v-1z" clip-rule="evenodd"></path></svg>
711-
Search Logs
712-
</h4>
713665
<div>
666+
<img class="observability-gif" src="https://raw.githubusercontent.com/TeamCodeStream/CodeStream/develop/images/animated/ErrorsAI-VSC.gif" alt="CodeStream Observability" />
667+
</div>
668+
</div>
669+
<div class="content-body-tab" id="content-body-tab2">
670+
<div class="content-body-copy">
714671
Search logs for your APM or OTel services, or even an Infra container. Intiate a log search
715672
directly from specific log lines in your code.
716673
</div>
717-
<h4 class="content-body-section-header">
718-
<svg style="margin-top: -5px; width: 22px; fill: rgb(220, 223, 228)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" focusable="false"><path fill-rule="evenodd" d="M13 1H2C.9 1 0 1.9 0 3v10c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm1 12c0 .6-.4 1-1 1H2c-.6 0-1-.4-1-1V5h13v8zM1 4h13V3c0-.6-.4-1-1-1H2c-.6 0-1 .4-1 1v1zm3.4 8.4l2.8-2.9-2.8-2.9-.8.8 2.2 2.1-2.2 2.1.8.8zM12 11H8v1h4v-1z" clip-rule="evenodd"></path></svg>
719-
Run NRQL Queries
720-
</h4>
721674
<div>
675+
<img class="observability-gif" src="https://images.codestream.com/misc/redirect-logs.png" />
676+
</div>
677+
</div>
678+
<div class="content-body-tab" id="content-body-tab3">
679+
<div class="content-body-copy">
722680
Run queries right from your IDE, with auto-complete, visualizations, and export. Share commonly
723681
used queries in .nrql files added to your repo, and run queries right from the file.
724682
</div>
725-
<h4 class="content-body-section-header">
726-
<svg style="margin-top: -5px; width: 22px; fill: rgb(220, 223, 228)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" focusable="false"><path fill-rule="evenodd" d="M4.446 1h7.108c.377 0 .747.114 1.067.327a2.131 2.131 0 01.747.882l2.576 5.534A.61.61 0 0116 8v4.82c0 .578-.213 1.133-.594 1.541-.38.41-.895.639-1.433.639H2.027c-.538 0-1.053-.23-1.433-.639A2.267 2.267 0 010 12.82V8c0-.09.02-.177.056-.257L2.632 2.21c.168-.363.426-.669.747-.883.32-.213.69-.327 1.067-.327zm0 1.148a.91.91 0 00-.505.155 1.01 1.01 0 00-.354.418v.001l-2.19 4.704h3.616c.179 0 .345.096.444.256l1.335 2.154h2.416l1.335-2.154a.524.524 0 01.444-.256h3.616l-2.19-4.704v-.001a1.009 1.009 0 00-.354-.418.91.91 0 00-.505-.155m3.38 6.426h-3.662l-1.335 2.154a.524.524 0 01-.444.256H6.507a.524.524 0 01-.444-.256L4.728 8.574H1.067v4.246c0 .274.1.536.28.73.18.194.425.302.68.302h11.946a.928.928 0 00.68-.302c.18-.194.28-.456.28-.73V8.574z" clip-rule="evenodd"></path></svg>
727-
Investigate Errors
728-
</h4>
729683
<div>
730-
Use the frames of the stack trace to navigate the code. Leverage the power of New Relic AI, and the help of
731-
your teammates, to collaborate on the investigation.
684+
<img class="observability-gif" src="https://images.codestream.com/misc/redirect-queries.png" />
732685
</div>
733-
<h4 class="content-body-section-header">
734-
<svg style="margin-top: -5px; width: 22px; fill: rgb(220, 223, 228)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" focusable="false"><path fill-rule="evenodd" d="M9 12v3H1v-3h8zm-1 1H2v1h6v-1zm4-6v3H1V7h11zm-1 1H2v1h9V8zm4-6v3H1V2h14zm-1 1H2v1h12V3z" clip-rule="evenodd"></path></svg>
735-
Identify Poorly Performing Code
736-
</h4>
737-
<div>
686+
</div>
687+
<div class="content-body-tab" id="content-body-tab4">
688+
<div class="content-body-copy">
738689
Identify transactions that are exhibiting performance problems since your last release, and drill down
739690
into specific methods, database operations or external services that are at the root of the problem.
740691
</div>
692+
<div>
693+
<img class="observability-gif" src="https://images.codestream.com/misc/redirect-anomalies.png" />
694+
</div>
741695
</div>
742-
{{/if}}
696+
</div>
743697
</div>
744698
<script src="//fast.wistia.com/embed/medias/aei2dq75qi.jsonp" async></script>
745699
<script src="//fast.wistia.com/assets/external/E-v1.js" async></script>
@@ -762,9 +716,11 @@ function onIdeSelected(e, moniker) {
762716
evt.currentTarget.classList.add("content-active-tab");
763717
}
764718
765-
// By default, display the first tab
766-
// @TODO - modify to open Logs by default if coming from
767-
if ("{{abTest}}" === "feature_tabs"){
719+
// Start on logs tab if coming from logs, otherwise default to errors tab
720+
if ("{{pageType}}" === "logs"){
721+
document.getElementById("content-body-tab2").style.display = "block";
722+
document.getElementsByClassName("content-body-tab-header")[1].classList.add("content-active-tab");
723+
} else {
768724
document.getElementById("content-body-tab1").style.display = "block";
769725
document.getElementsByClassName("content-body-tab-header")[0].classList.add("content-active-tab");
770726
}

0 commit comments

Comments
 (0)