Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
smradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shail
smradius
Commits
0e570dec
Commit
0e570dec
authored
15 years ago
by
Robert Anderson
Browse files
Options
Downloads
Patches
Plain Diff
Modified showAdminGroupEditWindow to send SOAP params properly
parent
c14ae2b9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webgui/js/app/windows/AdminGroups.js
+10
-157
10 additions, 157 deletions
webgui/js/app/windows/AdminGroups.js
with
10 additions
and
157 deletions
webgui/js/app/windows/AdminGroups.js
+
10
−
157
View file @
0e570dec
...
@@ -18,8 +18,8 @@ function showAdminGroupWindow() {
...
@@ -18,8 +18,8 @@ function showAdminGroupWindow() {
// Inline toolbars
// Inline toolbars
tbar
:
[
tbar
:
[
{
{
text
:
'
Add
'
,
text
:
'
Add
/Edit
'
,
tooltip
:
'
Add group
'
,
tooltip
:
'
Add
or edit
group
'
,
iconCls
:
'
add
'
,
iconCls
:
'
add
'
,
handler
:
function
()
{
handler
:
function
()
{
showAdminGroupEditWindow
();
showAdminGroupEditWindow
();
...
@@ -172,7 +172,6 @@ function showAdminGroupWindow() {
...
@@ -172,7 +172,6 @@ function showAdminGroupWindow() {
function
showAdminGroupEditWindow
(
id
)
{
function
showAdminGroupEditWindow
(
id
)
{
var
submitAjaxConfig
;
var
submitAjaxConfig
;
var
editMode
;
// We doing an update
// We doing an update
...
@@ -182,41 +181,18 @@ function showAdminGroupEditWindow(id) {
...
@@ -182,41 +181,18 @@ function showAdminGroupEditWindow(id) {
SOAPFunction
:
'
updateAdminGroup
'
,
SOAPFunction
:
'
updateAdminGroup
'
,
SOAPParams
:
SOAPParams
:
'
0:ID,
'
+
'
0:ID,
'
+
'
0:UsageCap,
'
+
'
0:Name
'
'
0:AgentRef,
'
+
'
0:AgentDisabled:boolean
'
};
};
editMode
=
true
;
// We doing an Add
// We doing an Add
}
else
{
}
else
{
submitAjaxConfig
=
{
submitAjaxConfig
=
{
SOAPFunction
:
'
createAdminGroup
'
,
SOAPFunction
:
'
createAdminGroup
'
,
SOAPParams
:
SOAPParams
:
'
0:AgentID,
'
+
'
0:Name
'
'
0:GroupName,
'
+
'
0:UsageCap,
'
+
'
0:AgentRef,
'
+
'
0:AgentDisabled:boolean
'
};
};
editMode
=
false
;
}
}
// Service store
var
serviceStore
=
new
Ext
.
ux
.
JsonStore
({
ID
:
id
,
sortInfo
:
{
field
:
"
Name
"
,
direction
:
"
ASC
"
},
baseParams
:
{
SOAPUsername
:
globalConfig
.
soap
.
username
,
SOAPPassword
:
globalConfig
.
soap
.
password
,
SOAPAuthType
:
globalConfig
.
soap
.
authtype
,
SOAPModule
:
'
AdminGroups
'
,
SOAPFunction
:
'
getClasses
'
,
AgentID
:
1
,
SOAPParams
:
'
0:AgentID,__search
'
}
});
// Create window
// Create window
var
wispGroupFormWindow
=
new
Ext
.
ux
.
GenericFormWindow
(
var
wispGroupFormWindow
=
new
Ext
.
ux
.
GenericFormWindow
(
// Window config
// Window config
...
@@ -240,153 +216,30 @@ function showAdminGroupEditWindow(id) {
...
@@ -240,153 +216,30 @@ function showAdminGroupEditWindow(id) {
},
},
items
:
[
items
:
[
{
{
fieldLabel
:
'
Groupn
ame
'
,
fieldLabel
:
'
N
ame
'
,
name
:
'
Groupn
ame
'
,
name
:
'
N
ame
'
,
vtype
:
'
usernamePart
'
,
vtype
:
'
usernamePart
'
,
maskRe
:
usernamePartRe
,
maskRe
:
usernamePartRe
,
allowBlank
:
false
,
allowBlank
:
false
disabled
:
editMode
},
{
xtype
:
'
combo
'
,
// We use an ID so we can get the box later
id
:
'
agent_combobox
'
,
fieldLabel
:
'
Agent
'
,
name
:
'
Agent
'
,
allowBlank
:
false
,
width
:
225
,
store
:
new
Ext
.
ux
.
JsonStore
({
ID
:
id
,
sortInfo
:
{
field
:
"
Name
"
,
direction
:
"
ASC
"
},
baseParams
:
{
SOAPUsername
:
globalConfig
.
soap
.
username
,
SOAPPassword
:
globalConfig
.
soap
.
password
,
SOAPAuthType
:
globalConfig
.
soap
.
authtype
,
SOAPModule
:
'
Agents
'
,
SOAPFunction
:
'
getAgents
'
,
SOAPParams
:
'
__search
'
}
}),
displayField
:
'
Name
'
,
valueField
:
'
ID
'
,
hiddenName
:
'
AgentID
'
,
forceSelection
:
false
,
triggerAction
:
'
all
'
,
editable
:
false
,
disabled
:
editMode
},
{
xtype
:
'
combo
'
,
// We use an ID so we can get the box later
id
:
'
service_combobox
'
,
fieldLabel
:
'
Service
'
,
name
:
'
Service
'
,
allowBlank
:
false
,
width
:
340
,
store
:
serviceStore
,
displayField
:
'
Service
'
,
valueField
:
'
ID
'
,
hiddenName
:
'
ClassID
'
,
forceSelection
:
false
,
triggerAction
:
'
all
'
,
editable
:
false
,
disabled
:
true
},
},
{
fieldLabel
:
'
Usage Cap
'
,
name
:
'
UsageCap
'
,
},
{
fieldLabel
:
'
Agent Ref
'
,
name
:
'
AgentRef
'
},
{
xtype
:
'
checkbox
'
,
fieldLabel
:
'
Disabled
'
,
name
:
'
AgentDisabled
'
}
/*,
{
xtype: 'tabpanel',
plain: 'true',
deferredRender: false, // Load all panels!
activeTab: 0,
height: 100,
defaults: {
layout: 'form',
bodyStyle: 'padding: 10px;'
},
items: [
{
title: 'Policy Settings',
layout: 'form',
defaultType: 'textfield',
items: [
{
fieldLabel: 'Transport Policy',
name: 'Policy',
vtype: 'number',
value: '1'
}
]
}
]
}*/
],
],
},
},
// Submit button config
// Submit button config
submitAjaxConfig
submitAjaxConfig
);
);
// Events
if
(
!
id
)
{
wispGroupFormWindow
.
findById
(
'
agent_combobox
'
).
on
({
select
:
{
fn
:
function
()
{
var
tb
=
this
.
ownerCt
.
findById
(
'
service_combobox
'
);
if
(
this
.
getValue
())
{
tb
.
reset
();
serviceStore
.
baseParams
.
AgentID
=
this
.
getValue
();
serviceStore
.
reload
();
tb
.
enable
();
}
else
{
tb
.
reset
();
tb
.
disable
();
}
}
},
});
}
wispGroupFormWindow
.
show
();
wispGroupFormWindow
.
show
();
if
(
id
)
{
if
(
id
)
{
wispGroupFormWindow
.
getComponent
(
'
formpanel
'
).
load
({
wispGroupFormWindow
.
getComponent
(
'
formpanel
'
).
load
({
params
:
{
params
:
{
id
:
id
,
ID
:
id
,
SOAPUsername
:
globalConfig
.
soap
.
username
,
SOAPUsername
:
globalConfig
.
soap
.
username
,
SOAPPassword
:
globalConfig
.
soap
.
password
,
SOAPPassword
:
globalConfig
.
soap
.
password
,
SOAPAuthType
:
globalConfig
.
soap
.
authtype
,
SOAPAuthType
:
globalConfig
.
soap
.
authtype
,
SOAPModule
:
'
AdminGroups
'
,
SOAPModule
:
'
AdminGroups
'
,
SOAPFunction
:
'
getAdminGroup
s
'
,
SOAPFunction
:
'
getAdminGroup
'
,
SOAPParams
:
'
id
'
SOAPParams
:
'
ID
'
}
}
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment