Skip to content

Commit

Permalink
Merge pull request #728 from fstagni/51_fixes3
Browse files Browse the repository at this point in the history
[5.1] one WebApp for one DIRAC Setup
  • Loading branch information
fstagni authored Mar 30, 2023
2 parents 6c14a9a + 3264e6e commit e513dc6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 66 deletions.
7 changes: 0 additions & 7 deletions src/WebAppDIRAC/WebApp/handler/RootHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ def web_changeGroup(self, to: str):
"""
return TornadoResponse().redirect(self.__change(group=to)) # pylint: disable=no-member

def web_changeSetup(self, to: str):
"""Change setup
:return: TornadoResponse()
"""
return TornadoResponse().redirect(self.__change(setup=to)) # pylint: disable=no-member

def __change(self, setup: str = None, group: str = None) -> str:
"""Generate URL to change setup/group, set query"""
root = Conf.rootURL().strip("/")
Expand Down
12 changes: 6 additions & 6 deletions src/WebAppDIRAC/WebApp/handler/SystemAdministrationHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ def web_getSysInfo(self):
return {"success": "false", "error": result.get("Message", "No system information found")}

# Add the information about the extensions' versions, if available, to display along with the DIRAC version
for i in range(len(callback)):
callback[i]["Host"] = callback[i]["HostName"]
callback[i]["Timestamp"] = str(callback[i].get("Timestamp", "unknown"))
for _i, cb in enumerate(callback):
cb["Host"] = cb["HostName"]
cb["Timestamp"] = str(cb.get("Timestamp", "unknown"))
# We have to keep the backward compatibility (this can heppen when we do not update one host to v6r15 ...
callback[i]["DIRAC"] = "{},{}".format(
callback[i].get("DIRACVersion", callback[i].get("DIRAC", "")),
callback[i].get("Extension", callback[i].get("Extensions", "")),
cb["DIRAC"] = "{},{}".format(
cb.get("DIRACVersion", cb.get("DIRAC", "")),
cb.get("Extension", cb.get("Extensions", "")),
)

return {"success": "true", "result": sorted(callback, key=lambda i: i["Host"]), "total": len(callback)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,6 @@ Ext.define("DIRAC.JobMonitor.classes.JobMonitor", {
{
name: "RescheduleTime",
},
{
name: "DIRACSetup",
},
{
name: "FailedFlag",
},
Expand Down Expand Up @@ -451,12 +448,6 @@ Ext.define("DIRAC.JobMonitor.classes.JobMonitor", {
width: 150,
},
},
DIRACSetup: {
dataIndex: "DIRACSetup",
properties: {
hidden: true,
},
},
FailedFlag: {
dataIndex: "FailedFlag",
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@ Ext.define("DIRAC.SystemAdministration.classes.SystemAdministration", {
{
name: "OpenSockets",
},
{
name: "Setup",
},
{
name: "Uptime",
},
Expand Down Expand Up @@ -394,12 +391,6 @@ Ext.define("DIRAC.SystemAdministration.classes.SystemAdministration", {
header: "OpenSockets",
sortable: true,
},
{
align: "left",
dataIndex: "Setup",
header: "Setup",
sortable: true,
},
{
align: "left",
dataIndex: "Uptime",
Expand Down Expand Up @@ -552,9 +543,6 @@ Ext.define("DIRAC.SystemAdministration.classes.SystemAdministration", {
{
name: "Name",
},
{
name: "Setup",
},
{
name: "PID",
},
Expand Down Expand Up @@ -924,12 +912,6 @@ Ext.define("DIRAC.SystemAdministration.classes.SystemAdministration", {
return me.rendererGridColumn(value, record);
},
},
Setup: {
dataIndex: "Setup",
renderer: function (value, metaData, record, row, col, store, gridView) {
return me.rendererGridColumn(value, record);
},
},
Port: {
dataIndex: "Port",
renderer: function (value, metaData, record, row, col, store, gridView) {
Expand Down Expand Up @@ -1036,9 +1018,6 @@ Ext.define("DIRAC.SystemAdministration.classes.SystemAdministration", {
{
name: "ComponentName",
},
{
name: "Setup",
},
{
name: "Port",
},
Expand Down
23 changes: 0 additions & 23 deletions src/WebAppDIRAC/WebApp/static/core/js/views/tabs/SettingsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ Ext.define("Ext.dirac.views.tabs.SettingsPanel", {
text: "Group:",
},
me.addGroupsButton(),
{
xtype: "label",
text: "Setup:",
},
me.addSetupButton(),
{
xtype: "label",
text: "Theme:",
Expand Down Expand Up @@ -226,24 +221,6 @@ Ext.define("Ext.dirac.views.tabs.SettingsPanel", {

return new Ext.button.Button(button_group);
},
addSetupButton: function () {
var setup_data = {
text: GLOBAL.APP.configData["setup"],
menu: [],
};

for (var i = 0; i < GLOBAL.APP.configData["validSetups"].length; i++)
setup_data.menu.push({
text: GLOBAL.APP.configData["validSetups"][i],
handler: function () {
var me = this;

location.href = GLOBAL.BASE_URL + "changeSetup?to=" + me.text;
},
});

return new Ext.button.Button(setup_data);
},
addThemeButton: function () {
var me = this;

Expand Down

0 comments on commit e513dc6

Please sign in to comment.