-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from jcdcdev/dev/v14
14.1.0
- Loading branch information
Showing
31 changed files
with
139 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
using Umbraco.Community.SimpleDashboards.Core; | ||
using Umbraco.Community.SimpleDashboards.Web; | ||
|
||
namespace TestSite.Fourteen.Dashboards; | ||
|
||
public class BasicDashboard : SimpleDashboard | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
using Umbraco.Community.SimpleDashboards.Core; | ||
using Umbraco.Community.SimpleDashboards.Web; | ||
|
||
namespace TestSite.Fourteen.Dashboards; | ||
|
||
public class ExampleDashboard : SimpleDashboard | ||
{ | ||
public ExampleDashboard() | ||
{ | ||
SetName("Example Dashboard"); | ||
SetWeight(500); | ||
// Show dashboard in the Media section | ||
AddSection("Umb.Section.Media"); | ||
AddSection("Umb.Section.Content"); | ||
} | ||
public override string Name => "Example Dashboard"; | ||
|
||
public override int Weight => 500; | ||
|
||
// Show dashboard in the Media section | ||
public override string[] Sections => ["Umb.Section.Media", "Umb.Section.Content"]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using Umbraco.Community.SimpleDashboards.Web; | ||
|
||
namespace TestSite.Fourteen.Dashboards; | ||
|
||
public class FrameExampleDashboard : SimpleDashboard | ||
{ | ||
public override string Name => "iFrame Example"; | ||
} |
7 changes: 2 additions & 5 deletions
7
src/TestSite.14/Dashboards/ThisDashboardHasNoViewDashboard.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
using Umbraco.Community.SimpleDashboards.Core; | ||
using Umbraco.Community.SimpleDashboards.Web; | ||
|
||
namespace TestSite.Fourteen.Dashboards; | ||
|
||
public class ThisDashboardHasNoViewDashboard : SimpleDashboard | ||
{ | ||
public ThisDashboardHasNoViewDashboard() | ||
{ | ||
SetName("No View Dashboard"); | ||
} | ||
public override string Name => "No View Dashboard"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@inherits Umbraco.Community.SimpleDashboards.Web.DashboardViewPage | ||
|
||
@{ | ||
var url = "https://example.com/"; | ||
} | ||
|
||
<span>Url: @url</span> | ||
<iframe width="100%" height="500px" src="@url"></iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Umbraco.Community.SimpleDashboards.Client/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/Umbraco.Community.SimpleDashboards.Client/src/context/simple-dashboards.context.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import {UmbContextToken} from "@umbraco-cms/backoffice/context-api"; | ||
import {UmbControllerBase} from "@umbraco-cms/backoffice/class-api"; | ||
import {UmbControllerHost} from "@umbraco-cms/backoffice/controller-api"; | ||
import {UmbDataSourceResponse} from "@umbraco-cms/backoffice/repository"; | ||
import {GetUmbracoSimpledashboardsApiV1RenderByDashboardResponse} from "../api"; | ||
import {SimpleDashboardsRepository} from "../repository/simple-dashboards.repository"; | ||
|
||
export const SIMPLE_DASHBOARDS_CONTEXT_TOKEN = | ||
new UmbContextToken<SimpleDashboardsContext>("SimpleDashboardsContext"); | ||
|
||
export class SimpleDashboardsContext extends UmbControllerBase { | ||
#repository: SimpleDashboardsRepository; | ||
|
||
constructor(host: UmbControllerHost) { | ||
super(host); | ||
this.provideContext(SIMPLE_DASHBOARDS_CONTEXT_TOKEN, this); | ||
this.#repository = new SimpleDashboardsRepository(this); | ||
} | ||
|
||
async render(alias: string): Promise<UmbDataSourceResponse<GetUmbracoSimpledashboardsApiV1RenderByDashboardResponse>> { | ||
return await this.#repository.render(alias); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...Umbraco.Community.SimpleDashboards.Client/src/datasource/simple-dashboards.data-source.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import {UmbDataSourceResponse} from "@umbraco-cms/backoffice/repository"; | ||
import {getUmbracoSimpledashboardsApiV1RenderByDashboard, GetUmbracoSimpledashboardsApiV1RenderByDashboardData, GetUmbracoSimpledashboardsApiV1RenderByDashboardResponse} from "../api"; | ||
import {UmbControllerHost} from "@umbraco-cms/backoffice/controller-api"; | ||
import {tryExecuteAndNotify} from "@umbraco-cms/backoffice/resources"; | ||
|
||
export interface ISimpleDashboardsDataSource { | ||
render(alias: string): Promise<UmbDataSourceResponse<GetUmbracoSimpledashboardsApiV1RenderByDashboardResponse>>; | ||
} | ||
|
||
export class SimpleDashboardsDataSource implements ISimpleDashboardsDataSource { | ||
|
||
#host: UmbControllerHost; | ||
|
||
constructor(host: UmbControllerHost) { | ||
this.#host = host; | ||
} | ||
|
||
async render(alias: string): Promise<UmbDataSourceResponse<GetUmbracoSimpledashboardsApiV1RenderByDashboardResponse>> { | ||
const data: GetUmbracoSimpledashboardsApiV1RenderByDashboardData = { | ||
dashboard: alias, | ||
}; | ||
return await tryExecuteAndNotify(this.#host, getUmbracoSimpledashboardsApiV1RenderByDashboard(data)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/Umbraco.Community.SimpleDashboards.Client/src/repository/simple-dashboards.repository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import {UmbControllerBase} from "@umbraco-cms/backoffice/class-api"; | ||
import {UmbControllerHost} from "@umbraco-cms/backoffice/controller-api"; | ||
import {UmbDataSourceResponse} from "@umbraco-cms/backoffice/repository"; | ||
import {GetUmbracoSimpledashboardsApiV1RenderByDashboardResponse} from "../api"; | ||
import {SimpleDashboardsDataSource, ISimpleDashboardsDataSource} from "../datasource/simple-dashboards.data-source"; | ||
|
||
export class SimpleDashboardsRepository extends UmbControllerBase { | ||
#resource: ISimpleDashboardsDataSource; | ||
|
||
constructor(host: UmbControllerHost) { | ||
super(host); | ||
this.#resource = new SimpleDashboardsDataSource(host); | ||
} | ||
|
||
async render(alias: string): Promise<UmbDataSourceResponse<GetUmbracoSimpledashboardsApiV1RenderByDashboardResponse>> { | ||
return await this.#resource.render(alias); | ||
} | ||
} |
56 changes: 0 additions & 56 deletions
56
src/Umbraco.Community.SimpleDashboards.Client/src/resource.ts
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
src/Umbraco.Community.SimpleDashboards/Core/EntryPointManifest.cs
This file was deleted.
Oops, something went wrong.
4 changes: 3 additions & 1 deletion
4
src/Umbraco.Community.SimpleDashboards/Core/ISimpleDashboardService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Umbraco.Community.SimpleDashboards/Core/Models/ISimpleDashboard.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/Umbraco.Community.SimpleDashboards/Core/SimpleDashboardCollection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/Umbraco.Community.SimpleDashboards/Core/SimpleDashboardCollectionBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Umbraco.Community.SimpleDashboards/Core/SimpleDashboardService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/Umbraco.Community.SimpleDashboards/Core/UmbracoBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.