├── .bowerrc
├── .cfignore
├── .editorconfig
├── .gitignore
├── .jshintrc
├── .travis.yml
├── HISTORY.md
├── LICENSE.md
├── OSS_Notice.pdf
├── README.md
├── bower.json
├── gulpfile.js
├── manifest.yml
├── moved.jpg
├── package.json
├── public
├── _index-inline-loading-script.js
├── _index.html
├── elements
│ ├── bar-chart-card
│ │ └── bar-chart-card.html
│ ├── data-table-card
│ │ └── data-table-card.html
│ ├── ge-svg-logo
│ │ └── ge-svg-logo.html
│ ├── predix-logo
│ │ └── predix-logo.html
│ ├── px-deck
│ │ ├── px-deck-index.html
│ │ └── px-deck.html
│ ├── seed-app
│ │ ├── seed-app.html
│ │ └── seed-app.scss
│ ├── seed-footer
│ │ ├── seed-footer.html
│ │ └── seed-footer.scss
│ ├── seed-intro-card
│ │ ├── seed-intro-card.html
│ │ └── seed-intro-card.scss
│ ├── three-widgets-card
│ │ ├── three-widgets-card.html
│ │ └── three-widgets-card.scss
│ ├── time-series-card
│ │ └── time-series-card.html
│ └── views
│ │ ├── blankpage-view.html
│ │ ├── dashboards-view.html
│ │ ├── simple-asset-view.html
│ │ └── winddata-view.html
├── favicon.png
├── index-inline.scss
└── seed-theme.scss
├── server
├── app.js
├── localConfig.json
├── passport-config.js
├── predix-asset-routes.js
├── predix-config.js
├── proxy.js
├── sample-data
│ ├── meters
│ │ ├── crank-frame-compressionratio.json
│ │ ├── crank-frame-dischargepressure.json
│ │ ├── crank-frame-maxpressure.json
│ │ ├── crank-frame-minpressure.json
│ │ ├── crank-frame-suctionpressure.json
│ │ ├── crank-frame-temperature.json
│ │ └── crank-frame-velocity.json
│ ├── predix-asset
│ │ ├── compressor-2017.json
│ │ ├── enterprises
│ │ │ └── parent-asset
│ │ │ │ └── parent-asset.json
│ │ ├── root
│ │ │ └── root.json
│ │ └── sites
│ │ │ └── child-asset
│ │ │ └── child-asset.json
│ ├── time-series
│ │ ├── core-vibe
│ │ │ ├── core-vibe-rear-cruise.json
│ │ │ ├── core-vibe-rear-cruise0.json
│ │ │ └── core-vibe-rear-cruise1.json
│ │ ├── datagrid
│ │ │ └── datagrid-data.json
│ │ ├── delta-egt
│ │ │ └── delta-egt-cruise.json
│ │ ├── fan-vibration
│ │ │ ├── fan-vibration-cruise.json
│ │ │ └── fan-vibration-cruise2.json
│ │ ├── scatter
│ │ │ ├── scatter.json
│ │ │ └── scatter1.json
│ │ └── simple-data
│ │ │ ├── simple-data-1.json
│ │ │ ├── simple-data-2.json
│ │ │ └── simple-data-3.json
│ └── view-service
│ │ ├── cards
│ │ ├── 1.json
│ │ ├── 2.json
│ │ ├── 3.json
│ │ ├── 4.json
│ │ ├── 5.json
│ │ └── 6.json
│ │ ├── decks
│ │ ├── 1.json
│ │ ├── 2.json
│ │ └── 3.json
│ │ └── joins
│ │ ├── 1.json
│ │ ├── 2.json
│ │ ├── 3.json
│ │ └── 4.json
├── time-series-routes.js
└── view-service-routes.js
├── tasks
├── compile.index.js
├── compile.sass.js
├── compile.vulcanize.js
├── dist.clean.js
├── dist.copy.js
├── serve.dev.start.js
├── serve.dist.start.js
└── watch.public.js
├── test
├── index.html
└── seed-test-01.html
├── tutorials
└── USERAUTH.md
├── wct.conf.js
└── yarn.lock
/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "public/bower_components"
3 | }
--------------------------------------------------------------------------------
/.cfignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | public/bower_components
3 | public/polymer-loader.vulcanized.html
4 | test-target
5 | public/index.html
6 | public/**/*-styles.html
7 | public/index-inline.css
8 | main.min.css
9 | .idea
10 | npm-debug.log
11 | *.log
12 | .DS_Store
13 | temp
14 | dist
15 | .github/
16 |
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true,
3 | "browser": true,
4 | "jquery": true,
5 | "devel": true,
6 | "esnext": true,
7 | "bitwise": true,
8 | "camelcase": true,
9 | "curly": true,
10 | "eqeqeq": true,
11 | "immed": true,
12 | "indent": 4,
13 | "latedef": true,
14 | "newcap": true,
15 | "noarg": true,
16 | "quotmark": "single",
17 | "regexp": true,
18 | "undef": true,
19 | "unused": true,
20 | "strict": true,
21 | "trailing": true,
22 | "smarttabs": true,
23 | "white": false,
24 | "globals": {
25 | /* requirejs */
26 | "window": false,
27 | "define": false,
28 | "vRuntime": false,
29 | "Promise": false,
30 | /* ANGULAR MOCKS */
31 | "inject": false,
32 | "module": false,
33 | "expect": false,
34 | "element": false,
35 | /* PROTRACTOR */
36 | "protractor": false,
37 | "browser": false,
38 | "by" : false,
39 | /* MOCHA */
40 | "describe": false,
41 | "xdescribe": false,
42 | "it": false,
43 | "xit": false,
44 | "before": false,
45 | "beforeEach": false,
46 | "after": false,
47 | "afterEach": false,
48 | "jasmine": false
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | before_script:
2 | - npm update -g npm
3 | - npm install -g bower
4 | script:
5 | - npm install
6 | - bower --allow-root install
7 |
--------------------------------------------------------------------------------
/HISTORY.md:
--------------------------------------------------------------------------------
1 | v3.0.1
2 | ===================
3 | * added the import once command to sass to avoid import loop.
4 |
5 | v3.0.0
6 | ===================
7 | * released Polymer Only seed
8 | v1.4.2
9 | ===================
10 | * Fix dist build issue stalling on promise polyfill.
11 |
12 | v1.4.1
13 | ===================
14 | * Upgrade to Polymer 1.5.0 and latest dev dependencies.
15 |
16 | v1.4.0
17 | ===================
18 | * Upgrade to Polymer 1.4.0
19 |
20 | v1.2.17
21 | ===================
22 | * updated bower repos in response to GH Issue
23 |
24 | v1.2.16
25 | ===================
26 | * forced install of vulcanize to 1.14.8, since 1.14.9 wouldn't work.
27 |
28 | v1.2.14
29 | ===================
30 | * Updated License
31 |
32 | v1.2.13
33 | ===================
34 | * resolved merge conflict
35 |
36 | v1.2.12
37 | ===================
38 | * started merge of develop and master
39 |
40 | v1.2.11
41 | ===================
42 | * uPatch version
43 |
44 | v1.2.10
45 | ===================
46 | * Updated manifest to not have logstash and newrelic in it.
47 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | GE Software Development License Agreement – General Release
2 |
3 | THIS SOFTWARE LICENSE AGREEMENT (the “License”) describes the rights granted by the General Electric Company, operating through GE Digital (also referred to as “GE Software”), located at 2623 Camino Ramon, San Ramon, CA 94583 (herein referred to as “Licensor”) to any entity (the “Licensee”) receiving a copy of any of the following GE Digital development materials: Predix DevBox; Predix Reference Application (“RefApp”); Predix Dashboard Seed; Predix Px, Predix Security Service redistributable .jar files; Predix Machine redistributable .jar files; and Predix Machine SDK . These materials may include scripts, compiled code, supporting components, and documentation and are collectively referred to as the “Licensed Programs”. Both Licensor and Licensee are referred to hereinafter as a “Party” and collectively as the “Parties” to this License
4 |
5 | Section 1 – Conditional Grant.
6 |
7 | No Licensee is required to accept this License for use of the Licensed Programs. In the absence of a signed license agreement between Licensor and Licensee specifying alternate terms, any use of the Licensed Programs by the Licensee shall be considered acceptance of these terms. The Licensed Programs are copyrighted and are licensed, not sold, to you. If you are not willing to be bound by the terms of this License, do not install, copy or use the Licensed Programs. If you received this software from any source other than the Licensor, your access to the Licensed Programs is NOT permitted under this License, and you must delete the software and any copies from your systems.
8 |
9 | Section 2 – Warranty Disclaimer.
10 |
11 | NO WARRANTIES. LICENSOR AND OUR AFFILIATES, RESELLERS, DISTRIBUTORS, AND VENDORS, MAKE NO WARRANTIES, EXPRESS OR IMPLIED, GUARANTEES OR CONDITIONS WITH RESPECT TO USE OF THE LICENSED PROGRAMS. LICENSEE’S USE OF ALL SUCH PROGRAMS ARE AT LICENSEE’S AND CUSTOMERS’ OWN RISK. LICENSOR PROVIDES THE LICENSED PROGRAMS ON AN “AS IS” BASIS “WITH ALL FAULTS” AND “AS AVAILABLE.” LICENSOR DOES NOT GUARANTEE THE ACCURACY OR TIMELINESS OF INFORMATION AVAILABLE FROM, OR PROCESSED BY, THE LICENSED PROGRAMS. TO THE EXTENT PERMITTED UNDER LAW, LICENSOR EXCLUDES ANY IMPLIED WARRANTIES, INCLUDING FOR MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, AND NON-INFRINGEMENT. NO GUARANTEE OF UNINTERRUPTED, TIMELY, SECURE, OR ERROR-FREE OPERATION IS MADE.
12 |
13 | THESE LICENSED PROGRAMS MAY BE USED AS PART OF A DEVELOPMENT ENVIRONMENT, AND MAY BE COMBINED WITH OTHER CODE BY END-USERS. LICENSOR IS NOT ABLE TO GUARANTEE THAT THE LICENSED PROGRAMS WILL OPERATE WITHOUT DEFECTS WHEN USED IN COMBINATION WITH END-USER SOFTWARE. LICENSEE IS ADVISED TO SAFEGUARD IMPORTANT DATA, TO USE CAUTION, AND NOT TO RELY IN ANY WAY ON THE CORRECT FUNCTIONING OR PERFORMANCE OF ANY COMBINATION OF END-USER SOFTWARE AND THE LICENSED PROGRAMS AND/OR ACCOMPANYING MATERIALS. LICENSEE IS ADVISED NOT TO USE ANY COMBINATION OF LICENSED PROGRAMS AND END-USER PROVIDED SOFTWARE IN A PRODUCTION ENVIRONMENT WITHOUT PRIOR SUITABILITY AND DEFECT TESTING.
14 |
15 | Section 3 – Feedback.
16 |
17 | It is expressly understood, acknowledged and agreed that you may provide GE reasonable suggestions, comments and feedback regarding the Software, including but not limited to usability, bug reports and test results, with respect to Software testing (collectively, "Feedback"). If you provide such Feedback to GE, you shall grant GE the following worldwide, non-exclusive, perpetual, irrevocable, royalty free, fully paid up rights:
18 |
19 | a. to make, use, copy, modify, sell, distribute, sub-license, and create derivative works of, the Feedback as part of any product, technology, service, specification or other documentation developed or offered by GE or any of its affiliates (individually and collectively, "GE Products"); b. to publicly perform or display, import, broadcast, transmit, distribute, license, offer to sell, and sell, rent, lease or lend copies of the Feedback (and derivative works thereof) as part of any GE Product; c. solely with respect to Licensee's copyright and trade secret rights, to sublicense to third parties the foregoing rights, including the right to sublicense to further third parties; and d. to sublicense to third parties any claims of any patents owned or licensable by Licensee that are necessarily infringed by a third party product, technology or service that uses, interfaces, interoperates or communicates with the Feedback or portion thereof incorporated into a GE Product, technology or service. Further, you represent and warrant that your Feedback is not subject to any license terms that would purport to require GE to comply with any additional obligations with respect to any GE Products that incorporate any Feedback.
20 |
21 | Section 4 – Reserved
22 |
23 | Section 5 – Limitation of Liability.
24 |
25 | LIABILITY ARISING UNDER THIS LICENSE, WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), SHALL BE LIMITED TO DIRECT, OBJECTIVELY MEASURABLE DAMAGES. LICENSOR SHALL HAVE NO LIABILITY TO THE OTHER PARTY OR TO ANY THIRD PARTY, FOR ANY INCIDENTAL, PUNITIVE, INDIRECT, OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. LIABILITY FOR ANY SOFTWARE LICENSED FROM THIRD PARTIES FOR USE WITH THE SERVICES IS EXPLICILTLY DISCLAIMED AND LIMITED TO THE MAXIMUM EXTENT PERMITTED BY LAW.
26 |
27 | Notwithstanding anything to the contrary, the aggregate liability of Licensor and its suppliers under this License shall not exceed the total amounts paid by Licensee to Licensor hereunder during the one-year period immediately preceding the event which gave rise to the claims.
28 |
29 | Section 6 – License.
30 |
31 | A. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants Licensee a worldwide, perpetual, royalty-free, non-exclusive license to:
32 |
33 | install the Licensed Programs on Licensee’s premises, and permit Licensee’s users to use the Licensed Programs so installed, solely for Licensee’s own development, testing, demonstration, staging, and production of Licensee’s own software that makes use of the Licensed Programs in a way that adds substantial functionality not present in the Licensed Programs (the result, a “Licensee Application”);
34 |
35 | permit Licensee to permit third-party hosts (“Hosts”) to install the Licensee Application on such Hosts’ respective premises on Licensee’s behalf, and permit Licensee’s users to access and use the Licensed Programs so installed, solely for Licensee’s own development, testing, demonstration, staging and production purposes
36 |
37 | install the Licensee Application on Licensee’s own premises and permit its own users to use the Licensee Application so installed on the same terms as sub-sections (i) and (ii) above.
38 |
39 | B. For the purposes of this License, the right to “use” the Licensed Programs shall include the right to utilize, run, access, store, copy, test or display the Licensed Programs. No right or license is granted or agreed to be granted to disassemble or decompile any Licensed Programs furnished in object code form, and Licensee agrees not to engage in any such conduct unless permitted by law. Reverse engineering of Licensed Programs provided in object code form is prohibited, unless such a right is explicitly granted by any explicit license subject to sub-section (d) below or as a matter of law, and then only to the extent explicitly permitted. Licensor shall have no obligation to support any such reverse engineering, any product or derivative of such reverse engineering, or any use of the Licensed Programs with any modified versions of any of their components under this License.
40 |
41 | C. Licensee shall ensure that any Licensee Applications incorporate the Licensed Programs in such a way as to prevent third parties (other than Hosts) from viewing the code of the Licensed Programs or gaining access to any programmatic interface or other hidden aspect of the Licensed Programs. Licensee shall also restrict distribution of the Licensed Programs, including as part of Licensee Applications, to only those parties who are notified of, and subject to, an enforceable obligation to refrain from any of the prohibited activities listed herein, such as reverse engineering or disassembling the Licensed Programs.
42 |
43 | D. Use of some open source and third party software applications or components included in or accessed through the Licensed Programs may be subject to other terms and conditions found in a separate license agreement, terms of use or “Notice” file located at the download page. The Licensed Programs are accompanied by additional software components solely to enable the Licensed Programs to operate as designed. Licensee is not permitted to use such additional software independently of the Licensed Programs unless Licensee secures a separate license for use from the named vendor. Do not use any third party code unless you agree with the applicable license terms for that code.
44 |
45 | E. Title. Title to and ownership of the Licensed Programs shall at all times remain with Licensor.
46 |
47 | Section 7 – Termination.
48 |
49 | A) The Licensor reserves the right to cease distribution and grant of further licenses to any or all of the Licensed Programs at any time in its sole discretion.
50 |
51 | B) The Licensor reserves the right to at any time and at its sole discretion provide updated versions of any or all of the Licensed Programs that supercede and replace the prior version of that Licensed Program.
52 |
53 | C) Your license rights under Section 6 are effective until terminated as described below:
54 |
55 | i) This license and all rights under it will terminate or cease to be effective without notice if Licensee breaches the terms of the License and does not correct or remedy such breach promptly.
56 |
57 | ii) Notwithstanding the foregoing, Licensee may terminate this License at any time for any reason or no reason by providing the Licensor written notice thereof.
58 |
59 | D) Upon any expiration or termination of this License, the rights and licenses granted to you under this License shall immediately terminate, and you shall immediately cease using and delete the Licensed Programs. Licensee Applications based upon the Licensed Programs (see Section 6(a) above) are not subject to this limitation.
60 |
61 | In the event of any expiration or termination of this Licensee, any Confidentiality provision, disclaimers of GE’s representations and warranties, choice of applicable law and limitations of GE’s liability shall survive.
62 |
63 | Section 8 – Applicable Law.
64 |
65 | The License shall be governed by and interpreted in accordance with the substantive law of the State of California, U.S.A., excluding its conflicts of law provisions, and by the courts of that state.
66 |
--------------------------------------------------------------------------------
/OSS_Notice.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PredixDev/predix-seed/64c4aa9d4d74f649e5562176dc02e7024ec36a88/OSS_Notice.pdf
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Project has moved
2 | This repo will no longer be updated.
3 | Please use the new version of the Seed app here:
4 |
5 | https://github.com/predixdev/predix-webapp-starter
6 |
7 |
8 |
9 | # Predix UI Seed
10 |
11 | ### NOTE - October 6, 2016
12 |
13 | This project was switched to a new, simplified implementation that includes using Polymer instead of AngularJS and removes dependencies on micro-services. For the previous implementation in AngularJS please refer to the 'develop-angular' and/or 'master-angular' branches.
14 |
15 | ## What is the Predix UI Seed?
16 | The Predix UI Seed ("Seed") is a web application starter kit aimed to accelerate Predix application development. It comes in the form of a simple web application, with code examples on features such as branding, theming, layout, navigation, responsiveness, organization of views, data presentation and micro-services integration, to name some. These working code samples can be straightforwardly customized and adapted to specific application needs. Predix application projects can directly use, remove from or add to these features to achieve prototype or production state much faster than through building everything from scratch. This speeds up application development, letting developers focus on functionality, instead of having to make boilerplate concerns work.
17 |
18 | As its name indicates the Seed is built on [Polymer](http://www.polymer-project.org). Based on the [Web Component API](https://developer.mozilla.org/en-US/docs/Web/Web_Components), Polymer is a component framework that prefers the browser's native capabilities over HTML and JavaScript enhancements, wherever possible. And where there are differences in currently available features, polyfills are provided towards consistent cross-browser behavior. By adopting the Polymer strategy the Seed ensures high consistency of application behavior across browsers, and the best chances of compatibility with future browser versions.
19 |
20 | Most of the frontend components provided in the Seed are from [Predix UI Components](http://predixdev.github.io/predix-ui/), which are also built on Polymer. These re-usable UI building blocks have been researched and designed to address the most common UI patterns. Both built upon Polymer, the Seed and Px Components work together out-of-the-box. Px Components can be used independently, or in combination with one another and with the Seed. This achieves consistent behavior, look-and-feel, and high code re-use.
21 |
22 | The backend of the Seed is now implemented as a NodeJS/Express web server. It presently includes a minimal set of public modules and a couple of Predix-specific modules (for session and proxy concerns, for example). Similar to the frontend, it is also straightforwardly customizable, even replaceable by another server application, if so desired. [NodeJS](http://nodejs.org) is a server-side application framework based on JavaScript. It enjoys strong growth and huge adoption in the server applications community.
23 |
24 | The features offered by the Seed are from open-source component projects, many of which are actively discussed and contributed to. This provides developers with available documentation and help in using such components for their projects.
25 |
26 | ## Getting Started
27 |
28 | ### Get the source code
29 | Make a directory for your project. Clone or download and extract the seed in that directory.
30 | ```
31 | git clone https://github.com/PredixDev/predix-seed.git
32 | cd predix-seed
33 | ```
34 |
35 | ### Install tools
36 | If you don't have them already, you'll need node, bower and gulp to be installed globally on your machine.
37 |
38 | 1. Install [node](https://nodejs.org/en/download/). This includes npm - the node package manager.
39 | 2. Install [bower](https://bower.io/) globally `npm install bower -g`
40 | 3. Install [gulp](http://gulpjs.com/) globally `npm install gulp-cli -g`
41 |
42 | ### Install the dependencies
43 | Change directory into the new project you just cloned, then install dependencies.
44 | ```
45 | npm install
46 | bower install
47 | ```
48 | ## Running the app locally
49 | The default gulp task will start a local web server. Just run this command:
50 | ```
51 | gulp
52 | ```
53 | Browse to http://localhost:5000.
54 | Initially, the app will use mock data for the views service, asset service, and time series service.
55 | Later you can connect your app to real instances of these services.
56 |
57 | ## Running in Predix Cloud
58 | With a few commands you can build a distribution version of the app, and deploy it to the cloud.
59 |
60 | ### Create a distribution version
61 | Use gulp to create a distribution version of your app, which contains vulcanized files for more efficient serving.
62 | You will need to run this command every time before you deploy to the Cloud.
63 | ```
64 | gulp dist
65 | ```
66 |
67 |
68 | ## Push to the Cloud
69 |
70 | ### Pre-Requisites
71 | Pushing (deploying) to a cloud environment requires knowledge of the commands involved and a valid user account with the environment. GE uses Cloud Foundry for its cloud platform. For information on Cloud Foundry, refer to this [link](http://docs.cloudfoundry.org/cf-cli/index.html).
72 |
73 | ### Steps
74 | The simplest way to push the Seed application to a cloud environment is by modifying the default manifest file (manifest.yml) and using the **cf push** command, as follows:
75 |
76 | 1. Update manifest.yml
77 |
78 | Change the name field in your manifest.yml.
79 | Uncomment the services section, and change the names to match your service instances.
80 | Uncomment the clientId and base64ClientCredential environment variables and enter the correct values for your UAA client.
81 | ```
82 | ---
83 | applications:
84 | - name: predix-ui-seed
85 | memory: 64M
86 | buildpack: nodejs_buildpack
87 | command: node server/app.js
88 | #services:
89 | # - -secure-uaa-instance
90 | # - -timeseries-instance
91 | # - -asset-instance
92 | env:
93 | node_env: cloud
94 | uaa_service_label : predix-uaa
95 | # Add these values for authentication in the cloud
96 | #clientId: {Enter client ID, e.g. app-client-id, and place it here}
97 | #base64ClientCredential: dWFhLWNsaWVudC1pZDp1YWEtY2xpZW50LWlkLXNlY3JldA==
98 | ```
99 |
100 | 2. Push to the cloud.
101 |
102 | ```
103 | cf push
104 | ```
105 |
106 | 3. Access the cloud deployment of your Seed application
107 |
108 | The output of the **cf push** command includes the URL to which your application was deployed. Below is an example:
109 |
110 | API endpoint: https://api.endpoint.svc.ice.ge.com (API version: 2.62.0)
111 | User: john.doe@ge.com
112 | Org: predix-org
113 | Space: predix-space
114 |
115 | Access your Seed application by loading the **API Endpoint** above in a web browser
116 |
117 | ## Support and Further Information
118 |
119 | Ask questions and file tickets on https://www.predix.io/community.
120 |
121 | # Copyright
122 | Copyright © 2015, 2016 GE Global Research. All rights reserved.
123 |
124 | The copyright to the computer software herein is the property of
125 | GE Global Research. The software may be used and/or copied only
126 | with the written permission of GE Global Research or in accordance
127 | with the terms and conditions stipulated in the agreement/contract
128 | under which the software has been supplied.
129 |
--------------------------------------------------------------------------------
/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "predix-seed",
3 | "version": "3.1.0",
4 | "private": true,
5 | "ignore": [
6 | "**/.*",
7 | "node_modules",
8 | "bower_components",
9 | "public/bower_components",
10 | "test",
11 | "tests",
12 | "target",
13 | "test-target",
14 | "sass",
15 | "tutorials"
16 | ],
17 | "dependencies": {
18 | "es6-promise": "^3.3.1",
19 | "lodash": "~4.16.2",
20 | "q": "^1.0.0",
21 | "polymer": "^1.6.1",
22 | "iron-ajax": "~1.4.3",
23 | "iron-pages": "~1.0.8",
24 | "px-view": "^1.0.3",
25 | "app-route": "PolymerElements/app-route#^0.9.1",
26 | "px-overlay": "^0.4.0",
27 | "px-simple-line-chart": "^1.7.0",
28 | "px-simple-horizontal-bar-chart": "^0.8.0",
29 | "px-widget-cards": "^2.2.1",
30 | "px-simple-bar-chart": "^1.7.1",
31 | "px": "^1.4.3",
32 | "px-app-nav": "^1.9.1",
33 | "px-card": "^0.6.1",
34 | "px-context-browser": "^1.4.5",
35 | "px-deck-selector": "^1.5.5",
36 | "px-sample-cards": "^0.7.1",
37 | "px-theme": "^2.0.1",
38 | "px-vis-timeseries": "^0.6.2",
39 | "px-vis-xy-chart": "^0.3.0",
40 | "px-view-header": "^0.2.0"
41 | },
42 | "devDependencies": {
43 | "px-forms-design": "^1.1.1",
44 | "px-toggle-design": "^1.1.1",
45 | "px-input-group-design": "^1.1.0",
46 | "px-flexbox-design": "^0.5.0",
47 | "px-viewport-design": "^0.4.6",
48 | "px-list-inline-design": "^0.3.1",
49 | "px-defaults-design": "^1.0.2",
50 | "px-functions-design": "^1.0.0",
51 | "px-normalize-design": "^0.4.1",
52 | "px-colors-design": "^0.3.0",
53 | "px-box-sizing-design": "^0.2.8",
54 | "px-helpers-design": "^0.3.5",
55 | "px-meta-lists-design": "^0.4.0",
56 | "px-starter-kit-design": "^0.7.0",
57 | "px-code-design": "^1.1.1",
58 | "px-headings-design": "^0.3.1",
59 | "px-buttons-design": "^1.1.2",
60 | "px-actionable-text-icons-design": "^1.1.1",
61 | "px-spacing-design": "^0.4.1"
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | const gulp = require('gulp');
3 | const plugins = require('gulp-load-plugins')();
4 | const gulpSequence = require('gulp-sequence');
5 |
6 |
7 | var dev = process.argv.indexOf('--dist') < 0;
8 |
9 | // -----------------------------------------------------------------------------
10 | // getTask() loads external gulp task script functions by filename
11 | // -----------------------------------------------------------------------------
12 | function getTask(task) {
13 | return require('./tasks/' + task)(gulp, plugins);
14 | }
15 |
16 | // -----------------------------------------------------------------------------
17 | // Task: Compile : Scripts, Sass, EJS, All
18 | // -----------------------------------------------------------------------------
19 | gulp.task('compile:sass', getTask('compile.sass'));
20 | gulp.task('compile:index', ['compile:sass'], getTask('compile.index'));
21 |
22 | // -----------------------------------------------------------------------------
23 | // Task: Serve : Start
24 | // -----------------------------------------------------------------------------
25 | gulp.task('serve:dev:start', getTask('serve.dev.start'));
26 | gulp.task('serve:dist:start', ['dist'], getTask('serve.dist.start'));
27 |
28 | // -----------------------------------------------------------------------------
29 | // Task: Watch : Source, Public, All
30 | // -----------------------------------------------------------------------------
31 | gulp.task('watch:public', getTask('watch.public'));
32 |
33 | // -----------------------------------------------------------------------------
34 | // Task: Dist (Build app ready for deployment)
35 | // clean, compile:sass, compile:index, copy, vulcanize
36 | // -----------------------------------------------------------------------------
37 | gulp.task('dist', ['dist:copy'], getTask('compile.vulcanize'));
38 |
39 | // -----------------------------------------------------------------------------
40 | // Task: Dist : Copy source files for deploy to dist/
41 | // -----------------------------------------------------------------------------
42 | gulp.task('dist:copy', ['dist:clean', 'compile:index'], getTask('dist.copy'));
43 |
44 | // -----------------------------------------------------------------------------
45 | // Task: Dist : Clean 'dist/'' folder
46 | // -----------------------------------------------------------------------------
47 | gulp.task('dist:clean', getTask('dist.clean'));
48 |
49 | // -----------------------------------------------------------------------------
50 | // Task: Default (compile source, start server, watch for changes)
51 | // -----------------------------------------------------------------------------
52 | gulp.task('default', function (cb) {
53 | gulpSequence('compile:index', (dev ? 'serve:dev:start' : 'serve:dist:start'), 'watch:public')(cb);
54 | });
55 |
--------------------------------------------------------------------------------
/manifest.yml:
--------------------------------------------------------------------------------
1 | ---
2 | applications:
3 | - name: predix-ui-seed
4 | memory: 64M
5 | buildpack: nodejs_buildpack
6 | command: node server/app.js
7 | path: dist
8 | #services:
9 | # - -secure-uaa-instance
10 | # - -timeseries-instance
11 | # - -asset-instance
12 | env:
13 | node_env: cloud
14 | uaa_service_label : predix-uaa
15 | # Add these values for authentication in the cloud
16 | #clientId: {Enter client ID, e.g. app-client-id, and place it here}
17 | #base64ClientCredential: dWFhLWNsaWVudC1pZDp1YWEtY2xpZW50LWlkLXNlY3JldA==
18 | #windServiceURL: "{URL of the microservice -winddata-timeseries-service}, e.g. https://your-name-winddata-timeseries-service.run.asw-usw02-pr.predix.io"
19 |
--------------------------------------------------------------------------------
/moved.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PredixDev/predix-seed/64c4aa9d4d74f649e5562176dc02e7024ec36a88/moved.jpg
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "predix-seed",
3 | "version": "3.1.0",
4 | "private": true,
5 | "engines": {
6 | "node": ">=0.10.0"
7 | },
8 | "author": {
9 | "name": "Predix Experience",
10 | "email": "Predix.experience@ge.com"
11 | },
12 | "scripts": {
13 | "start": "node server/app.js"
14 | },
15 | "keywords": [
16 | "predix-seed"
17 | ],
18 | "devDependencies": {
19 | "autoprefixer": "^6.3.6",
20 | "connect-modrewrite": "^0.7.9",
21 | "gulp": "^3.9.0",
22 | "gulp-autoprefixer": "^3.1.0",
23 | "gulp-clean": "^0.3.2",
24 | "gulp-cssmin": "^0.1.7",
25 | "gulp-ejs": "^1.2.2",
26 | "gulp-inline-source": "^2.1.0",
27 | "gulp-load-plugins": "^1.1.0",
28 | "gulp-nodemon": "^2.0.6",
29 | "gulp-rename": "^1.2.2",
30 | "gulp-replace": "^0.5.4",
31 | "gulp-sass": "^2.1.1",
32 | "gulp-sequence": "^0.4.6",
33 | "gulp-style-modules": "^0.1.0",
34 | "gulp-vulcanize": "^6.1.0",
35 | "http-rewrite-middleware": "^0.1.6",
36 | "merge-stream": "^1.0.0",
37 | "node-sass": "^3.8.0",
38 | "node-sass-import-once": "^1.2.0",
39 | "open": "0.0.4",
40 | "postcss": "^5.0.21",
41 | "postcss-cli": "^2.5.2",
42 | "request": "^2.58.0",
43 | "run-sequence": "^1.2.2",
44 | "sass-import-modules": "^2.1.0"
45 | },
46 | "dependencies": {
47 | "body-parser": "^1.15.2",
48 | "cookie-parser": "^1.4.3",
49 | "express": "^4.14.0",
50 | "express-http-proxy": "^0.10.0",
51 | "express-session": "^1.14.1",
52 | "glob": "^7.0.3",
53 | "https-proxy-agent": "^1.0.0",
54 | "json-server": "^0.8.10",
55 | "lodash": "^4.11.2",
56 | "passport": "^0.3.2",
57 | "passport-oauth2-middleware": "^1.0.2",
58 | "passport-predix-oauth": "^0.1.2",
59 | "url": "^0.11.0"
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/public/_index-inline-loading-script.js:
--------------------------------------------------------------------------------
1 | // Below is a fast app loading script
2 | // The script async & lazy-loads webcomponents-lite polyfill
3 | // then checks for Polymer element
4 | // then removes #splash div to reveal application UI in #app
5 | (function() {
6 |
7 | // Wait for async loading of elements.html bundle
8 | var onWebComponentsLoaded = function() {
9 | var mainElementLink = document.querySelector('#main-element-import');
10 | if (mainElementLink.import && mainElementLink.import.readyState === 'complete') {
11 | onMainElementLoaded();
12 | } else {
13 | mainElementLink.addEventListener('load', onMainElementLoaded);
14 | }
15 | };
16 |
17 | // Remove #splash div and 'loading' class from body
18 | var onMainElementLoaded = function() {
19 | // Fade splash screen, then remove
20 | var splashEl = document.getElementById('splash');
21 | splashEl.parentNode.removeChild(splashEl);
22 | };
23 |
24 | // load webcomponents polyfills
25 | if ('registerElement' in document && 'import' in document.createElement('link') && 'content' in
26 | document.createElement('template')) {
27 | // browser has web components, no need to load webcomponents polyfill
28 | onWebComponentsLoaded();
29 | } else {
30 | // polyfill web components
31 | var polyfill = document.createElement('script');
32 | polyfill.async = true;
33 | polyfill.src = '../../bower_components/webcomponentsjs/webcomponents-lite.min.js';
34 | polyfill.onload = onWebComponentsLoaded;
35 | document.head.appendChild(polyfill);
36 | }
37 |
38 | }());
39 |
--------------------------------------------------------------------------------
/public/_index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Predix UI Seed
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
27 |
28 |
29 |
30 |
33 |
38 |
39 |
40 |
44 |
45 |
46 |
48 |
49 |
50 |
51 |
52 |
53 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/public/elements/bar-chart-card/bar-chart-card.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
18 |
19 |
20 |
21 |
22 |
23 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/public/elements/data-table-card/data-table-card.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
13 |
14 |
18 |
19 |
20 |
21 |
22 |
75 |
--------------------------------------------------------------------------------
/public/elements/ge-svg-logo/ge-svg-logo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/public/elements/predix-logo/predix-logo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
36 |
37 |
38 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/public/elements/px-deck/px-deck-index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/public/elements/px-deck/px-deck.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
57 |
58 |
--------------------------------------------------------------------------------
/public/elements/seed-app/seed-app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
Seed Application
28 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
43 |
44 |
45 |
46 |
47 |
48 |
52 |
53 |
54 |
55 |
59 |
60 |
61 |
64 |
65 |
66 |
67 |
71 |
72 |
75 |
76 |
77 |
78 |
82 |
83 |
86 |
87 |
88 |
89 |
93 |
94 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
211 |
212 |
--------------------------------------------------------------------------------
/public/elements/seed-app/seed-app.scss:
--------------------------------------------------------------------------------
1 | // Settings
2 | @import "px-colors-design/_settings.colors.scss";
3 |
4 | // Generic
5 | @import "px-normalize-design/_generic.normalize.scss";
6 | @import "px-box-sizing-design/_generic.box-sizing.scss";
7 | @import "px-helpers-design/_generic.helpers.scss";
8 |
9 | // px-viewport configuration variables are documented in the px-viewport Readme.md:
10 | // https://github.com/predixdev/px-viewport-design
11 | $desk-wide-width: auto; // defaults to 100%
12 | $desk-wide-max-width: none; // defaults to 80rem
13 | $viewport-margin: 0; // defaults to auto
14 |
15 | // Base
16 | @import "px-viewport-design/_base.viewport.scss";
17 | @import "px-flexbox-design/_base.flexbox.scss";
18 | @import "px-code-design/_base.code.scss";
19 | @import "px-headings-design/_base.headings.scss";
20 |
21 | // Meta
22 | @import "px-meta-lists-design/_meta.lists.scss";
23 |
24 | // Objects
25 | $inuit-enable-btn--bare : true;
26 |
27 | @import "px-buttons-design/_objects.buttons.scss";
28 |
29 | $inuit-enable-layout--small : true;
30 | $inuit-enable-layout--flush : true;
31 | $inuit-enable-layout--full : true;
32 |
33 | @import "px-layout-design/_objects.layout.scss";
34 |
35 | @import "../../seed-theme.scss";
36 |
37 | [role=banner], [role=contentinfo] {
38 | height: calculateRem(60px);
39 | background: var(--px-seed-header-background-color);
40 | }
41 |
42 | [role=banner] {
43 | width: 100%;
44 | display: block;
45 | margin: auto;
46 | h3 {
47 | @include inuit-font-size(20px);
48 | margin: 0;
49 | line-height: calculateRem(60px);
50 | font-weight: normal;
51 | color: var(--px-seed-header-text-color, $px-page-banner-text-color);
52 | display:inline-block;
53 | svg {
54 | margin-bottom: -.1em;
55 | }
56 |
57 | }
58 |
59 | h3.app-title {
60 | color: var(--px-seed-header-text-color, $gray4);
61 | }
62 |
63 | h3.logo {
64 | color: var(--px-seed-header-text-color, $gray6);
65 | }
66 |
67 | }
68 |
69 | .content-wrapper {
70 | position: relative;
71 | display: flex;
72 | }
73 |
74 | header > div.viewport {
75 | margin: 0 15px;
76 | }
77 |
78 | main {
79 | min-height: calc(100vh - #{calculateRem(120px)});
80 | margin-left: 0;
81 | background-color: var(--px-seed-app-main-content-area-background-color, $px-page-main-content-area-background-color);
82 | overflow-x: hidden;
83 | @include media-query(portable) {
84 | margin-left: calculateRem(55px);
85 | };
86 | @include media-query(desk) {
87 | margin-left: 0;
88 | };
89 | flex: 1;
90 | }
91 |
92 | [role=contentinfo] {
93 | @include inuit-font-size(12px);
94 | position: absolute;
95 | bottom: 0;
96 | width: 100%;
97 | color: $px-page-link-color;
98 | a {
99 | text-decoration: none;
100 | color: $px-page-link-color;
101 | &:hover {
102 | text-decoration: underline;
103 | }
104 | }
105 | }
106 |
107 | // Trumps
108 | $inuit-enable-margins--tiny : true;
109 | $inuit-enable-margins--small : true;
110 | $inuit-enable-margins--large : true;
111 | $inuit-enable-margins--huge : true;
112 | $inuit-enable-margins--none : true;
113 | $inuit-enable-margins--rtl : true;
114 | $inuit-enable-margins--negative-tiny : true;
115 | $inuit-enable-paddings : true;
116 | $inuit-enable-paddings--tiny : true;
117 | $inuit-enable-paddings--small : true;
118 | $inuit-enable-paddings--large : true;
119 | $inuit-enable-paddings--huge : true;
120 | $inuit-enable-paddings--none : true;
121 |
122 | @import "px-spacing-design/_trumps.spacing.scss";
123 | @import "px-widths-design/_trumps.widths.scss";
124 |
--------------------------------------------------------------------------------
/public/elements/seed-footer/seed-footer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |