Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31112.23
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoldBI.Embed.Sample", "BoldBI.Embed.Sample\BoldBI.Embed.Sample.csproj", "{6D5CD714-8E10-490B-A604-EC1EAC6207F0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6D5CD714-8E10-490B-A604-EC1EAC6207F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D5CD714-8E10-490B-A604-EC1EAC6207F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D5CD714-8E10-490B-A604-EC1EAC6207F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D5CD714-8E10-490B-A604-EC1EAC6207F0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {17ED8247-4B6E-42E3-930D-F78C333EADE9}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>BoldBI.Embed.Sample</RootNamespace>
</PropertyGroup>

<ItemGroup>
<Compile Remove="App_Data\**" />
<Compile Remove="wwwroot\lib\**" />
<Content Remove="App_Data\**" />
<Content Remove="wwwroot\lib\**" />
<EmbeddedResource Remove="App_Data\**" />
<EmbeddedResource Remove="wwwroot\lib\**" />
<None Remove="App_Data\**" />
<None Remove="wwwroot\lib\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
using System;
using System.Net.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.IO;
using System.Xml.Linq;

namespace BoldBI.Embed.Sample.Controllers
{
public class HomeController : Controller
{
public IActionResult Index()
{
return View("Index");
}

public class Employee
{
public string name { get; set; }
public int Empid { get; set; }
public string Department { get; set; }
public string Designation { get; set; }
}

[HttpGet]
[Route("GetJsonData")]
public IActionResult GetJsonData()
{
string department = Request.Headers["x-api-key"];

var mockData = new List<Employee>
{
new Employee { name = "Delta", Empid = 02, Department = "Sales", Designation = "Team Lead"},
new Employee{ name = "Brad", Empid = 03, Department = "HR",Designation = "Manager" },
new Employee{ name = "Harry", Empid = 04, Department = "Marketing", Designation = "Analyst" },
new Employee{ name = "Atos", Empid = 05, Department = "HR",Designation = "Team Lead" },
new Employee{ name = "Jane", Empid = 06, Department = "Marketing",Designation = "Team Lead" },
new Employee{ name = "Rachel", Empid = 07, Department = "Operations",Designation = "Manager" },
new Employee{ name = "Tom", Empid = 08, Department = "Marketing",Designation = "Senior Analyst" },
new Employee{ name = "Dory", Empid = 09, Department = "Marketing",Designation = "Junior Analyst" },
new Employee{ name = "Destiny", Empid = 10, Department = "Marketing",Designation = "Manager" },
new Employee{ name = "Smith", Empid = 11, Department = "Sales",Designation = "Analyst" },
new Employee{ name = "Philips", Empid = 12, Department = "Sales",Designation = "Analyst" },
new Employee{ name = "Kate", Empid = 13, Department = "Sales",Designation = "Senior Analyst" },
new Employee{ name = "Ferick", Empid = 14, Department = "Operations",Designation = "Executive" },
new Employee{ name = "Ferb", Empid = 15, Department = "Operations",Designation = "Executive" },
new Employee{ name = "Jill", Empid = 16, Department = "Operations",Designation = "Executive" },
new Employee{ name = "Jack", Empid = 17, Department = "HR",Designation = "Executive" },
new Employee{ name = "Nemo", Empid = 18, Department = "HR",Designation = "Executive" },
new Employee{ name = "Dory", Empid = 19, Department = "Sales",Designation = "Analyst" }

};

if (!string.IsNullOrEmpty(department))
{
// Perform filtering based on the department
mockData = mockData.FindAll(item => item.Department == department);
}

// Return JSON data
return new JsonResult(mockData);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");

app.Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:61377",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"BoldBI.Embed.Sample": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:5000"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@{
ViewBag.Title = "Home";
Layout = null;
}

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="~/css/site.css" />
</head>

<body>
<iframe src='http://localhost:49994/bi/site/site1/dashboards/a4ba5d55-01c8-4793-90ff-c194daf0dab3/Information%20Technology/Data%20filter-Sample?isembed=true&tokenParam=Sales&hide_tool=dp'
id='dashboard-frame' width='100%' height='600px' allowfullscreen frameborder='0'></iframe>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
body html {
width: 100%;
height: 100%;
}

html,
body,
app-root {
width: 100%;
height: 100%;
margin: 0;
font-family: Roboto;
font-size: 13px;
}

ul {
list-style-type: none;
padding-left: 0;
}

.tab {
padding-top: 2px;
padding-bottom: 18px;
cursor: pointer
}

.active {
background-color: burlywood;
}

.e-dbrd-blueWaitingIndcator {
-webkit-animation: rotate 2s linear infinite;
animation: rotate 2s linear infinite;
height: 54px;
width: 54px;
top: 50%;
left: 50%;
position: relative;
}

.e-waiting {
position: fixed;
display: block;
margin: 0px auto;
width: 54px;
height: 54px;
zoom: 0.5;
margin-left: 55px;
}

#container {
width: 13%;
float: left;
height: 100%;
float: left;
background: #f4f4f4;
height: 100%;
box-shadow: 2px 0 4px 0 rgba(0, 0, 0, .12);
overflow: auto;
overflow-x: hidden;
}

#grid-title {
font-size: 17px;
border-bottom: 1px solid #333;
padding: 15px;
}

#panel {
width: 100%;
float: left;
background: #f4f4f4;
overflow: auto;
}

#dashboard {
width: 100%;
float: left;
height: 100%;
display: block;
}

.dashboard-item {
padding: 10px;
border-bottom: 1px solid #ccc;
cursor: pointer;
}

#viewer-section {
width: 87%;
height: 100%;
float: left;
}

#viewer-header {
padding: 10px;
display: block;
float: left;
width: 100%;
}

#create-dashboard {
float: right;
margin-right: 20px;
background: #0565ff;
border: 0;
border-radius: 4px;
color: #fff;
cursor: pointer;
display: inline-block;
font-size: 12px;
font-weight: 600;
height: 28px;
line-height: 28px;
min-width: 90px;
outline: none;
text-align: center;
border: 1px solid #0450cc;
}

#edit-dashboard {
float: right;
background: #fff;
margin-right: 20px;
border: 0;
border-radius: 4px;
color: #333;
cursor: pointer;
display: inline-block;
font-size: 12px;
font-weight: 600;
height: 28px;
line-height: 28px;
min-width: 90px;
outline: none;
text-align: center;
border: 1px solid #b3b3b3;
}

#dashboardDesigner {
height: 900px;
border: 2px solid #333;
}

#custom_ok_button {
margin: 10px 0;
padding: 4px 8px;
font-size: 16px;
line-height: 24px;
border-radius: 4px;
background: #fff;
border: 0.5px solid #e2e8f0;
color: #2d3748;
float: right;
margin-left: 12px;
margin-right: 17px;
}

#sample_dialog {
width: 385px;
}
Binary file not shown.
Loading