Skip to content

Commit

Permalink
Release 2.0.55
Browse files Browse the repository at this point in the history
  • Loading branch information
predix-adoption-bot committed Oct 26, 2018
1 parent 8162d7c commit 0e55ac7
Show file tree
Hide file tree
Showing 24 changed files with 20,215 additions and 154 deletions.
20,060 changes: 20,060 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "predix-webapp-starter",
"version": "2.0.53",
"version": "2.0.55",
"private": true,
"engines": {
"node": ">=0.10.0"
Expand Down
2 changes: 1 addition & 1 deletion public/elements/asset-browser/asset-browser.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
},

_getSelectedAssetUri: function() {
return '/asset/' + (localStorage.getItem('clonedAssetId') || 'compressor-2017');
return '/asset/' + (localStorage.getItem('clonedAssetId') || 'Compressor-CMMS-Compressor-2018');
},

/**
Expand Down
4 changes: 2 additions & 2 deletions public/elements/views/rmd-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<style include="rmd-view-styles">
</style>
<div>
<asset-browser id="assetBrowser" asset-model="{{rmdAssetModel}}" opened-asset="{{openedAsset}}" asset-query-url="/api/predix-asset/asset/compressor-2017"
<asset-browser id="assetBrowser" asset-model="{{rmdAssetModel}}" opened-asset="{{openedAsset}}" asset-query-url="/api/predix-asset/asset/Compressor-CMMS-Compressor-2018"
asset-group-query-url="/api/predix-asset/group">
</asset-browser>
</div>
Expand Down Expand Up @@ -127,7 +127,7 @@ <h1 class="delta u-pl++" style="display:inline;">Asset Health</h1>
// console.log('********* in rmd-view, the value of uri is ' + this.uri);
this.$.datatableAjaxEl.url = "/api/datagrid" + newVal.uri;
this.$.kpiBarAjaxEl.url = this.$.datatableAjaxEl.url + '/summary';
this.assetIsAClone = (newVal.uri !== '/asset/compressor-2017');
this.assetIsAClone = (newVal.uri !== '/asset/Compressor-CMMS-Compressor-2018');
this.$.datatableAjaxEl.generateRequest();
if (newVal.assetTag) {
this.displayTags = this._formatTagsForDisplay(newVal.assetTag);
Expand Down
2 changes: 1 addition & 1 deletion public/elements/views/simple-asset-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h3>{{assetDescription}}</h3>
<!-- Second option loads compressor data from Predix Time Series directly.
You can use this option if you used the fast install script. -->
<!-- real-asset-service
<iron-ajax url="/predix-api/predix-asset/asset/compressor-2017" id="assetQueryElement" last-response="{{rawAssetData}}" auto></iron-ajax>
<iron-ajax url="/predix-api/predix-asset/asset/Compressor-CMMS-Compressor-2018" id="assetQueryElement" last-response="{{rawAssetData}}" auto></iron-ajax>
end real-asset-service -->

<!-- Third option loads jet engine data from Predix Time Series directly.
Expand Down
8 changes: 4 additions & 4 deletions scripts/quickstart-predix-webapp-starter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ function init() {

#get the script that reads version.json
eval "$(curl -s -L $IZON_SH)"

#download the script and cd
getUsingCurl $SCRIPT_LOC
chmod 755 $SCRIPT_NAME;
#getUsingCurl $SCRIPT_LOC
#chmod 755 $SCRIPT_NAME;
if [[ ! $currentDir == *"$REPO_NAME" ]]; then
mkdir -p $APP_DIR
cd $APP_DIR
fi


getVersionFile
getLocalSetupFuncs $GITHUB_RAW
}
Expand Down
2 changes: 1 addition & 1 deletion server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var app = express();
var httpServer = http.createServer(app);
var dataExchange = require('./routes/data-exchange');
// var fs = require("fs");
// var assettemplatefile = "sample-data/predix-asset/compressor-2017-clone.json";
// var assettemplatefile = "sample-data/predix-asset/Compressor-CMMS-Compressor-2018-clone.json";

/**********************************************************************
SETTING UP EXRESS SERVER
Expand Down
14 changes: 7 additions & 7 deletions server/localConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
{
"development": {
"note": "Out of the box, the predix-webapp-starter app uses mock data, so these values are not required. Set these values for connecting to real Predix services.",
"uaaURL": "{The UAA URI end point to get auth token }",
"base64ClientCredential": "{Get clientID:clientSecret for services then base64 encode and place it here}",
"loginBase64ClientCredential": "{Get clientID:clientSecret for app login then base64 encode and place it here}",
"uaaURL": " https://6689be5f-1bdf-4fc0-bbda-dcea2b371b77.predix-uaa.run.aws-usw02-pr.ice.predix.io",
"base64ClientCredential": "YXBwX2NsaWVudF9pZDpzZWNyZXQ=",
"loginBase64ClientCredential": "bG9naW5fY2xpZW50X2lkOnNlY3JldA==",
"appURL": "http://localhost:5000",
"timeseriesURL": "{Time Series URL from VCAPS}",
"timeseriesZoneId": "{The Zone ID for the Timeseries Service Created}",
"assetURL": "{Asset URL from VCAPS}",
"assetZoneId": "{The Zone ID for the Asset Service Created}",
"timeseriesURL": "https://time-series-store-predix.run.aws-usw02-pr.ice.predix.io/v1/datapoints",
"timeseriesZoneId": "85665ade-c0e7-4e27-920a-ae38a5b02347",
"assetURL": "https://predix-asset.run.aws-usw02-pr.ice.predix.io",
"assetZoneId": "6b6121b0-81e3-4297-8c35-007ebf74faef",
"windServiceURL": "{URL of the microservice <your-name>-winddata-timeseries-service}, e.g. https://your-name-winddata-timeseries-service.run.asw-usw02-pr.predix.io",
"websocketServerURL": "/livestream",
"rmdDatasourceURL": "{URL of your RMD datasource microservice}",
Expand Down
2 changes: 1 addition & 1 deletion server/routes/data-exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const cloneAsset = function(req, res) {

var rawClone = fs.readFileSync(path.join(__dirname, assettemplatefile), 'utf8');
var uniqueRequestString = req.ip.replace(/:/g, '_') + '-' + now;
var result = rawClone.replace(/compressor-2017/g, uniqueRequestString);
var result = rawClone.replace(/Compressor-CMMS-Compressor-2018/g, uniqueRequestString);
var putFieldDataRequest = JSON.parse(result);
putFieldDataRequest.putFieldDataCriteria[0].fieldData.data.map[0].description = assetName;
putFieldDataRequest.putFieldDataCriteria[0].fieldData.data.map[0].createdDate = now;
Expand Down
4 changes: 2 additions & 2 deletions server/routes/mock-asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module.exports = function() {
const routes = {};

// http://localhost:5000/mock-api/predix-asset/asset?filter=group=/group/plant-richmond-refinery
const compressorJson = require(path.resolve(__dirname, '../sample-data/predix-asset/compressor-2017.json'));
routes["asset/compressor-2017"] = compressorJson;
const compressorJson = require(path.resolve(__dirname, '../sample-data/predix-asset/Compressor-CMMS-Compressor-2018.json'));
routes["asset/Compressor-CMMS-Compressor-2018"] = compressorJson;

// http://localhost:5000/mock-api/predix-asset/group?filter=parent=/group/enterprise-predix
const groupsJson = require(path.resolve(__dirname, '../sample-data/predix-asset/groups.json'));
Expand Down
16 changes: 8 additions & 8 deletions server/routes/mock-live-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ const ws = require('ws');

// hardcode thresholds for demonstration:
const thresholds = {
"Compressor-2017:CompressionRatio": [2.5, 3],
"Compressor-2017:DischargePressure": [0, 23],
"Compressor-2017:SuctionPressure": [0, 0.21],
"Compressor-2017:MaximumPressure": [22, 26],
"Compressor-2017:Velocity": [0, 0.07],
"Compressor-2017:Temperature": [65, 80]
"Compressor-CMMS-Compressor-2018:CompressionRatio": [2.5, 3],
"Compressor-CMMS-Compressor-2018:DischargePressure": [0, 23],
"Compressor-CMMS-Compressor-2018:SuctionPressure": [0, 0.21],
"Compressor-CMMS-Compressor-2018:MaximumPressure": [22, 26],
"Compressor-CMMS-Compressor-2018:Velocity": [0, 0.07],
"Compressor-CMMS-Compressor-2018:Temperature": [65, 80]
};

function getRandomData(tag) {
let threshold = thresholds[tag] || thresholds['Compressor-2017:CompressionRatio'];
let threshold = thresholds[tag] || thresholds['Compressor-CMMS-Compressor-2018:CompressionRatio'];
let range = (threshold[1] - threshold[0]) * 1.2;
let low = threshold[0] - ((threshold[1] - threshold[0]) * 0.1);
let value = Math.random() * range + low;
Expand All @@ -29,7 +29,7 @@ function createWebSocketServer(httpServer) {
console.log('connection opened: ', socket.upgradeReq.url);
let path = socket.upgradeReq.url || "";
if (path === "" || path === "/") {
path = "/Compressor-2017:CompressionRatio";
path = "/Compressor-CMMS-Compressor-2018:CompressionRatio";
}
const tagName = path.substring(path.lastIndexOf("/") + 1);
console.log('web socket opened for tag:', tagName);
Expand Down
4 changes: 2 additions & 2 deletions server/routes/mock-rmd-datasource.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ module.exports = function() {
const routes = {};
const compressorJson = require(path.resolve(__dirname, '../sample-data/rmd-datasource/datagrid-compressor.json'));
const summaryJson = require(path.resolve(__dirname, '../sample-data/rmd-datasource/summary-compressor.json'));
// http://localhost:5000/mock-api/datagrid/asset/compressor-2017
// http://localhost:5000/mock-api/datagrid/asset/Compressor-CMMS-Compressor-2018
routes["asset/:id"] = compressorJson;

// http://localhost:5000/mock-api/datagrid/asset/compressor-2017/summary
// http://localhost:5000/mock-api/datagrid/asset/Compressor-CMMS-Compressor-2018/summary
routes["summary"] = summaryJson;
routes["asset/:id/summary"] = summaryJson;

Expand Down
2 changes: 1 addition & 1 deletion server/routes/mock-time-series.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var router = express.Router();

router.use(['/v1/datapoints', '/compression-ratio'], function(req, res) {
// TODO: Add support to return different data based on request body. use body-parser
// const compressorJson = require(path.resolve(__dirname, '../sample-data/time-series/compressor-2017-compression-ratio.json'));
// const compressorJson = require(path.resolve(__dirname, '../sample-data/time-series/Compressor-CMMS-Compressor-2018-compression-ratio.json'));
const compressorJson = require(path.resolve(__dirname, '../sample-data/time-series/2-tags.json'));
res.send(compressorJson);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"field": [{
"fieldIdentifier": {
"complexType": "FieldIdentifier",
"id": "/asset/compressor-2017",
"id": "/asset/Compressor-CMMS-Compressor-2018",
"source": "PREDIX_ASSET"
},
"parents": []
Expand All @@ -14,9 +14,9 @@
"complexType": "DataMapList",
"map": [{
"complexType": "Asset",
"uri": "/asset/compressor-2017",
"uri": "/asset/Compressor-CMMS-Compressor-2018",
"classificationUri": "/classification/GE_COMPRESSOR_CYLINDER",
"assetId": "compressor-2017",
"assetId": "Compressor-CMMS-Compressor-2018",
"description": "base for cloning",
"group": "/group/plant-richmond-refinery",
"assetTag": {
Expand All @@ -29,14 +29,14 @@
"isKpi": true,
"timeseriesDatasource": {
"complexType": "TimeseriesDatasource",
"tag": "Compressor-2017:CompressionRatio"
"tag": "Compressor-CMMS-Compressor-2018:CompressionRatio"
},
"edgeDatasource": {
"complexType": "EdgeDatasource",
"nodeName": "Compressor-2017:CompressionRatio",
"nodeName": "Compressor-CMMS-Compressor-2018:CompressionRatio",
"controllerUri": "/asset/Bently.Nevada.3500.Rack1"
},
"alertStatusUri": "/asset/compressor-2017.alert-status.crank-frame-compressionratio"
"alertStatusUri": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-compressionratio"
},
"crank-frame-dischargepressure": {
"complexType": "AssetTag",
Expand All @@ -47,14 +47,14 @@
"isKpi": true,
"timeseriesDatasource": {
"complexType": "TimeseriesDatasource",
"tag": "Compressor-2017:DischargePressure"
"tag": "Compressor-CMMS-Compressor-2018:DischargePressure"
},
"edgeDatasource": {
"complexType": "EdgeDatasource",
"nodeName": "Compressor-2017:DischargePressure",
"nodeName": "Compressor-CMMS-Compressor-2018:DischargePressure",
"controllerUri": "/asset/Bently.Nevada.3500.Rack1"
},
"alertStatusUri": "/asset/compressor-2017.alert-status.crank-frame-discharge-pressure"
"alertStatusUri": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-discharge-pressure"
},
"crank-frame-suctionpressure": {
"complexType": "AssetTag",
Expand All @@ -64,14 +64,14 @@
"loAlarmThreshold": 0,
"timeseriesDatasource": {
"complexType": "TimeseriesDatasource",
"tag": "Compressor-2017:SuctionPressure"
"tag": "Compressor-CMMS-Compressor-2018:SuctionPressure"
},
"edgeDatasource": {
"complexType": "EdgeDatasource",
"nodeName": "Compressor-2017:SuctionPressure",
"nodeName": "Compressor-CMMS-Compressor-2018:SuctionPressure",
"controllerUri": "/asset/Bently.Nevada.3500.Rack1"
},
"alertStatusUri": "/asset/compressor-2017.alert-status.crank-frame-suctionpressure"
"alertStatusUri": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-suctionpressure"
},
"crank-frame-maxpressure": {
"complexType": "AssetTag",
Expand All @@ -81,14 +81,14 @@
"loAlarmThreshold": 22,
"timeseriesDatasource": {
"complexType": "TimeseriesDatasource",
"tag": "Compressor-2017:MaximumPressure"
"tag": "Compressor-CMMS-Compressor-2018:MaximumPressure"
},
"edgeDatasource": {
"complexType": "EdgeDatasource",
"nodeName": "Compressor-2017:MaximumPressure",
"nodeName": "Compressor-CMMS-Compressor-2018:MaximumPressure",
"controllerUri": "/asset/Bently.Nevada.3500.Rack1"
},
"alertStatusUri": "/asset/compressor-2017.alert-status.crank-frame-maxpressure"
"alertStatusUri": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-maxpressure"
},
"crank-frame-velocity": {
"complexType": "AssetTag",
Expand All @@ -98,14 +98,14 @@
"loAlarmThreshold": 0,
"timeseriesDatasource": {
"complexType": "TimeseriesDatasource",
"tag": "Compressor-2017:Velocity"
"tag": "Compressor-CMMS-Compressor-2018:Velocity"
},
"edgeDatasource": {
"complexType": "EdgeDatasource",
"nodeName": "Compressor-2017:Velocity",
"nodeName": "Compressor-CMMS-Compressor-2018:Velocity",
"controllerUri": "/asset/Bently.Nevada.3500.Rack1"
},
"alertStatusUri": "/asset/compressor-2017.alert-status.crank-frame-velocity"
"alertStatusUri": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-velocity"
},
"crank-frame-temperature": {
"complexType": "AssetTag",
Expand All @@ -115,14 +115,14 @@
"loAlarmThreshold": 65,
"timeseriesDatasource": {
"complexType": "TimeseriesDatasource",
"tag": "Compressor-2017:Temperature"
"tag": "Compressor-CMMS-Compressor-2018:Temperature"
},
"edgeDatasource": {
"complexType": "EdgeDatasource",
"nodeName": "Compressor-2017:Temperature",
"nodeName": "Compressor-CMMS-Compressor-2018:Temperature",
"controllerUri": "/asset/Bently.Nevada.3500.Rack1"
},
"alertStatusUri": "/asset/compressor-2017.alert-status.crank-frame-temperature"
"alertStatusUri": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-temperature"
}
},
"attributes": {
Expand All @@ -141,9 +141,9 @@
}
}, {
"complexType": "Asset",
"uri": "/asset/compressor-2017.alert-status.crank-frame-discharge-pressure",
"uri": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-discharge-pressure",
"classificationUri": "/classification/alert-status",
"assetId": "/asset/compressor-2017.alert-status.crank-frame-discharge-pressure",
"assetId": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-discharge-pressure",
"attributes": {
"alertStatus": {
"complexType": "Attribute",
Expand Down Expand Up @@ -203,9 +203,9 @@
}
}, {
"complexType": "Asset",
"uri": "/asset/compressor-2017.alert-status.crank-frame-compressionratio",
"uri": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-compressionratio",
"classificationUri": "/classification/alert-status",
"assetId": "/asset/compressor-2017.alert-status.crank-frame-compressionratio",
"assetId": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-compressionratio",
"attributes": {
"alertStatus": {
"complexType": "Attribute",
Expand Down Expand Up @@ -265,9 +265,9 @@
}
}, {
"complexType": "Asset",
"uri": "/asset/compressor-2017.alert-status.crank-frame-suctionpressure",
"uri": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-suctionpressure",
"classificationUri": "/classification/alert-status",
"assetId": "/asset/compressor-2017.alert-status.crank-frame-suctionpressure",
"assetId": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-suctionpressure",
"attributes": {
"alertStatus": {
"complexType": "Attribute",
Expand Down Expand Up @@ -327,9 +327,9 @@
}
}, {
"complexType": "Asset",
"uri": "/asset/compressor-2017.alert-status.crank-frame-maxpressure",
"uri": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-maxpressure",
"classificationUri": "/classification/alert-status",
"assetId": "/asset/compressor-2017.alert-status.crank-frame-maxpressure",
"assetId": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-maxpressure",
"attributes": {
"alertStatus": {
"complexType": "Attribute",
Expand Down Expand Up @@ -389,9 +389,9 @@
}
}, {
"complexType": "Asset",
"uri": "/asset/compressor-2017.alert-status.crank-frame-velocity",
"uri": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-velocity",
"classificationUri": "/classification/alert-status",
"assetId": "/asset/compressor-2017.alert-status.crank-frame-velocity",
"assetId": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-velocity",
"attributes": {
"alertStatus": {
"complexType": "Attribute",
Expand Down Expand Up @@ -451,9 +451,9 @@
}
}, {
"complexType": "Asset",
"uri": "/asset/compressor-2017.alert-status.crank-frame-temperature",
"uri": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-temperature",
"classificationUri": "/classification/alert-status",
"assetId": "/asset/compressor-2017.alert-status.crank-frame-temperature",
"assetId": "/asset/Compressor-CMMS-Compressor-2018.alert-status.crank-frame-temperature",
"attributes": {
"alertStatus": {
"complexType": "Attribute",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"filter": {
"complexType": "AssetFilter",
"uri": "/asset/compressor-2017"
"uri": "/asset/Compressor-CMMS-Compressor-2018"
}
},
{
Expand Down Expand Up @@ -53,7 +53,7 @@
},
"filter": {
"complexType": "AssetFilter",
"uri": "/asset/compressor-2017"
"uri": "/asset/Compressor-CMMS-Compressor-2018"
}
},
{
Expand All @@ -70,7 +70,7 @@
],
"data": {
"complexType": "PredixString",
"string": "{\n\t\"fieldChangedList\": {\n\t\t\"fieldChanged\": [{\n\t\t\t\"assetList\": {\n\t\t\t\t\"asset\": [{\n\t\t\t\t\t\"uri\": \"/asset/compressor-2017\",\n\t\t\t\t\t\"assetType\": \"asset\",\n\t\t\t\t\t\"fieldList\": {\n\t\t\t\t\t\t\"field\": [{\n\t\t\t\t\t\t\t\"fieldKey\": \"/asset/assetTag/crank-frame-velocity\",\n\t\t\t\t\t\t\t\"fieldValue\": \"\",\n\t\t\t\t\t\t\t\"fieldType\": \"assetTag\",\n\t\t\t\t\t\t\t\"timeChanged\": \"2017-07-11T07:16:13.000Z\"\n\t\t\t\t\t\t}]\n\t\t\t\t\t}\n\t\t\t\t}]\n\t\t\t},\n\t\t\t\"externalAttributeMap\": {\n\t\t\t\t\"entry\": [{\n\t\t\t\t\t\"key\": \"\",\n\t\t\t\t\t\"value\": \"\"\n\t\t\t\t}]\n\t\t\t}\n\t\t}]\n\t}\n}"
"string": "{\n\t\"fieldChangedList\": {\n\t\t\"fieldChanged\": [{\n\t\t\t\"assetList\": {\n\t\t\t\t\"asset\": [{\n\t\t\t\t\t\"uri\": \"/asset/Compressor-CMMS-Compressor-2018\",\n\t\t\t\t\t\"assetType\": \"asset\",\n\t\t\t\t\t\"fieldList\": {\n\t\t\t\t\t\t\"field\": [{\n\t\t\t\t\t\t\t\"fieldKey\": \"/asset/assetTag/crank-frame-velocity\",\n\t\t\t\t\t\t\t\"fieldValue\": \"\",\n\t\t\t\t\t\t\t\"fieldType\": \"assetTag\",\n\t\t\t\t\t\t\t\"timeChanged\": \"2017-07-11T07:16:13.000Z\"\n\t\t\t\t\t\t}]\n\t\t\t\t\t}\n\t\t\t\t}]\n\t\t\t},\n\t\t\t\"externalAttributeMap\": {\n\t\t\t\t\"entry\": [{\n\t\t\t\t\t\"key\": \"\",\n\t\t\t\t\t\"value\": \"\"\n\t\t\t\t}]\n\t\t\t}\n\t\t}]\n\t}\n}"
}
}
}
Expand Down
Loading

0 comments on commit 0e55ac7

Please sign in to comment.