Skip to content

Commit

Permalink
Fixed umlyuts and OS Authentication added
Browse files Browse the repository at this point in the history
  • Loading branch information
evshvarov committed Mar 8, 2019
1 parent 5b62865 commit 8e50b54
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 14 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ RUN iris start $ISC_PACKAGE_INSTANCENAME quietly EmergencyId=sys,sys && \
" Do ##class(Security.Users).UnExpireUserPasswords(\"*\")\n" \
" Do ##class(Security.Users).AddRoles(\"admin\", \"%ALL\")\n" \
" do \$system.OBJ.Load(\"/opt/app/dswinstaller.cls\",\"ck\")\n" \
" Do ##class(Security.System).Get(,.p)\n" \
" Set p(\"AutheEnabled\")=p(\"AutheEnabled\")+16\n" \
" Do ##class(Security.System).Modify(,.p)\n" \
" set ^%SYS(\"CSP\",\"DefaultFileCharset\")=\"utf-8\"\n" \
# " do \$system.OBJ.Load(\"/tmp/deps/Cache-MDX2JSON-master/MDX2JSON/Installer.cls.xml\",\"ck\")\n" \
# " do \$system.OBJ.Load(\"/tmp/deps/deepseeweb.xml\",\"ck\")\n" \
" s sc=##class(DSWMDX2JSON.Installer).setup()\n" \
" If 'sc do \$zu(4, \$JOB, 1)\n" \
"do CreateDatabase^%SYS.SQLSEC(\"DCANALYTICS\",\"\",,0)\n" \
# "do CreateDatabase^%SYS.SQLSEC(\"DCANALYTICS\",\"\",,0)\n" \
"zn \"DCANALYTICS\"\n" \
" do \$system.OBJ.ImportDir(\"/opt/app/src\",,\"ck\",,1)\n" \
" do ##class(Community.Utils).setup(\"/opt/app/globals.xml\")" \
Expand Down
30 changes: 18 additions & 12 deletions dswinstaller.cls
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
Class DSWMDX2JSON.Installer
Class DSWMDX2JSON.Installer
{

XData setup [ XMLNamespace = INSTALLER ]
{
<Manifest>
<Var Name="Namespace" Value="MDX2JSON"/>
<Var Name="Namespace" Value="DCANALYTICS"/>
<Log Text="Creating namespace ${Namespace}" Level="0"/>
<Namespace Name="${Namespace}" Create="yes" Code="${Namespace}" Ensemble="" Data="${Namespace}">
<Configuration>
<Database Name="${Namespace}"
Dir="${MGRDIR}${Namespace}"
Create="yes"
Resource="%DB_${Namespace}"
PublicPermissions="RW"
MountAtStartup="true"/>
</Configuration>
</Namespace>
<Log Text="End Creating namespace ${Namespace}" Level="0"/>
<Var Name="Namespace" Value="MDX2JSON"/>
<Var Name="Import" Value="0"/>

<If Condition='(##class(Config.Namespaces).Exists("${Namespace}")=0)'>
<Log Text="Creating namespace ${Namespace}" Level="0"/>
<Namespace Name="${Namespace}" Create="yes" Code="${Namespace}" Ensemble="" Data="${Namespace}">
<Configuration>
Expand All @@ -20,7 +31,7 @@ XData setup [ XMLNamespace = INSTALLER ]
</Configuration>
</Namespace>
<Log Text="End Creating namespace ${Namespace}" Level="0"/>
</If>


<Namespace Name="${Namespace}">
<Import File="/tmp/deps/Cache-MDX2JSON-master/MDX2JSON/" Flags="ck" Recurse="1"/>
Expand All @@ -38,17 +49,12 @@ XData setup [ XMLNamespace = INSTALLER ]
</Manifest>
}

ClassMethod setup(
ByRef pVars,
pLogLevel As %Integer = 3,
pInstaller As %Installer.Installer,
pLogger As %Installer.AbstractLogger
) As %Status [ CodeMode = objectgenerator, Internal ]
ClassMethod setup(ByRef pVars, pLogLevel As %Integer = 3, pInstaller As %Installer.Installer, pLogger As %Installer.AbstractLogger) As %Status [ CodeMode = objectgenerator, Internal ]
{
do %code.WriteLine($char(9)_"set pVars(""CURRENTCLASS"")="""_%classname_"""")
do %code.WriteLine($char(9)_"set pVars(""CURRENTNS"")="""_$namespace_"""")
#; Let our XGL document generate code for this method.
Quit ##class(%Installer.Manifest).%Generate(%compiledclass, %code, "setup")
}

}
}
12 changes: 11 additions & 1 deletion src/cls/Community/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ ClassMethod setup(globalPath As %String = "") As %Status
return sc
}

write "Enabling iKnow",!
set sc=..enableIknow()
return:$$$ISERR(sc) sc

write "Building indices", !
set sc = ..buildIndices()
return:$$$ISERR(sc) sc
Expand All @@ -29,6 +33,13 @@ ClassMethod setup(globalPath As %String = "") As %Status
return $$$OK
}

ClassMethod enableIknow() As %Status
{
set app = $System.CSP.GetDefaultApp($znspace) _ "/"
do EnableIKnow^%SYS.cspServer(app)
return $$$OK
}

ClassMethod importXMLGlobal(globalPath As %String) As %Status
{
set s=##class(%Stream.FileBinaryGzip).%New()
Expand Down Expand Up @@ -76,4 +87,3 @@ ClassMethod UpdateCubes(verbose = 1) As %Status
}

}

0 comments on commit 8e50b54

Please sign in to comment.