fix: viya deploy updating index html based on URL
This commit is contained in:
@ -345,14 +345,17 @@ export class AutomaticComponent implements OnInit {
|
|||||||
* This is needed to ensure that the DC will use the same compute context `makedata` service used to run against.
|
* This is needed to ensure that the DC will use the same compute context `makedata` service used to run against.
|
||||||
*/
|
*/
|
||||||
public async updateIndexHtmlComputeContext() {
|
public async updateIndexHtmlComputeContext() {
|
||||||
|
const filenamePath = location.search.split('/').pop()
|
||||||
|
const filename = filenamePath?.includes('.') ? filenamePath : 'DataController.html'
|
||||||
|
|
||||||
const indexHtmlContent = await this.sasService.getFileContent(
|
const indexHtmlContent = await this.sasService.getFileContent(
|
||||||
`${this.appLoc}/services`,
|
`${this.appLoc}/services`,
|
||||||
'DataController.html'
|
filename
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!indexHtmlContent) {
|
if (!indexHtmlContent) {
|
||||||
this.loggerService.error(
|
this.loggerService.error(
|
||||||
`Failed to get DataController.html at ${this.appLoc}/services`
|
`Failed to get ${filename} at ${this.appLoc}/services`
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -376,7 +379,7 @@ export class AutomaticComponent implements OnInit {
|
|||||||
await this.sasService
|
await this.sasService
|
||||||
.updateFileContent(
|
.updateFileContent(
|
||||||
`${this.appLoc}/services`,
|
`${this.appLoc}/services`,
|
||||||
'DataController.html',
|
filename,
|
||||||
updatedContent
|
updatedContent
|
||||||
)
|
)
|
||||||
.catch((err: any) => {
|
.catch((err: any) => {
|
||||||
|
Reference in New Issue
Block a user