Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions MDX2JSON/REST.cls
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,20 @@ ClassMethod WritePivotVariablesForCube(Cube As %String) As %Status
ClassMethod WriteAddons() As %Status
{
#dim sc As %Status = $$$OK

set app = "/dsw"

set currentApp = $ZConvert($Get(%request.CgiEnvs("SCRIPT_NAME"), ""), "L")
set prefix = $piece(currentApp, "/mdx2json", 1)
set app = prefix _ "/dsw"
set path = $system.CSP.GetFileName(app _ "/")
set path = ##class(%File).NormalizeDirectory(path)
set path = ##class(%File).SubDirectoryName(path, "addons", $$$YES)
set url = app _ "/addons/"

// Check if path exists
if '##class(%File).Exists(path) {
set sc = $$$ERROR($$$GeneralError, "Addons directory does not exist: "_path_". Probably different prefixes for MDX2JSON and DSW applications.")
quit sc
}

#dim rs As %SQL.ClassQueryResultSet = ##class(%File).FileSetFunc(path, "*.js")

Expand All @@ -447,12 +455,20 @@ ClassMethod WriteThemes() As %Status
{
#dim sc As %Status = $$$OK

set app = "/dsw"
set currentApp = $ZConvert($Get(%request.CgiEnvs("SCRIPT_NAME"), ""), "L")
set prefix = $piece(currentApp, "/mdx2json", 1)
set app = prefix _ "/dsw"
set path = $system.CSP.GetFileName(app _ "/")
set path = ##class(%File).NormalizeDirectory(path)
set path = ##class(%File).SubDirectoryName(path, "themes", $$$YES)
set url = app _ "/themes/"

// Check if path exists
if '##class(%File).Exists(path) {
set sc = $$$ERROR($$$GeneralError, "Themes directory does not exist: "_path_". Probably different prefixes for MDX2JSON and DSW applications.")
quit sc
}

#dim rs As %SQL.ClassQueryResultSet = ##class(%File).FileSetFunc(path, "*.css")

set list = $$$NewDynDTList
Expand All @@ -474,4 +490,4 @@ ClassMethod WriteJSONfromKPI() As %Status [ CodeMode = objectgenerator ]
do %code.Write(base)
}

}
}
Loading