Skip to content

Commit

Permalink
LDEV-4907 - inital version to remove multi mode
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Sep 20, 2024
1 parent 166498e commit a7d5c6a
Show file tree
Hide file tree
Showing 99 changed files with 2,245 additions and 6,406 deletions.
7 changes: 1 addition & 6 deletions core/src/main/cfml/context/admin.cfm
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<cfscript>
if(getApplicationSettings().singleContext) {
location url="admin/index.cfm" addtoken="no";
}
else {
location url="admin/web.cfm" addtoken="no";
}
location url="admin/index.cfm" addtoken="no";
</cfscript>
3 changes: 1 addition & 2 deletions core/src/main/cfml/context/admin/Application.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ this.xmlFeatures = {
disallowDoctypeDecl: true
};

request.singleMode=getApplicationSettings().singleContext;
if(request.singleMode) request.adminType="server";
request.adminType="server";
public function onRequestStart() {

// if not logged in, we only allow access to admin|web|server[.cfm]
Expand Down
8 changes: 1 addition & 7 deletions core/src/main/cfml/context/admin/admin_layout.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</head>

<cfparam name="attributes.onload" default="">
<cfset mode=request.singleMode?"single":request.adminType>
<cfset mode="single">
<body id="body" class="admin-#mode# #mode#<cfif application.adminfunctions.getdata('fullscreen') eq 1> full</cfif>" onload="#attributes.onload#">
<div id="<cfif !hasNavigation>login<cfelse>layout</cfif>">
<table id="layouttbl">
Expand All @@ -38,12 +38,6 @@
<td colspan="2">
<div id="header">
<a id="logo" class="sprite" href="#home#"></a>
<cfif not request.singleMode>
<div id="admin-tabs" class="clearfix">
<a href="server.cfm#homeQS#" class="sprite server"></a>
<a href="web.cfm#homeQS#" class="sprite web"></a>
</div>
</cfif>
</div> <!--- #header !--->
</td>
</tr>
Expand Down
8 changes: 0 additions & 8 deletions core/src/main/cfml/context/admin/adminmode.cfm

This file was deleted.

23 changes: 10 additions & 13 deletions core/src/main/cfml/context/admin/debugging.logs.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<cfparam name="url.action2" default="list">
<cfparam name="form.mainAction" default="none">
<cfparam name="form.subAction" default="none">
<cfset isWeb = request.admintype EQ "web" OR getApplicationSettings().singleContext>

<cfadmin
action="securityManager"
Expand All @@ -49,18 +48,16 @@
returnVariable="access"
secType="debugging">

<cfif isWeb>
<cfadmin
action="getLoggedDebugData"
type="#request.adminType#"
password="#session["password"&request.adminType]#"
returnVariable="logs">
<cfadmin
action="getDebugEntry"
type="#request.adminType#"
password="#session["password"&request.adminType]#"
returnVariable="entries">
</cfif>
<cfadmin
action="getLoggedDebugData"
type="#request.adminType#"
password="#session["password"&request.adminType]#"
returnVariable="logs">
<cfadmin
action="getDebugEntry"
type="#request.adminType#"
password="#session["password"&request.adminType]#"
returnVariable="entries">
<cfadmin
action="getDebugSetting"
type="#request.adminType#"
Expand Down
7 changes: 2 additions & 5 deletions core/src/main/cfml/context/admin/debugging.logs.list.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,14 @@
<td colspan="2">
<input type="submit" class="bl button submit" name="mainAction" value="#stText.Buttons.Update#">
<input type="submit" class="bm button submit" name="mainAction" value="#stText.Buttons.Purge#">
<input type="reset" class="<cfif request.adminType EQ "web">bm<cfelse>br</cfif> button reset" name="cancel" value="#stText.Buttons.Cancel#">
<cfif not request.singleMode && request.adminType EQ "web"><input class="br button submit" type="submit" name="mainAction" value="#stText.Buttons.resetServerAdmin#"></cfif>
<input type="reset" class="br button reset" name="cancel" value="#stText.Buttons.Cancel#">
</td>
</tr>
</tfoot>
</table>
</cfformClassic>

<cfif !request.singleMode && !isWeb>
<p>#stText.Debug.onlyWebContext#</p>
<cfelseif !_debug.debug>
<cfif !_debug.debug>
<p>#stText.Debug.debuggingDisabled#</p>
<cfelse>
<!---<h2>#stText.debug.filterTitle#</h2>
Expand Down
3 changes: 1 addition & 2 deletions core/src/main/cfml/context/admin/debugging.output.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ Redirtect to entry --->
<tr>
<td colspan="2">
<input type="submit" class="bl button submit" name="mainAction" value="#stText.Buttons.Update#">
<input type="reset" class="<cfif request.adminType EQ 'web'>bm<cfelse>br</cfif> button reset" name="cancel" value="#stText.Buttons.Cancel#" onclick="return sp_clicked(event)" id="resetBtn">
<cfif not request.singleMode && request.adminType EQ "web"><input class="br button submit" type="submit" name="mainAction" value="#stText.Buttons.resetServerAdmin#"></cfif>
<input type="reset" class="br button reset" name="cancel" value="#stText.Buttons.Cancel#" onclick="return sp_clicked(event)" id="resetBtn">
</td>
</tr>
</tfoot>
Expand Down
3 changes: 1 addition & 2 deletions core/src/main/cfml/context/admin/debugging.settings.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ Redirtect to entry --->
<tr>
<td colspan="2">
<input type="submit" class="bl button submit" name="mainAction" value="#stText.Buttons.Update#">
<input type="reset" class="<cfif request.adminType EQ 'web'>bm<cfelse>br</cfif> button reset" name="cancel" value="#stText.Buttons.Cancel#" onclick="return sp_clicked(event)" id="resetBtn">
<cfif not request.singleMode && request.adminType EQ "web"><input class="br button submit" type="submit" name="mainAction" value="#stText.Buttons.resetServerAdmin#"></cfif>
<input type="reset" class="br button reset" name="cancel" value="#stText.Buttons.Cancel#" onclick="return sp_clicked(event)" id="resetBtn">
</td>
</tr>
</tfoot>
Expand Down
7 changes: 1 addition & 6 deletions core/src/main/cfml/context/admin/index.cfm
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<cfscript>
if(getApplicationSettings().singleContext) {
include "web.cfm";
}
else {
location url="server.cfm?reinit=true" addtoken="no";
}
include "web.cfm";
</cfscript>
4 changes: 2 additions & 2 deletions core/src/main/cfml/context/admin/navigation.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
padding:2% 1% 2% 2% !important;
}
.tt-suggestion.tt-selectable:hover{
background-color: #request.singleMode?'##666':(request.adminType=="web"?'##39c':'##BF4F36')# !important;
background-color: '##666' !important;
color: white;
}
/*show more Results*/
Expand All @@ -113,7 +113,7 @@
padding: 2% 1% 2% 1% ;
}
.navSearch{
border-color: #request.singleMode?'##666':(request.adminType=="web"?'##39c':'##BF4F36')# !important;
border-color: '##666' !important;
background-color: ##fff !important;
width: 89% !important;
padding: 1px 1px 1px 1px;
Expand Down
87 changes: 6 additions & 81 deletions core/src/main/cfml/context/admin/overview.cfm
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
<!---
Defaults --->

<cfif structKeyExists(form,"adminMode")>
<cfadmin
action="updateAdminMode"
type="#request.adminType#"
password="#session["password"&request.adminType]#"
mode="#form.adminMode#"
merge="#!isNull(form.switch) && form.switch=="merge"#"
keep="#!isNull(form.keep)#">
<cflocation url="#request.self#?action=#url.action#" addtoken=false>
</cfif>


<cfset current.label = "Lucee " & server.lucee.version & " - " & current.label>
<cfset error.message="">
<cfset error.detail="">
Expand Down Expand Up @@ -345,7 +333,7 @@ Error Output --->
returnVariable="docsWeb">

<cfif request.adminType EQ "server">
<cfset names=StructKeyArray(info.servlets)>
<cfset names=structKeyExists(info, "servlets")? StructKeyArray(info.servlets):[]>
<cfif len(names) and !ArrayContainsNoCase(names,"Rest",true)>
<div class="warning nofocus">
#stText.Overview.warning.warningMsg#
Expand All @@ -365,7 +353,6 @@ Error Output --->


<!--- installed libs --->
<cfif request.adminType EQ "web" or request.singlemode >
<cfadmin
action="getTLDs"
type="#request.adminType#"
Expand All @@ -383,60 +370,8 @@ Error Output --->
<cfif isQuery(flds)>
<cfset flds=listToArray(valueList(flds.displayname))>
</cfif>
</cfif>

<cfif request.adminType=="server">
<form method="post">
<input type="hidden" name="adminMode" value="#request.singlemode?"multi":"single"#">
<h2>#stText.Overview[request.singlemode?"modeSingle":"modeMulti"]#</h2>
<div class="itemintro">#stText.Overview[request.singlemode?"modeSingleDesc":"modeMultiDesc"]#</div>
<!--- <div id="updateInfoDesc" style="text-align: center;">
<p>#stText.services.update.restartDesc#</p>
</div> --->
<table class="maintbl">
<tbody>
<tr>
<th scope="row">
<h4>#stText.Overview[request.singlemode?"modeSingleSwitch":"modeMultiSwitch"]#</h4>
#stText.Overview[request.singlemode?"modeSingleSwitchDesc":"modeMultiSwitchDesc"]#
</th>
<cfif !request.singleMode>

<td>
<ul class="radiolist" id="sp_options">
<li>
<label>
<input type="radio" class="radio" name="switch" value="merge" checked="checked">
<b>#stText.Overview.switchMerge#</b>
</label>
<div class="comment">#stText.Overview.switchMergeDesc#</div>
</li>
<li>
<label>
<input type="radio" class="radio" name="switch" value="leave">
<b>#stText.Overview.switchLeave#</b>
</label>
<div class="comment">#stText.Overview.switchLeaveDesc#</div>
</li>
</ul>
<br><br>
<input type="checkbox" class="checkbox" name="keep" value="keep" checked="checked">
<div class="comment">#stText.Overview.switchKeep#</div>
</td>
</cfif>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2">
<input type="button" class="b button submit" name="mainAction" value="#stText.Buttons.switch#" onclick="adminmode(this)">
</td>
</tr>
</tfoot>
</table>
</form>

</cfif>



Expand Down Expand Up @@ -618,14 +553,10 @@ Error Output --->
<th nowrap="nowrap" scope="row">#stText.Overview.ReleaseDate#</th>
<td>#lsDateFormat(server.lucee['release-date'])#</td>
</tr>
<cfif request.singleMode or request.adminType EQ "web">
<tr>
<th nowrap="nowrap" scope="row">#stText.Overview.label#</th>
<td>#info.label?:""#</td>
</tr>
</cfif>

<cfif request.singlemode or request.adminType EQ "web">
<tr>
<th nowrap="nowrap" scope="row">#stText.Overview.InstalledTLs#</th>
<td>
Expand All @@ -634,8 +565,6 @@ Error Output --->
</cfloop>
</td>
</tr>
</cfif>
<cfif request.singlemode or request.adminType EQ "web">
<tr>
<th nowrap="nowrap" scope="row">#stText.Overview.InstalledFLs#</th>
<td>
Expand All @@ -644,8 +573,6 @@ Error Output --->
</cfloop>
</td>
</tr>
</cfif>

</tbody>
</table>
</td>
Expand Down Expand Up @@ -687,13 +614,11 @@ Error Output --->
</cfif>
</td>
</tr>
<cfif request.singleMode or request.adminType EQ "web">
<tr>
<th scope="row">#stText.Overview.hash#</th>
<td>#info.hash?:""#</td>
</tr>
</cfif>

<tr>
<th scope="row">#stText.Overview.hash#</th>
<td>#info.hash?:""#</td>
</tr>

</tbody>
</table>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@
<tr>
<td colspan="2">
<input class="bl button submit" type="submit" name="mainAction" value="#stText.Buttons.Update#">
<input type="reset" class="<cfif request.adminType EQ "web">bm<cfelse>br</cfif> button reset" name="cancel" value="#stText.Buttons.cancel#">
<cfif not request.singleMode && request.adminType EQ "web"><input class="br button submit" type="submit" name="mainAction" value="#stText.Buttons.resetServerAdmin#"></cfif>
<input type="reset" class="br button reset" name="cancel" value="#stText.Buttons.cancel#">
</td>
</tr>
</tfoot>
Expand Down
3 changes: 1 addition & 2 deletions core/src/main/cfml/context/admin/resources.rest.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ list all mappings and display necessary edit fields --->
<tr>
<td colspan="2">
<input type="submit" class="bl button submit" name="mainAction" value="#stText.Buttons.Update#">
<input type="reset" class="<cfif request.adminType EQ "web">bm<cfelse>br</cfif> button reset" name="cancel" value="#stText.Buttons.Cancel#">
<cfif not request.singleMode && request.adminType EQ "web"><input class="br button submit" type="submit" name="mainAction" value="#stText.Buttons.resetServerAdmin#"></cfif>
<input type="reset" class="br button reset" name="cancel" value="#stText.Buttons.Cancel#">
</td>
</tr>
</tfoot>
Expand Down
17 changes: 8 additions & 9 deletions core/src/main/cfml/context/admin/resources/menu.cfm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<cffunction name="createMenu" returntype="array" localmode="modern">
<cfargument name="stMenu" type="struct" required="yes">
<cfargument name="adminType" type="string" required="yes">
<cfargument name="singleMode" type="string" required="yes">
<cfset var MenuStruct =
array(
struct(
Expand Down Expand Up @@ -37,18 +36,18 @@
struct(
action:"services",label:arguments.stMenu.services.label,
children:array(
struct(action:"ai",label:arguments.stMenu.services.ai,hidden: arguments.adminType EQ "web" and not arguments.singlemode),
struct(action:"gateway",label:arguments.stMenu.services.gateway,hidden: arguments.adminType NEQ "web" and not arguments.singlemode),
struct(action:"ai",label:arguments.stMenu.services.ai),
struct(action:"gateway",label:arguments.stMenu.services.gateway),
struct(action:"cache",label:arguments.stMenu.services.cache),
struct(action:"datasource",label:arguments.stMenu.services.datasource),
struct(action:"orm",label:arguments.stMenu.services.orm),
struct(action:"search",label:arguments.stMenu.services.search,hidden: arguments.adminType NEQ "web" and not arguments.singlemode),
struct(action:"search",label:arguments.stMenu.services.search),
struct(action:"mail",label:arguments.stMenu.services.mail),
struct(action:"tasks",label:arguments.stMenu.services.tasks),
struct(action:"schedule",label:arguments.stMenu.services.schedule,hidden:arguments.adminType NEQ "web" and not arguments.singlemode),
struct(action:"update",label:arguments.stMenu.services.update,hidden:arguments.adminType EQ "web" and not arguments.singlemode,display:true),
struct(action:"restart",label:arguments.stMenu.services.restart,hidden:arguments.adminType EQ "web" and not arguments.singlemode,display:true),
struct(action:"certificates",label:arguments.stMenu.services.certificates,hidden:arguments.adminType EQ "web" and not arguments.singlemode,display:true)
struct(action:"schedule",label:arguments.stMenu.services.schedule),
struct(action:"update",label:arguments.stMenu.services.update,display:true),
struct(action:"restart",label:arguments.stMenu.services.restart,display:true),
struct(action:"certificates",label:arguments.stMenu.services.certificates,display:true)
)
),
Expand Down Expand Up @@ -87,7 +86,7 @@
),
struct(action:"security",label:arguments.stMenu.security.label,
children:array(
struct(action:"access",label:arguments.stMenu.security.access,hidden:arguments.adminType NEQ "server" and not arguments.singlemode),
struct(action:"access",label:arguments.stMenu.security.access),
struct(action:"password",label:arguments.stMenu.security.password,display:true)
)
)/*,
Expand Down
5 changes: 2 additions & 3 deletions core/src/main/cfml/context/admin/resources/text.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!--- language files are deployed to {lucee-web}/context/admin/resources/language by ConfigWebFactory.java and are read from there !--->

<cfscript>
if(isNull(request.singlemode))request.singlemode=false;
sHelpURL = "https://www.lucee.org/help/stHelp.json";
param name="request.stLocalHelp" default="#structNew()#";
param name="request.stWebMediaHelp" default="#structNew()#";
Expand Down Expand Up @@ -76,8 +75,8 @@
}
stText.menuStruct.web = createMenu( stText.menu, "web",request.singlemode?:false);
stText.menuStruct.server = createMenu( stText.menu, "server",request.singlemode?:false);
stText.menuStruct.web = createMenu( stText.menu, "web");
stText.menuStruct.server = createMenu( stText.menu, "server");
} else{
languages=application.languages;
Expand Down
Loading

0 comments on commit a7d5c6a

Please sign in to comment.