Giter Site home page Giter Site logo

devexpress / dashboard-extension-dashboard-panel Goto Github PK

View Code? Open in Web Editor NEW
43.0 27.0 3.0 148 KB

⛔ DEPRECATED. This project was moved to a new repository. Visit https://github.com/DevExpress/dashboard-extensions to find an updated version.

License: MIT License

JavaScript 3.13% HTML 18.24% TypeScript 42.42% CSS 36.22%
deprecated

dashboard-extension-dashboard-panel's Introduction

⛔ DEPRECATED. This project was moved to a new repository. Visit dashboard-extensions to find an updated version.

The current repository does not support the modular approach for HTML JS Dashboard and will not be updated in the future.


The Dashboard Panel is a Web Dashboard extension that displays a list of available dashboards and lets you switch between the designer and viewer modes.

web-panel

You can see the dashboard panel in action by visiting the DevExpress Web Dashboard Demo.

Installation

  1. Download the latest version of the extension here.

  2. Add the dist/dashboard-panel.css and dist/dashboard-panel.min.js files in your project.

  3. Attach the download script (dashboard-panel.min.js) to the project inside the <head> section onto the page containing Web Dashboard.

<head>
    <script src="/dist/dashboard-panel.min.js"></script>
    <!-- ... -->
</head>
  1. Attach the download style sheet file (dashboard-panel.css) to the project.
<head>
    <link rel="stylesheet" type="text/css" href="/dist/dashboard-panel.css" />
    <!-- ... -->
</head>
  1. Add the /dist/dashboard-panel.html file content inside the <body> section.

  2. Handle the Web Dashboard's BeforeRender event to perform client-side customization of the Web Dashboard control before the control and its elements have been rendered.

<!-- For ASP.NET Web Forms -->
<dx:ASPxDashboard ID="ASPxDashboard1" runat="server" DashboardStorageFolder="~/App_Data/Dashboards">
  <ClientSideEvents BeforeRender="onBeforeRender" />
</dx:ASPxDashboard>
@* For ASP.NET MVC *@
@Html.DevExpress().Dashboard(settings => {
    settings.Name = "Dashboard";
    settings.ClientSideEvents.BeforeRender = "onBeforeRender";
}).GetHtml()
  1. Register the custom item extension to add the Dashboard Panel to the Web Dashboard.
function onBeforeRender(sender) {
  var dashboardControl = sender.GetDashboardControl();
  dashboardControl.registerExtension(new CustomExtensions.CustomDashboardPanelExtension(dashboardControl));
}

API

The DashboardPanelExtension class contains the following public properties:

  • DashboardPanelExtension.allowSwitchToDesigner property - Gets or sets whether you can switch into the designer mode. This property control the visibility of the Edit in Designer button.  
  • DashboardPanelExtension.name property - Gets a unique name of a Web Dashboard extension. The default value is 'dashboard-panel'.
  • DashboardPanelExtension.panelWidth property - Gets or sets the width of the Dashboard Panel extension. The default value is 250 px.
  • DashboardPanelExtension.visible property - Gets or sets whether the Dashboard Panel is visible.

Development

You can use this extension code as a base for your own dashboard item extension development.

Before you start, we advise you to fork this repository and work with your own copy.

  1. Clone this extension to get a local copy of the repository.
git clone https://github.com/DevExpress/dashboard-extension-dashboard-panel.git
cd dashboard-extension-dashboard-panel
  1. In this extension we use the Node.js toolset. Use the command below to install all modules listed as dependencies in the extension's package.json file.
npm install
  1. Then install Gulp to build the solution. You can install it globally...
npm install -g gulp
gulp build

... or use a local Gulp version.

.\node_modules\.bin\gulp build

You can find the resulting files at ...\dashboard-extension-dashboard-panel\dist: dashboard-panel.js and dashboard-panel.min.js.

License

This extension is distributed under the MIT license (free and open-source), but can only be used with a commercial DevExpress Dashboard software product. You can review the license terms or download a free trial version of the Dashboard suite at DevExpress.com.

Support & Feedback

  • Refer to this section for general information about client-side extensions.
  • To learn how to work with extensions, see the following KB article.
  • To address questions regarding the Web Dashboard and JavaScript API, use DevExpress Support Center.

dashboard-extension-dashboard-panel's People

Contributors

dimarudnev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dashboard-extension-dashboard-panel's Issues

Panel disappears when switching back to viewer mode

After switching to designer mode, clicking on the Viewer button causes the panel to disappear. The cause appears to be a typo in "this.desingerToViewerAction =". Changing this to "this.designerToViewerAction =" fixes the issue. The typo exists in both dashboard-panel.js and dashboard-panel.min.js.

Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.