Git Product home page Git Product logo

deepseeweb's Introduction

DeepSeeWeb

Build Angular Test UI Gitter

Renderer for DeepSee Dashboards in Browser with MDX2JSON as a Serverside and JS web-client.
Developed using Angular11 and Highcharts.

Whats new in 3.0

This is newly rewritten DeepSeeWeb with TypeScript & Angular 10!

Current version is alpha!

Some features of new version:

  • Clean navigation

DeepSeeNavigation

Now user can clearly see and navigate to dashboards via breadcrumbs, changing namespace, etc. Query parameter "ns" for namespace was gone. Now url constructed by following rule "/namespace/folder/folder/.../dashboard.dashboard", eg. http://mysite.com/dsw/#/IRISAPP/Test/Countries.dashboard

  • Redesigned login screen

DeepSeeLogin

  • New sidebar with main menu

DeepSeeSidebar

Now user can easly see options available for each screen and change settings

DeepSeeSidebar

  • More clean dashboards. Colors adjusted to show important data, whilst other information displayed in light colors. Also new design is more suitable for large screens. Top - new design, buttom - old:

DeepSeeDashboard

  • Clean widget actions

DeepSeeActions

  • Redesigned styles for filters, modals
  • Added service workers to improve application startup
  • Now all libs(eg. Highcharts, gridster) can be easily updated via npm
  • Removed a lot of old code(300k+ lines) and refactored services
  • Changed widget classes to more OOP style, removed all prototypes, etc.
  • Changed templates to take advantage of component approach

Not supported in alpha:

  • user addons, beacuse old addons has been written on Angular1 (but base addons as map, html text, worldmap are included in bundle already)
  • changing app settings via UI(only configs supported)
  • color adjustments and theming
  • some specific widget settings or features(eg. changing type of chart)

This features will be implemented soon and are to be included in RC

Supported widgets

  • Area chart
  • Line chart
  • Chart with markers
  • Bar chart
  • Column chart
  • Pie chart
  • Time chart
  • Pivot table
  • Text widget
  • Combo chart
  • Bubble chart
  • Hi-Low chart
  • Quadtree chart
  • Bullseye chart
  • Speedometer
  • Fuel gauge

Installation

  1. First be sure, that you have MDX2JSON installed. To test it open URL <server:port>/MDX2JSON/Test You should see something like this: { "DefaultApp":"\/mdx2json", "Mappings": { "Mapped":["MDX2JSON","SAMPLES" ], "Unmapped":["%SYS","DOCBOOK","USER" ] }, "Status":"OK", "User":"UnknownUser", "Version":2.2 }

  2. Download the latest release xml file: https://github.com/intersystems-ru/DeepSeeWeb/releases

  3. Import it to any Caché namespace, f.e. to USER.

  4. Run in terminal:

USER> d ##class(DSW.Installer).setup()

It will:

  • create /dsw web app,
  • create ...csp/dsw folder
  • put all the necessary DeepSee Web files into .../csp/dsw folder.

To use DSW Open server:port/dsw/index.html

Demo: https://www.youtube.com/watch?v=-HplM12eNik

Configuring endpoints

You can set your endpoint and namespace in an appropriate file config.json located in the root directory

Known issues:

Sometimes after installation you can see umlyauts in the client. like in the shot: Install To fix this there are tow ways:

  • Copy index.html to index.csp and try to connect to it same way you do with index.html page. Symbols should go in Unicode now.

Or:

  • Write your current codepage setting in CSP Gateway for the files:
zw ^%SYS("CSP","DefaultFileCharset")

This setting should be "utf-8". If there is another setting, save it somewhere and change to "utf-8"

So this should fix it:

set ^%SYS("CSP","DefaultFileCharset")="utf-8"

Embedding widgets

Widgets can be embedded in other pages. Easiest way to embed a widget is to navigate to the widget, set it into a desired state, press RMB to open context menu and press Share button. It would show a url for embedding.

Embedded URL is generated as follows. Start with a dashboard URL and add required widget parameter. Optionally add other URL parameters. All parameter values MUST be URL escaped. Available parameters are:

Name Value Value, escaped Description
widget 1 1 Which widget from the dashboard to show (in order of widget definition).
FILTERS TARGET:*;FILTER:[period].[H1].[period].&[10\] TARGET:*;FILTER:%5Bperiod%5D.%5BH1%5D.%5Bperiod%5D.%26%5B104%5D Filters to use. Follows InterSystems BI FILTERS url parameter.
variables variable1.value1
variable1.value1~variable2.XYZ
variable1.value1
variable1.value1~variable2.XYZ
Provide pivot variable values. Variables are separated by ~. Variable and value are separated by ..
drilldown level1
level1~level2
[regionD].[H1].[regionL].&[23]~[regionD].[H1].[rayonL].&[56043]
level1
level1~level2
%5BregionD%5D.%5BH1%5D.%5BregionL%5D.%26%5B23%5D~%5BregionD%5D.%5BH1%5D.%5BrayonL%5D.%26%5B56043%5D
Drilldown on a widget. Drilldown levels are separated by ~.
noheader 1 1 Do not display header information. Defaults to 0.
datasource map/weights.pivot map%2Fweights.pivot What datasource to use for widget.

Embedded widgets callbacks

Embedded widgets interact with a parent in two ways:

  1. Communicate with parent window using event passing via dsw object for shared widgets:
// Define dsw object in a parent window using this interface:
export interface IDSW {
    onFilter: (e: IWidgetEvent) => void;
    onDrill: (e: IWidgetEvent) => void;
}
// Widget event
export interface IWidgetEvent {
    index: number;
    widget: IWidgetInfo;
    drills?: IWidgetDrill[];
    filters?: string;
}

// Example:
window.dsw = {
    onDrill: (data) => {
         // handle drill event here
    }, 
    onFilter: (data) => {
         // handle filter event here
    }
}
  1. Communicate with parent window using postMessage (supports CORS and crossdomain setup where DSW and parent app are on a separate servers/domains):
// Extended interface for widget event
export interface IWidgetEvent {
    type: WidgetEventType;
    index: number;
    widget: IWidgetInfo;
    drills?: IWidgetDrill[];
    filters?: string;
    datasource?: string;
}

// Example listener in parent
window.addEventListener('message', e => {
    const event = e.data as IWidgetEvent;
    switch (event.type) {
        case 'drill':
            // code ... 
            break;
        case 'filter': 
            // code ... 
            break;
        case 'datasource': 
            // code ... 
            break;
    }
});
  1. Apply styles for map widget
  // hide map controls, assuming widget in iframe element
  iframe.postMessage({ type: 'map.applyStyle', selector: '.ol-control', style: 'display', value:'none' });
  1. Disable context menu on widgets Use disableContextMenu=1 data property to disable DSW context menu on any widget. Also, context menu can be disabled on shared widget by passing url parameter disableContextMenu=1

Map widget

To create a map widget you'll need:

  1. Get a polygon file. GeoJSON is supported, and there's also support for a legacy js format.
  2. Save a polygon file into a root directory of a default web application of your namespace.
  3. Create a widget with type: map and name equal to the polygons file.
  4. Your GeoJSON contains an array of polygons, with some property being a unique identifier for a polygon. Create a coordsProperty dataproperty with the value being the name of this property in your widget.
  5. In the widget data source, you must create a column with the same name as coordsProperty value, with the values being unique polygon identifiers.
  6. Add other properties/data properties as needed.
Data Property Type Description Value Default
tooltipProperty dataproperty Define custom tooltip. Tooltip appears when user's cursor hovers over a polygon. Datasource column name Row name
popupProperty dataproperty Define custom popup. Tooltip appears when user's cursor presses LMB on a polygon and there's no DRILLDOWN. Datasource column name Row name
coordsProperty dataproperty Property present in both the datasource AND geojson containing polygon id for a tile Datasource column name
colorProperty dataproperty Name of a numeric property, defining polygon color. Datasource column name
tileUrl dataproperty Tile server URL https://tile-c.openstreetmap.fr/hot/{z}/{x}/{y}.png
coordsJsFile property File with a JS or GeoJSON polygons. Requested from the root of a default web app for a namespace js or geojson path Widget name
colorFormula property Formula used to calculate polygon color. hsl((255-x)/255 * 120, 100%, 50%)
rgb(x, 255-x, 0)
polygonTitleProperty property Define custom polygon title Datasource column name
colorProperty property Deprecated by a dataproperty with a same name
markerPopupContentProperty property Deprecated by a popupProperty dataproperty
colorClientProperty property Deprecated by a colorProperty dataproperty

Creating custom widgets

DeepSeeWeb allows modification of exist widgets and custom widget registration as well. For base widget class methods and properties description please read Addons. To setup custom widget simply copy widget js file to /addons folder.

For custom widget example, please look at src/factories/customWidget.js. This is simple custom widget that represents html5 canvas for drawing.

Creating custom themes

User can create or use custom themes, more about it here: Custom themes.

License

Though DeepSeeWeb source goes with MIT License it uses hicharts.js for visualisation of several widgets so please obey the Highcharts license when use DeepSeeWeb for commercial applications. According to Highcharts license it's free for non-commercial usage

Development

At least NodeJS v16.14.0 required to build application.

  1. Run npm i
  2. Run 'npm run build'
  3. dist folder will contain built app

Article and discussion around DeepSee Web

Here is the article on InterSystems Developer Community describing DSW features and capabilites.

deepseeweb's People

Contributors

actions-user avatar agnybida avatar alexjaegerstr avatar daimor avatar eduard93 avatar evshvarov avatar frisle avatar gevorg95 avatar gnibeda avatar irinalarionova777 avatar isc-pbarton avatar jakcpto avatar makarovs96 avatar nikitaeverywhere avatar njektt avatar radgalf avatar timleavitt avatar timuris avatar tsvetkovav avatar

Stargazers

 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

deepseeweb's Issues

Can't load addon alert

with 2.0.7 release I'm getting 'Can't load addon' alert, even I don't have any addons, yet.

FIlter settings from URL

As a continuation of issue #32, opened dashboard ignores filter settings from URL.
It happens when a target is not defined.

GetMembersForFilter() when input a search string in a filter box

Currently search in DSW Dashboards is performed on values that have been received from mdx2json. By default there is a limit of 2500 distinct values since 2013.2.
It would be great if after input a search value, then up to 2500 items whose displayed name starts with this value will be listed. ATM the search is applied to the shortened list.

Enhancements for the Map Addon

Currently, there is a working sample addon available for maps that shows highlighted countries based on a metric. Please support the following cases:
1 world map drill down from world to state
2 world map drill down with additional information (PINs within State)
3 world map drill down with additional information (bubbles within State)
4 Additional information based on another metric (on a click within the map show rich information in a second widget)

Thank you!

Custom widgets in portlet

Уже который раз пытаюсь и все никак не могу разобраться, как применять кастомные виджеты к портлетам, разработчики не раз об этом упоминали, но все что-то никак не удается.
Сейчас все что получается это заменить конкретный тип виджетов на кастомные, как например в Readme все areachart заменяются на CustomWidget.
Что же делать если устраивают все ныне существующие, но хочется еще и новых?

gulp build errors

C:\temp\DeepSeeWeb>gulp
[17:19:06] Warning: gulp version mismatch:
[17:19:06] Global gulp is 3.9.1
[17:19:06] Local gulp is 3.9.0
C:\temp\DeepSeeWeb\gulpfile.js:144
        append += `
                  ^
SyntaxError: Unexpected token ILLEGAL
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Liftoff.handleArguments (C:\Users\eduard\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:116:3)
    at Liftoff.<anonymous> (C:\Users\eduard\AppData\Roaming\npm\node_modules\gulp\node_modules\liftoff\index.js:192:16)
    at module.exports (C:\Users\eduard\AppData\Roaming\npm\node_modules\gulp\node_modules\liftoff\node_modules\flagged-respawn\index.js:17:3)
```

clean installation fails

Error Cache error: zsetup+147^DSW.Installer.1 *DSW.Installer

2017-02-10 14:31:58 0 DSW.Installer: Installation starting at 2017-02-10 14:31:58, LogLevel=3
2017-02-10 14:31:58 3 SetVariable: Namespace=mdx2json
2017-02-10 14:31:58 3 Evaluate: Set namespace to ${Namespace} -> Set namespace to mdx2json
2017-02-10 14:31:58 0 : Set namespace to mdx2json
2017-02-10 14:31:58 3 Evaluate: (##class(Config.Namespaces).Exists("${Namespace}")=0) -> (##class(Config.Namespaces).Exists("mdx2json")=0)
2017-02-10 14:31:58 1 CreateNamespace: Creating namespace %ALL using CACHETEMP/CACHETEMP
2017-02-10 14:31:58 2 CreateNamespace: Modifying namespace %ALL
2017-02-10 14:31:58 1 ActivateConfiguration: Activating Configuration
2017-02-10 14:31:58 0 : Mapping DSW and DSW.Addons packages to %All namespace
2017-02-10 14:31:58 3 Evaluate: ${Namespace} -> mdx2json
2017-02-10 14:31:58 1 ClassMapping: Adding classmapping DSW to %ALL from mdx2json
2017-02-10 14:31:58 1 ActivateConfiguration: Activating Configuration
2017-02-10 14:31:58 0 : Mapping DSW and DSW.Addons packages to Samples namespace
2017-02-10 14:31:58 1 CreateRole: Creating Role 'AppRole' with resources '%DB_CACHESYS:RW,%Admin_Secure:U', granting ''
2017-02-10 14:31:58 3 Evaluate: ${Namespace} -> mdx2json
2017-02-10 14:31:58 3 Evaluate: ${CSPDIR}dsw -> /opt/ensemble/csp/dsw
2017-02-10 14:31:58 3 Evaluate: AppRole -> AppRole
2017-02-10 14:31:58 3 Evaluate:  ->
2017-02-10 14:31:58 3 Evaluate: 64 -> 64
2017-02-10 14:31:58 3 Evaluate: 1 -> 1
2017-02-10 14:31:58 3 Evaluate:  ->
2017-02-10 14:31:58 3 Evaluate:  ->
2017-02-10 14:31:58 3 Evaluate:  ->
2017-02-10 14:31:58 3 Evaluate:  ->
2017-02-10 14:31:58 3 Evaluate:  ->
2017-02-10 14:31:58 3 Evaluate:  ->
2017-02-10 14:31:58 3 Evaluate:  ->
2017-02-10 14:31:58 3 Evaluate:  ->
2017-02-10 14:31:58 3 Evaluate:  ->
2017-02-10 14:31:58 3 Evaluate:  ->
2017-02-10 14:31:58 3 Evaluate: 1 -> 1
2017-02-10 14:31:58 3 Evaluate: 1 -> 1
2017-02-10 14:31:58 3 Evaluate: 0 -> 0
2017-02-10 14:31:58 3 Evaluate: 1 -> 1
2017-02-10 14:31:58 3 Evaluate:  ->
2017-02-10 14:31:58 3 Evaluate: 1 -> 1
2017-02-10 14:31:58 1 CSPApplication: Creating /dsw in MDX2JSON, using /opt/ensemble/csp/dsw
2017-02-10 14:31:58 0 : Copying web application files
2017-02-10 14:31:58 0 DSW.Installer: ERROR #5002: Cache error: <CLASS DOES NOT EXIST>zsetup+147^DSW.Installer.1 *DSW.Installer
2017-02-10 14:31:58 0 DSW.Installer: Installation failed at 2017-02-10 14:31:58
2017-02-10 14:31:58 0 %Installer: Elapsed time .493501s

Row count for listings

If pivot has non empty value of parameter listingRows, DRILLTHROUGH mdx query must specify this number of rows (needed expression 'MAXROWS listingRows' ).
E.g.
DRILLTHROUGH MAXROWS 20000 SELECT FROM [HOLEFOODS]

Introduce ClickFilter indication and Clickfilter disable option

Click filter provides the option to filter WidgetB with current item in WidgetA.

It would be great to have an indication (e.g. in TreeView) what is the current segment selected.

And if you want to deselect and release the filter from WidgetB it would be great to have this option on the repeated click on the selected item in WidgetA.

Provide package.json file

When using node/npm features, it is highly recommended to use package.json file in the root directory of the project.

This at least will replace

npm install gulp-uglify gulp-jshint gulp-concat gulp-cssmin gulp-html-replace gulp-angular-templatecache del --save-dev

with short npm install.

Try it!

Mobile: add the option to alter MDX2JSON app in QR-code

Now qr-code looks as
dsw|server|login|pass|namespace

server is aaa.bbb.com
So dsw mobile suppose that MDX2JSON is available at aaa.bbb.com/MDX2JSON

That is ok and very convenient.
But let's introduce the option to connect to different MDX2JSON in case it is somewhere else.
And the settings for server would be like:

aaa.bbb.com/MDX2JSONAAA

Ignores ns parameter in the URL

When I open DSW for embedding to my application, I'm using URL like this /dsw/index.html#!/d/Dashboard%20with%20Meters.dashboard?ns=ENSDEMO&embed=1&lang=cs. But it fails to open, due to some requests to MDX2JSON asking for SAMPLES namespace, which I don't have.

Support multiple widgets in SETTINGS Clause for TARGET parameter

SETTINGS is used for New_Window and Navigate controls and consists of:
SETTINGS=TARGET:W1;FILTER=[FILTER EXPRESSION];
Let the support of multiple widgets in TARGET like:
SETTINGS=TARGET:W1,W2;FILTER=[FILTER EXPRESSION];
For two or more widgets and
SETTINGS=TARGET:*;FILTER=[FILTER EXPRESSION];
for all the widgets.

Related filters doesn't works

Hi!
Example: Cube "HoleFoods Sales".
Dimension [Product]
Level 1 [Product Category]
Level 2 [Product Name]
If I choose a "Fruit" in "Product Category" filter,
then filter "Product Name" must contain only fruit product names.

1
2

.

Add support for "New window" action

New window - the control, which contain the label name and the URL.
URL should be open in a new tab/window.
The test case:
(http://146.185.143.59/dsw/index.html#!/d/DeepSee%20Fundamentals%20Demos/Pivot%20and%20Chart%20Dash.dashboard?ns=Samples#%2F%3Fns=SAMPLES)

URL can contain special variables start with $$$
Support $$$valuelist - comma-separated list of values, stored in the column ID.
Support $$$currvalue - current selected value of the widget: cell, graf element, etc - what we use for ClickFilter

Print content

The way how widget is being sent to print is beautiful, but there is missing one important thing - widget header. Without it, it's kind of useless and very confusing.

Update LPT

I've made some required fixes in LPT, please update to the newest version.

Once updated, let Honza (skype:sacenhigh) know about the update.

Thanks!

Mobile: let to save the entries for mobile version

Introduce Save entry button in the list of dashes screen.
The Entry needs Name. And would be great to maintain the list (edit/delete) with the user app settings and don't erase them with updates.
The access to the list would be great to have at the login screen.

Don't show the dashboards in the Folder with name Hidden

There is a need to prevent users of opening some dashboards directly
They should be open from other dashboards via Navigate or/and New window controls.
So let's introduce the folder with special name Hidden and this folder will not be shown in DSW and DSW mobile

Widgets do not resize correctly on page load

Sometimes widgets do not get resized correctly directly after page load.
Manually resizing / moving will fix it and can be used as a workaround.
resize_error_map

resize_error_bar_charts
(There should be multiple bars in each diagram)

Navigation controls not working

In my dashboards I have navigation buttons to navigate between dashboards and copy filters from one to the other. This works in DSZ but in DSW clicking the button calls a request but it doesn't do anything

Here is my navigation button. It uses parameter SETTINGS and $$$FILTERS token

<control name="" action="navigate" target="*" targetProperty="_DeepSee.UserPortal.DashboardViewer.zen?DASHBOARD=fnb_ds_dashboard_hosp_pohybyPacienta/PrevzatZ.dashboard&amp;SETTINGS=FILTER:$$$FILTERS" location="widget" type="auto" controlClass="" label="Převzat Z" title="Podle vybraných omezení zobrazí interní překlady Na pracoviště" value="" text="" readOnly="false" valueList="" displayList="" activeWhen=""> <valueRequired>false</valueRequired> </control>

If it is not possible to use this button, is there another way to implement navigation in DSW?

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.