Skip to content

Commit

Permalink
feat: added sasjs
Browse files Browse the repository at this point in the history
  • Loading branch information
medjedovicm authored and allanbowe committed Aug 24, 2020
1 parent ec766bb commit 9c08257
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
dist
dist
sasjsbuild/
.sasjsrc
11 changes: 5 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build-watch": "ng build --watch",
"sync": "./node_modules/.bin/watch --wait=3 \"echo Account: ${npm_config_account} && npm run ${npm_config_serverType} --account=${npm_config_account} && echo 'App is synced!'\" dist",
"sas9": "rsync -avhe ssh ./dist/* --delete ${npm_config_account}@sas.domain.com:/opt/sas/sas9/config/Lev1/Web/WebServer/htdocs/${npm_config_account}/ngseed",
"viya": "rsync -avhe ssh ./dist/* --delete ${npm_config_account}@sas.domain.com:/var/www/html/${npm_config_account}/ngseed"
"viya": "rsync -avhe ssh ./dist/* --delete ${npm_config_account}@sas.analytium.co.uk:/var/www/html/${npm_config_account}/ngseed"
},
"private": true,
"dependencies": {
Expand All @@ -29,6 +29,7 @@
"@clr/icons": "4.0.0",
"@clr/ui": "4.0.0",
"@sasjs/adapter": "^1.3.8",
"@sasjs/core": "^1.3.0",
"@webcomponents/webcomponentsjs": "^2.4.4",
"moment": "^2.24.0",
"rxjs": "~6.6.2",
Expand Down
Empty file added sasjs/macros/.gitkeep
Empty file.
41 changes: 41 additions & 0 deletions sasjs/sasjsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"cmnMacros": [
"macros"
],
"cmnServices": [
"services/common"
],
"useMacroCore": true,
"targets": [
{
"name": "viya",
"serverType": "SASVIYA",
"serverUrl": "YOURSASVIYASERVER",
"appLoc": "/Public/app/react-seed-app",
"buildOutputFileName": "myviyadeploy.sas",
"deployServicePack": true,
"tgtDeployScripts": [
"sasjsbuild/myviyadeploy.sas"
],
"assetPaths": [],
"streamWeb": false,
"streamWebFolder": "webv",
"webSourcePath": "dist"
},
{
"name": "sas9",
"serverType": "SAS9",
"serverUrl": "YOURSAS9SERVER",
"appLoc": "/User Folders/&sysuserid/My Folder/react-seed-app",
"buildOutputFileName": "mysas9deploy.sas",
"tgtDeployVars": {
"serverName": "SASApp",
"repositoryName": "Foundation"
},
"assetPaths": [],
"streamWeb": false,
"streamWebFolder": "web9",
"webSourcePath": "build"
}
]
}
15 changes: 15 additions & 0 deletions sasjs/services/common/appinit.sas
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
@file appinit.sas
@brief Initialisation service - runs on app startup
@details This is always the first service called when the app is opened.
<h4> Dependencies </h4>
**/

proc sql;
create table areas as select distinct area
from sashelp.springs;
%webout(OPEN)
%webout(OBJ,areas)
%webout(CLOSE)
16 changes: 16 additions & 0 deletions sasjs/services/common/getdata.sas
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
@file getdata.sas
@brief Get Data service - runs on app startup
@details This is always the first service called when the app is opened.
<h4> Dependencies </h4>
**/

proc sql;
create table springs as select * from sashelp.springs
where area in (select area from areas);

%webout(OPEN)
%webout(OBJ,springs)
%webout(CLOSE)

0 comments on commit 9c08257

Please sign in to comment.