Skip to content

Commit

Permalink
fix: upload path added, sasjsconfig in index.html, images base64 encoded
Browse files Browse the repository at this point in the history
  • Loading branch information
medjedovicm authored and allanbowe committed Sep 23, 2021
1 parent 5e4ab0f commit 2111179
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 49 deletions.
57 changes: 19 additions & 38 deletions sasjs/sasjsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"programFolders": [],
"serviceConfig": {
"serviceFolders": [
"sasjs/services/common"
"sasjs/services/common",
"sasjs/services/files"
],
"initProgram": "",
"termProgram": "",
Expand Down Expand Up @@ -42,21 +43,6 @@
"buildResultsFolder": "sasjsresults",
"buildOutputFolder": "sasjsbuild"
},
"jobConfig": {
"jobFolders": [],
"initProgram": "",
"termProgram": "",
"macroVars": {}
},
"serviceConfig": {
"serviceFolders": [
"sasjs/services/common",
"sasjs/services/files"
],
"initProgram": "",
"termProgram": "",
"macroVars": {}
},
"streamConfig": {
"assetPaths": [],
"streamWeb": false,
Expand All @@ -74,38 +60,33 @@
},
{
"name": "sas9",
"serverUrl": "https://sas.analytium.co.uk:8343",
"serverType": "SAS9",
"serverUrl": "YOURSAS9SERVER",
"allowInsecureRequests": false,
"appLoc": "/Public/app/angular-seed-app",
"macroFolders": [],
"programFolders": [],
"buildConfig": {
"buildOutputFileName": "mysas9deploy.sas"
},
"deployConfig": {
"deployServicePack": true,
"deployScripts": [
"sasjsbuild/mysas9deploy.sas"
]
},
"serviceConfig": {
"serviceFolders": [],
"initProgram": "",
"termProgram": "",
"macroVars": {}
},
"jobConfig": {
"jobFolders": [],
"buildOutputFileName": "mysas9deploy.sas",
"buildResultsFolder": "sasjsresults",
"buildOutputFolder": "sasjsbuild",
"initProgram": "",
"termProgram": "",
"macroVars": {}
},
"serverName": "SASApp",
"repositoryName": "Foundation",
"streamConfig": {
"assetPaths": [],
"streamWeb": false,
"streamWeb": true,
"streamWebFolder": "web9",
"webSourcePath": "dist"
}
"webSourcePath": "dist",
"streamServiceName": "clickme"
},
"deployConfig": {
"deployServicePack": true,
"deployScripts": []
},
"serverName": "SASApp",
"repositoryName": "Foundation"
}
]
}
2 changes: 1 addition & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<header class="header-6">
<div class="branding">
<img src="./assets/logo-white.png" />
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFUAAABVCAYAAAA49ahaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF3mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMCAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjA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reULCC7lRuBWM/tiqsaIIvPqPlB8BfB2wnb3GQSL5B7gDjM7qnCSupNrX8o4yiB1kTRJlwPrzexHsco4/pfJkj4lrY57ZenvJYTG/FIGUGU8ddBzUFUg7QKkU4EJaYko/NBlkVr2bmo6BZJ/mVGj4/pPlkW1p1IchpLUGsUY98bfaYma1ApQk1oBalIrQE1qBahJrQA1qRWgJrUC1KRWgJrUClCTWgFqUivA/wFN68Swq76GyQAAAABJRU5ErkJggg==" />
</div>
<div class="header-nav">
<a routerLinkActive="active" routerLink="/homepage" class="nav-link nav-text">Homepage</a>
Expand Down
11 changes: 3 additions & 8 deletions src/app/sas.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ export class SasService {
private sasService: any;

constructor(private stateService: StateService) {
this.sasService = new SASjs({
serverUrl: '',
appLoc: '/Public/app/angular-seed-app',
serverType: 'SASVIYA',
debug: true,
useComputeApi: true,
contextName: 'SAS Job Execution compute context',
});
let sasjsConfigInput = (window as any).sasjsConfigInput || {}

this.sasService = new SASjs(sasjsConfigInput);
}

public fetchStartupData() {
Expand Down
9 changes: 9 additions & 0 deletions src/app/uploader/uploader.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
<input (change)="onFileChange($event)" type="file" id="fileToUpload">
</div>

<div class="clr-form-control">
<label for="example" class="clr-control-label">Upload path</label>
<div class="clr-control-container">
<div class="clr-input-wrapper">
<input [(ngModel)]="uploadPath" style="width: 230px;" type="text" id="example" placeholder="Enter path" class="clr-input" />
</div>
</div>
</div>

<hr style="margin-top: 20px; width: 100%;"/>
<button (click)="submit()" [clrLoading]="uploadLoading" class="btn btn-primary">upload</button>
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/app/uploader/uploader.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { SasService } from '../sas.service';
export class UploaderComponent implements OnInit {
public selectedFiles: any[] = []
public uploadUrl: string = 'services/files/upload'
public uploadPath: string = ''
public responseModalMessage: string | null = null
public uploadLoading: boolean = false

Expand Down Expand Up @@ -44,9 +45,9 @@ export class UploaderComponent implements OnInit {
fileName: file.name
})
}

console.log('this.uploadPath', this.uploadPath)
this.sasService
.uploadFile(this.uploadUrl, filesToUpload)
.uploadFile(this.uploadUrl, filesToUpload, { path: this.uploadPath })
.then(
(res: any) => {
console.log('res', res)
Expand Down
10 changes: 10 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
<base href="./" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />

<script type="text/javascript">
window.sasjsConfigInput = {
appLoc: '/Public/app/angular-seed-app',
serverType: 'SASVIYA',
debug: true,
useComputeApi: true,
contextName: 'SAS Job Execution compute context',
}
</script>
</head>
<body class="mat-typography">
<app-root></app-root>
Expand Down

0 comments on commit 2111179

Please sign in to comment.