Skip to content

Commit 326cf13

Browse files
committed
Tweaks email attribute name and feature flags the dashboard link and page content.
1 parent 9d5b6d2 commit 326cf13

File tree

6 files changed

+26
-13
lines changed

6 files changed

+26
-13
lines changed

DigitalLearningSolutions.Web/Helpers/ExternalApis/TableauConnectionHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public string GetTableauJwt(string email)
4242
{ "exp", new DateTimeOffset(DateTime.UtcNow.AddMinutes(5)).ToUnixTimeSeconds() },
4343
{ "sub", user },
4444
{ "scp", new[] { "tableau:views:embed" } },
45-
{ "Email", email}
45+
{ "ExernalUserEmail", new [] { email } }
4646
};
4747
var token = new JwtSecurityToken(header, payload);
4848
var tokenHandler = new JwtSecurityTokenHandler();

DigitalLearningSolutions.Web/Helpers/FeatureFlags.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ public static class FeatureFlags
1414
public const string UserFeedbackBar = "UserFeedbackBar";
1515
public const string ShowSelfAssessmentProgressButtons = "ShowSelfAssessmentProgressButtons";
1616
public const string LoginWithLearningHub = "LoginWithLearningHub";
17+
public const string TableauSelfAssessmentDashboards = "TableauSelfAssessmentDashboards";
1718
}
1819
}

DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/SelfAssessmentReports/Index.cshtml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@using DigitalLearningSolutions.Web.Models.Enums
22
@using DigitalLearningSolutions.Web.ViewModels.TrackingSystem.Centre.Reports
3+
@using DigitalLearningSolutions.Web.Helpers
34
@model SelfAssessmentReportsViewModel
45
@{
56
ViewData["Title"] = "Self assessment reports";
@@ -18,10 +19,12 @@
1819
<span class="nhsuk-u-visually-hidden"> - </span>
1920
</span>@ViewData["Title"]
2021
</h1>
21-
@if (Model.SelfAssessmentSelects.Any())
22-
{
23-
<vc:action-link asp-controller="SelfAssessmentReports" asp-action="TableauCompetencyDashboard" asp-all-route-data="@new Dictionary<string, string>();" link-text="View Tableau supervised self assessments dashboard" />
24-
}
22+
<feature name="@(FeatureFlags.TableauSelfAssessmentDashboards)">
23+
@if (Model.SelfAssessmentSelects.Any())
24+
{
25+
<vc:action-link asp-controller="SelfAssessmentReports" asp-action="TableauCompetencyDashboard" asp-all-route-data="@new Dictionary<string, string>();" link-text="View Tableau supervised self assessments dashboard" />
26+
}
27+
</feature>
2528
<h2>Excel learner activity reports</h2>
2629
<p class="nhsuk-lede-text">Download Excel competency self assessments activity reports for your centre.</p>
2730
<ul>

DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/SelfAssessmentReports/TableauCompetencyDashboard.cshtml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
@{
1+
@using DigitalLearningSolutions.Web.Helpers
2+
@{
23
var tableauServerUrl = ViewBag.TableauServerUrl;
34
var workbookName = ViewBag.WorkbookName;
45
var viewName = ViewBag.ViewName;
@@ -16,11 +17,17 @@
1617
</a>
1718
</div>
1819
<h1>@ViewData["Title"]</h1>
20+
<feature name="@(FeatureFlags.TableauSelfAssessmentDashboards)">
1921
<tableau-viz id='tableau-viz'
2022
src='@srcUrl' token='@jwtToken' toolbar='bottom'>
23+
If the dashboard doesn't appear after a few seconds, <a href="#">reload the page</a>
2124
</tableau-viz>
22-
@section scripts {
23-
@* We are not using Yarn/npm for the Tableau JS becaue of errors during installation relating to a missing dependency *@
24-
<script type="module" src="@tableauServerUrl/javascripts/api/tableau.embedding.3.latest.min.js"></script>
25-
}
26-
25+
@section scripts {
26+
@* We are not using Yarn/npm for the Tableau JS becaue of errors during installation relating to a missing dependency *@
27+
<script type="module" src="@tableauServerUrl/javascripts/api/tableau.embedding.3.latest.min.js"></script>
28+
}
29+
</feature>
30+
<feature name="@(FeatureFlags.TableauSelfAssessmentDashboards)" negate="true">
31+
<h2>Oops! We are still working on this area of the site</h2>
32+
<p class="nhsuk-lede-text">This feature is under development and should be available soon.</p>
33+
</feature>

DigitalLearningSolutions.Web/appsettings.Production.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"UserFeedbackBar": true,
2323
"ExportQueryRowLimit": 250,
2424
"MaxBulkUploadRows": 200,
25-
"LoginWithLearningHub": true
25+
"LoginWithLearningHub": true,
26+
"TableauSelfAssessmentDashboards": false
2627
},
2728
"LearningHubOpenAPIBaseUrl": "https://learninghubnhsuk-openapi-prod.azurewebsites.net",
2829
"LearningHubReportAPIConfig": {

DigitalLearningSolutions.Web/appsettings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"UseSignposting": true,
1818
"PricingPage": true,
1919
"ShowSelfAssessmentProgressButtons": false,
20-
"LoginWithLearningHub": true
20+
"LoginWithLearningHub": true,
21+
"TableauSelfAssessmentDashboards": true
2122
},
2223
"LearningHubOpenAPIBaseUrl": "https://uks-learninghubnhsuk-openapi-test.azurewebsites.net",
2324
"LearningHubOpenAPIKey": "",

0 commit comments

Comments
 (0)