XOBWU ;ALB/MJK - HWSC :: Web Server Manager ; 09/13/10 4:00pm
;;1.0;HwscWebServiceClient;;September 13, 2010;Build 31
;
QUIT
;
EN ; -- main entry point for XOBW WEB SERVER
NEW VALMBCK
KILL ^TMP("XOB WEBSERVERS",$JOB)
SET VALMBCK=""
DO EN^VALM("XOBW WEB SERVER")
QUIT
;
HDR ; -- header code
NEW Y
SET X=" HWSC Web Server Manager"
SET VALMHDR(1)=X
SET X=" Version: "_$PIECE($TEXT(XOBWU+1),";",3)_" Build: "_$$VERSION^XOBWENV()
SET VALMHDR(2)=X
QUIT
;
INIT ; -- init variables and list array
DO CLEAR
DO MSG
QUIT
;
MSG ; -- set default message
SET VALMSG="Legend: *Enabled"
QUIT
;
BUILD ; -- build list
NEW I,XOBI,XOB0,X,XOBDATA,XOBROOT,XOBSITEI,Y
DO KILL
;
SET VALMCNT=0
SET XOBROOT=$NAME(XOBDATA("DILIST","ID"))
DO LIST^DIC(18.12,"",".01;.03;.04;.06;3.01;3.03","I","","","","","","",$NAME(XOBDATA))
SET XOBI=0
FOR SET XOBI=$ORDER(@XOBROOT@(XOBI)) QUIT:'XOBI DO
. SET VALMCNT=VALMCNT+1
. SET X=""
. SET X=$$SETFLD^VALM1(VALMCNT,X,"ID")
. SET X=$$SETFLD^VALM1($GET(@XOBROOT@(XOBI,.01)),X,"NAME")
. SET X=$$SETFLD^VALM1($GET(@XOBROOT@(XOBI,.04))_":"_$$GETPORT(.XOBROOT,XOBI),X,"IP")
. SET X=$$SETFLD^VALM1($SELECT(+$GET(@XOBROOT@(XOBI,.06)):"*",1:""),X,"ENABLED")
. DO SET^VALM10(VALMCNT,X,VALMCNT)
. SET ^TMP("XOB WEBSERVERS","IDX",$JOB,VALMCNT,VALMCNT)=+$GET(XOBDATA("DILIST",2,XOBI))
;
QUIT
;
GETPORT(XOBROOT,XOBI) ; -- return reg or SSL port
IF +$GET(@XOBROOT@(XOBI,3.01)) QUIT $GET(@XOBROOT@(XOBI,3.03))_" (SSL)"
QUIT $GET(@XOBROOT@(XOBI,.03))
;
CLEAR ; -- clean up entries
DO REFRESH
QUIT
;
REFRESH ; -- refresh display
DO BUILD
SET VALMBCK="R"
QUIT
;
KILL ; -- kill off list location
KILL ^TMP("XOB WEBSERVERS",$JOB)
KILL ^TMP("XOB WEBSERVERS","IDX",$JOB)
QUIT
;
HELP ; -- help code
SET X="?" DO DISP^XQORM1 WRITE !!
QUIT
;
EXIT ; -- exit code
QUIT
;
ADD ; -- add an web server entry
; -- Protocol: XOBW WEB SERVER ADD
DO ACTION("ADD",0)
QUIT
;
EDIT ; -- edit web server entry
; -- Protocol: XOBW WEB SERVER EDIT
DO ACTION("EDIT",0)
QUIT
;
DEL ; -- delete web server entry
; -- Protocol: XOBW WEB SERVER DELETE
DO ACTION("DEL",0)
QUIT
;
EXPAND ; -- expand web server entry
DO ACTION("EXPAND",1)
QUIT
;
AVAIL ; -- test web services availability
; -- Protocol: XOBW WEB SERVER TEST WS AVAILABILITY
DO ACTION("AVAIL",0)
QUIT
;
WST ; -- web server tester
; -- Protocol: XOBW WEB SERVER TESTER
DO EN1^XOBTWU
DO REFRESH
DO MSG
QUIT
;
WSM ; -- web service manager
; -- Protocol: XOBW WEB SERVICE MANAGER
DO EN^XOBWUS
DO REFRESH
DO MSG
QUIT
;
LKM ; -- lookup key manager
; -- Protocol: XOBW WEB SERVER LOOKUP KEY MANAGER
DO EN^XOBWUA
DO REFRESH
DO MSG
QUIT
;
ACTION(TYPE,XOBPAUSE) ; -- execute action
DO FULL^VALM1
NEW X,Y
SET X="DO "_TYPE_"^XOBWU1"
XECUTE X
IF XOBPAUSE DO PAUSE^VALM1
DO REFRESH
DO MSG
QUIT
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXOBWU 2993 printed Oct 16, 2024@18:46:39 Page 2
XOBWU ;ALB/MJK - HWSC :: Web Server Manager ; 09/13/10 4:00pm
+1 ;;1.0;HwscWebServiceClient;;September 13, 2010;Build 31
+2 ;
+3 QUIT
+4 ;
EN ; -- main entry point for XOBW WEB SERVER
+1 NEW VALMBCK
+2 KILL ^TMP("XOB WEBSERVERS",$JOB)
+3 SET VALMBCK=""
+4 DO EN^VALM("XOBW WEB SERVER")
+5 QUIT
+6 ;
HDR ; -- header code
+1 NEW Y
+2 SET X=" HWSC Web Server Manager"
+3 SET VALMHDR(1)=X
+4 SET X=" Version: "_$PIECE($TEXT(XOBWU+1),";",3)_" Build: "_$$VERSION^XOBWENV()
+5 SET VALMHDR(2)=X
+6 QUIT
+7 ;
INIT ; -- init variables and list array
+1 DO CLEAR
+2 DO MSG
+3 QUIT
+4 ;
MSG ; -- set default message
+1 SET VALMSG="Legend: *Enabled"
+2 QUIT
+3 ;
BUILD ; -- build list
+1 NEW I,XOBI,XOB0,X,XOBDATA,XOBROOT,XOBSITEI,Y
+2 DO KILL
+3 ;
+4 SET VALMCNT=0
+5 SET XOBROOT=$NAME(XOBDATA("DILIST","ID"))
+6 DO LIST^DIC(18.12,"",".01;.03;.04;.06;3.01;3.03","I","","","","","","",$NAME(XOBDATA))
+7 SET XOBI=0
+8 FOR
SET XOBI=$ORDER(@XOBROOT@(XOBI))
if 'XOBI
QUIT
Begin DoDot:1
+9 SET VALMCNT=VALMCNT+1
+10 SET X=""
+11 SET X=$$SETFLD^VALM1(VALMCNT,X,"ID")
+12 SET X=$$SETFLD^VALM1($GET(@XOBROOT@(XOBI,.01)),X,"NAME")
+13 SET X=$$SETFLD^VALM1($GET(@XOBROOT@(XOBI,.04))_":"_$$GETPORT(.XOBROOT,XOBI),X,"IP")
+14 SET X=$$SETFLD^VALM1($SELECT(+$GET(@XOBROOT@(XOBI,.06)):"*",1:""),X,"ENABLED")
+15 DO SET^VALM10(VALMCNT,X,VALMCNT)
+16 SET ^TMP("XOB WEBSERVERS","IDX",$JOB,VALMCNT,VALMCNT)=+$GET(XOBDATA("DILIST",2,XOBI))
End DoDot:1
+17 ;
+18 QUIT
+19 ;
GETPORT(XOBROOT,XOBI) ; -- return reg or SSL port
+1 IF +$GET(@XOBROOT@(XOBI,3.01))
QUIT $GET(@XOBROOT@(XOBI,3.03))_" (SSL)"
+2 QUIT $GET(@XOBROOT@(XOBI,.03))
+3 ;
CLEAR ; -- clean up entries
+1 DO REFRESH
+2 QUIT
+3 ;
REFRESH ; -- refresh display
+1 DO BUILD
+2 SET VALMBCK="R"
+3 QUIT
+4 ;
KILL ; -- kill off list location
+1 KILL ^TMP("XOB WEBSERVERS",$JOB)
+2 KILL ^TMP("XOB WEBSERVERS","IDX",$JOB)
+3 QUIT
+4 ;
HELP ; -- help code
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
+3 ;
EXIT ; -- exit code
+1 QUIT
+2 ;
ADD ; -- add an web server entry
+1 ; -- Protocol: XOBW WEB SERVER ADD
+2 DO ACTION("ADD",0)
+3 QUIT
+4 ;
EDIT ; -- edit web server entry
+1 ; -- Protocol: XOBW WEB SERVER EDIT
+2 DO ACTION("EDIT",0)
+3 QUIT
+4 ;
DEL ; -- delete web server entry
+1 ; -- Protocol: XOBW WEB SERVER DELETE
+2 DO ACTION("DEL",0)
+3 QUIT
+4 ;
EXPAND ; -- expand web server entry
+1 DO ACTION("EXPAND",1)
+2 QUIT
+3 ;
AVAIL ; -- test web services availability
+1 ; -- Protocol: XOBW WEB SERVER TEST WS AVAILABILITY
+2 DO ACTION("AVAIL",0)
+3 QUIT
+4 ;
WST ; -- web server tester
+1 ; -- Protocol: XOBW WEB SERVER TESTER
+2 DO EN1^XOBTWU
+3 DO REFRESH
+4 DO MSG
+5 QUIT
+6 ;
WSM ; -- web service manager
+1 ; -- Protocol: XOBW WEB SERVICE MANAGER
+2 DO EN^XOBWUS
+3 DO REFRESH
+4 DO MSG
+5 QUIT
+6 ;
LKM ; -- lookup key manager
+1 ; -- Protocol: XOBW WEB SERVER LOOKUP KEY MANAGER
+2 DO EN^XOBWUA
+3 DO REFRESH
+4 DO MSG
+5 QUIT
+6 ;
ACTION(TYPE,XOBPAUSE) ; -- execute action
+1 DO FULL^VALM1
+2 NEW X,Y
+3 SET X="DO "_TYPE_"^XOBWU1"
+4 XECUTE X
+5 IF XOBPAUSE
DO PAUSE^VALM1
+6 DO REFRESH
+7 DO MSG
+8 QUIT
+9 ;