File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,6 @@ class StudioActions {
104
104
case 2 : // Run a CSP page/Template. The Target is the full url to the CSP page/Template
105
105
return new Promise ( ( resolve ) => {
106
106
let answer = "2" ;
107
- const conn = config ( ) . conn ;
108
107
const column = vscode . window . activeTextEditor ? vscode . window . activeTextEditor . viewColumn : undefined ;
109
108
const panel = vscode . window . createWebviewPanel (
110
109
"studioactionwebview" ,
@@ -122,14 +121,15 @@ class StudioActions {
122
121
} ) ;
123
122
panel . onDidDispose ( ( ) => resolve ( answer ) ) ;
124
123
125
- const url = new URL ( `http://${ conn . host } :${ conn . port } ${ target } ` ) ;
126
- const api = new AtelierAPI ( ) ;
127
- api
124
+ const url = new URL (
125
+ `${ this . api . config . https ? "https" : "http" } ://${ this . api . config . host } :${ this . api . config . port } ${ target } `
126
+ ) ;
127
+ this . api
128
128
. actionQuery ( "select %Atelier_v1_Utils.General_GetCSPToken(?) token" , [ url . toString ( ) ] )
129
129
. then ( ( tokenObj ) => {
130
130
const csptoken = tokenObj . result . content [ 0 ] . token ;
131
131
url . searchParams . set ( "CSPCHD" , csptoken ) ;
132
- url . searchParams . set ( "Namespace" , conn . ns ) ;
132
+ url . searchParams . set ( "Namespace" , this . api . config . ns ) ;
133
133
panel . webview . html = `
134
134
<!DOCTYPE html>
135
135
<html lang="en">
You can’t perform that action at this time.
0 commit comments