Skip to content

Commit

Permalink
feat: added a settings option to show/hide the refresh button on the …
Browse files Browse the repository at this point in the history
…toolbar

#22
  • Loading branch information
Airam committed Sep 6, 2023
1 parent 4cc61ac commit a0a3f44
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/images/ReleaseBadge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public ActionResult Index()
ViewBag.Height = GetSetting("PowerBIEmbedded_Height");
ViewBag.PageName = GetSetting("PowerBIEmbedded_PageName");
ViewBag.BackgroundImageUrl = GetSetting("PowerBIEmbedded_BackgroundImageUrl", "");

ViewBag.RefreshVisible = bool.Parse(GetSetting("PowerBIEmbedded_RefreshVisible", "true"));


// Sets the reports page on the viewbag
Expand Down
4 changes: 4 additions & 0 deletions src/DotNetNuke.PowerBI/Controllers/SettingsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public SettingsModel()
ApplicationInsightsEnabled = false;
BackgroundImageUrl = "";
Height = "";
RefreshVisible = true;
}
public string SettingsGroupId { get; set; }
public string ContentItemId { get; set; }
Expand All @@ -51,6 +52,7 @@ public SettingsModel()
public bool PrintVisible { get; set; }
public bool FullScreenVisible { get; set; }
public bool BookmarksVisible { get; set; }
public bool RefreshVisible { get; set; }
public bool ApplicationInsightsEnabled { get; set; }
public string BackgroundImageUrl { get; set; }
public string Height { get; set; }
Expand Down Expand Up @@ -91,6 +93,7 @@ public ActionResult Index()
CustomExtensionLibrary = GetSetting("PowerBIEmbedded_CustomExtensionLibrary", ""),
ApplicationInsightsEnabled = bool.Parse(GetSetting("PowerBIEmbedded_ApplicationInsightsEnabled", "False")),
BackgroundImageUrl = GetSetting("PowerBIEmbedded_BackgroundImageUrl", ""),
RefreshVisible = bool.Parse(GetSetting("PowerBIEmbedded_RefreshVisible", "True")),
};

if (model.IsContentView)
Expand Down Expand Up @@ -167,6 +170,7 @@ public ActionResult Index(SettingsModel settings)
ModuleController.Instance.UpdateTabModuleSetting(this.ModuleContext.TabModuleId, "PowerBIEmbedded_PrintVisible", settings.PrintVisible.ToString());
ModuleController.Instance.UpdateTabModuleSetting(this.ModuleContext.TabModuleId, "PowerBIEmbedded_FullScreenVisible", settings.FullScreenVisible.ToString());
ModuleController.Instance.UpdateTabModuleSetting(this.ModuleContext.TabModuleId, "PowerBIEmbedded_BookmarksVisible", settings.BookmarksVisible.ToString());
ModuleController.Instance.UpdateTabModuleSetting(this.ModuleContext.TabModuleId, "PowerBIEmbedded_RefreshVisible", settings.RefreshVisible.ToString());
ModuleController.Instance.UpdateTabModuleSetting(this.ModuleContext.TabModuleId, "PowerBIEmbedded_UserProperty", settings.UserProperty);
ModuleController.Instance.UpdateTabModuleSetting(this.ModuleContext.TabModuleId, "PowerBIEmbedded_CustomUserProperty", settings.CustomUserProperty);
ModuleController.Instance.UpdateTabModuleSetting(this.ModuleContext.TabModuleId, "PowerBIEmbedded_CustomExtensionLibrary", settings.CustomExtensionLibrary);
Expand Down
6 changes: 3 additions & 3 deletions src/DotNetNuke.PowerBI/DotNetNuke.PowerBI.dnn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="PowerBIEmbeddedList" type="Module" version="01.01.00">
<package name="PowerBIEmbeddedList" type="Module" version="01.01.01">
<friendlyName>PowerBI Embedded Content List</friendlyName>
<description>A set of modules to embed PowerBI Embedded dashboards and reports into a DNN Platform installation.</description>
<iconFile>~/DesktopModules/MVC/PowerBIEmbedded/images/powerbi.png</iconFile>
Expand Down Expand Up @@ -171,7 +171,7 @@
</component>
</components>
</package>
<package name="PowerBIEmbeddedContent" type="Module" version="01.01.00">
<package name="PowerBIEmbeddedContent" type="Module" version="01.01.01">
<friendlyName>PowerBI Embedded Content View</friendlyName>
<description>A set of modules to embed PowerBI Embedded dashboards and reports into a DNN Platform installation.</description>
<iconFile>~/DesktopModules/MVC/PowerBIEmbedded/images/powerbi.png</iconFile>
Expand Down Expand Up @@ -226,7 +226,7 @@
</component>
</components>
</package>
<package name="PowerBIEmbeddedCalendar" type="Module" version="01.01.00">
<package name="PowerBIEmbeddedCalendar" type="Module" version="01.01.01">
<friendlyName>PowerBI Embedded Calendar View</friendlyName>
<description>A set of modules to embed PowerBI Embedded dashboards and reports into a DNN Platform installation.</description>
<iconFile>~/DesktopModules/MVC/PowerBIEmbedded/images/powerbi.png</iconFile>
Expand Down
4 changes: 2 additions & 2 deletions src/DotNetNuke.PowerBI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("01.01.00.*")]
[assembly: AssemblyVersion("01.01.01.*")]
#pragma warning disable CS7035 // The specified version string does not conform to the recommended format - major.minor.build.revision
[assembly: AssemblyFileVersion("01.01.00.*")]
[assembly: AssemblyFileVersion("01.01.01.*")]
#pragma warning restore CS7035 // The specified version string does not conform to the recommended format - major.minor.build.revision
3 changes: 3 additions & 0 deletions src/DotNetNuke.PowerBI/ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,8 @@
<b>Version 1.1.0</b>
<p>feat: added the edit permission to be able to edit reports.</p>
<p>feat: added a new config parameter "Hide Visualizers and Data when editing" to hide those panes while editing.</p>

<b>Version 1.1.1</b>
<p>feat: added option to hide refresh buttons on the toolbar.</p>

</div>
9 changes: 6 additions & 3 deletions src/DotNetNuke.PowerBI/Views/ContentView/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@
{
<a href="#" class="fullscreen" title="Full screen" data-bind="click: pbifullscreen"></a>
}

<a href="#" class="refresh" title="Refresh visual objects and data" data-bind="click: pbirefresh"></a>
<a href="#" class="reload" title="Reload visual and filters" data-bind="click: pbireload"></a>

@if (ViewBag.RefreshVisible)
{
<a href="#" class="refresh" title="Refresh visual objects and data" data-bind="click: pbirefresh"></a>
<a href="#" class="reload" title="Reload visual and filters" data-bind="click: pbireload"></a>
}
</div>
}

Expand Down
6 changes: 6 additions & 0 deletions src/DotNetNuke.PowerBI/Views/Settings/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@
@Html.CheckBoxFor(m => m.ToolbarVisible, true)
</div>
</div>
<div class="dnnFormItem">
<div class="leftGroup" >
<label>Refresh Visible</label>
@Html.CheckBoxFor(m => m.RefreshVisible, true)
</div>
</div>
<div class="dnnFormItem">
<div class="leftGroup">
<label>Print Visible</label>
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit a0a3f44

Please sign in to comment.