Skip to content

Commit 8e78d6a

Browse files
committed
Merge branch 'master' of github.com:maestrano/impac-angular
2 parents a3b1b76 + 4002e09 commit 8e78d6a

File tree

2 files changed

+33
-18
lines changed

2 files changed

+33
-18
lines changed

DEVELOPER.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ Now you should an api key, api secret, and an organization associated to your Us
3939
2. Run `gulp workspace` to build and inject dependencies, the open the `workspace/index.html` file in a browser - **you will need to run `gulp workspace` and refresh the page after every change**
4040

4141

42-
##### Architecture
42+
##### Workspace Architecture
4343

4444
The workspace environment works by loading a parent angular module, which depends on impac-angular ( 'impacWorkspace' ). This allows us to configure impac-angular's services as required.
4545

4646
Take a look at the `workspace/index.js` file and you'll see default configurations of impac-angular's provider services to enable the workspace to run.
4747

48-
For more information on the configurations available on impac-angular's provider services see README.md **Angular Providers Configurations** section.
48+
For more information on the configurations available on impac-angular's provider services see [README.md](./README.md) **Impac Angular Providers & Services** section.
4949

5050
```javascript
5151
angular.module('impacWorkspace', ['maestrano.impac']);
@@ -58,6 +58,21 @@ The `workspace/index.js` file is then loaded into `workspace/index.html` via `<s
5858
<script src="../dist/impac-angular.js"></script>
5959
```
6060

61+
#### Impac Ecosystem Architecture
62+
63+
The high-level diagram below outlines the ecosystem which powers Impac! Angular's reporting abilities.
64+
65+
![Impac Ecosystem Overview](https://maestrano.atlassian.net/wiki/download/attachments/20742254/Impac%20Ecosystem%20Overview.png?version=1&modificationDate=1457910746989&api=v2)
66+
67+
###### First Load Flow
68+
1. The hosting front-end retrieves data for User and Organizations which are then provided to Impac! Angular via an Angular Provider Service.
69+
2. Impac! Angular retrieves the Dashboards, Widgets & KPIs configurations from Hub API.​
70+
3. Impac! Angular queries Impac! Engine to retrieve data.
71+
4. Impac! Engine authenticates the user using IDM API.
72+
5. Impac! Engine queries Connec! to retrieve raw data based on the widget configuration.
73+
6. Connec! authenticates the user using IDM API and returns raw data to Impac! Engine.
74+
7. Impac! Engine computes this raw data into a meaningful summary and sends it back to Impac! Angular.
75+
8. Impac! Angular display the summary using a pre-defined template (line chart, pie chart, figure, list...)
6176

6277
#### How-to: Create a widget
6378
---

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ You can post issues, and submit pull requests directly to the #develop branch of
2222

2323
Impac!™ frontend library can be included in any project based on the Maestrano platform, just fork this repository, read below for information and guidelines on using this library!
2424

25-
**For Developers looking to create Widgets, and modify the library, have a look at DEVELOPER.md, and start developing!**
25+
**For Developers looking to create Widgets, and modify the library, have a look at [DEVELOPER.md](./DEVELOPER.md), and start developing!**
2626

2727
<br>
2828

@@ -56,24 +56,25 @@ Embed angular-impac's wrapper directive `'impacDashboard'`. You can use either E
5656
<div impac-dashboard></div>
5757
```
5858

59-
### Angular Providers Configurations
59+
### Impac Angular Providers & Services
6060
---
61-
impac-angular requires that you configure it's **ImpacLinkingProvider service** with some core data.
6261

63-
#### API
62+
Note: This section is a work-in-progress, not all services and providers that can be used to configure impac-angular are documented.
6463

65-
##### linkData(options)
66-
_type_: Object<br>
67-
_usage_: Linking core User data into impac-angular to meet the requirements of the library, and keeping concerns seperate.
64+
---
65+
66+
#### Impac Linking Provider (linking.svc.coffee)
67+
68+
Provides impac-angular with core data that it needs to run. This providers configuration is **required** and an error with be thrown if the below configurations have not been given.
6869

6970
**user**<br>
7071
_type_: Function<br>
71-
_return_: Promise -> {sso_session: ssoSession, ... }<br>
72+
_return_: Promise -> { sso_session: ssoSession, ... }<br>
7273
_usage_: Retrieving user details & sso_session key for authenticating querys to Impac! API, and displaying user data e.g name.
7374

7475
**organizations**<br>
7576
_type_: Function<br>
76-
_return_: Promise -> {organizations: [ userOrgs, ... ], currentOrgId: currentOrgId}<br>
77+
_return_: Promise -> { organizations: [ userOrgs, ... ], currentOrgId: currentOrgId }<br>
7778
_usage_: Retrieving organizations and current organization id.
7879

7980
#### Example
@@ -82,7 +83,10 @@ _usage_: Retrieving organizations and current organization id.
8283
angular
8384
.module('yourApp', [])
8485
.run( (ImpacLinkingProvider, ImpacConfigProvider) ->
85-
86+
87+
# ImpacConfig service could be a service your app
88+
# provides to retrieve user data and organizations
89+
# from MNO HUB API.
8690
data =
8791
user: ImpacConfig.getUserData
8892
organizations: ImpacConfig.getOrganizations
@@ -93,14 +97,10 @@ _usage_: Retrieving organizations and current organization id.
9397
)
9498

9599
```
96-
### Optional Configurations
97-
[TODO: Expand on this section]<br>
98-
99-
There are other provider services for dynamically configuring impac-angular on an app by app basis. For example, there is a routes provider for configuring api end-points and such. There is a theming provider for configuring chart colour themes and soon more. There is an assets provider for configuring static assets.
100100

101-
#### ImpacAssetsProvider
101+
#### Impac Assets Provider (assets.svc.coffee)
102102

103-
The **ImpacAssetsProvider** service is used to configure paths for static assets hosted by the parent application.
103+
Provides impac-angular with paths for static assets hosted by the parent application.
104104

105105
**dataNotFound**<br>
106106
_type_: String<br>

0 commit comments

Comments
 (0)