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
8429ba08
Commit
8429ba08
authored
15 years ago
by
Robert Anderson
Browse files
Options
Downloads
Patches
Plain Diff
Initial support for AdminUser Logs
parent
54c69cc8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webgui/js/app/windows/AdminUserLogs.js
+44
-74
44 additions, 74 deletions
webgui/js/app/windows/AdminUserLogs.js
with
44 additions
and
74 deletions
webgui/js/app/windows/AdminUserLogs.js
+
44
−
74
View file @
8429ba08
function
show
WiSP
UserLogsWindow
(
wispUserID
)
{
function
show
Admin
UserLogsWindow
(
id
)
{
// Calculate dates we going to need
// Calculate dates we going to need
var
today
=
new
Date
();
var
today
=
new
Date
();
var
firstOfMonth
=
today
.
getFirstDateOfMonth
();
var
firstOfMonth
=
today
.
getFirstDateOfMonth
();
var
firstOfNext
=
today
.
getLastDateOfMonth
().
add
(
Date
.
DAY
,
1
);
var
firstOfNext
=
today
.
getLastDateOfMonth
().
add
(
Date
.
DAY
,
1
);
var
wisp
UserLogsWindow
=
new
Ext
.
ux
.
GenericGridWindow
(
var
admin
UserLogsWindow
=
new
Ext
.
ux
.
GenericGridWindow
(
// Window config
// Window config
{
{
title
:
'
User Logs
'
,
title
:
'
User Logs
'
,
...
@@ -126,54 +126,39 @@ function showWiSPUserLogsWindow(wispUserID) {
...
@@ -126,54 +126,39 @@ function showWiSPUserLogsWindow(wispUserID) {
// Column model
// Column model
colModel
:
new
Ext
.
grid
.
ColumnModel
([
colModel
:
new
Ext
.
grid
.
ColumnModel
([
{
{
id
:
'
ID
'
,
header
:
"
Timestamp
"
,
header
:
"
ID
"
,
sortable
:
true
,
hidden
:
true
,
dataIndex
:
'
EventTimestamp
'
dataIndex
:
'
ID
'
},
{
header
:
"
Username
"
,
hidden
:
true
,
dataIndex
:
'
Username
'
},
},
{
{
header
:
"
Status
"
,
header
:
"
Status
"
,
sortable
:
true
,
sortable
:
true
,
hidden
:
true
,
dataIndex
:
'
AcctStatusType
'
dataIndex
:
'
Status
'
},
},
{
{
header
:
"
Timestamp
"
,
header
:
"
Service Type
"
,
sortable
:
true
,
sortable
:
true
,
dataIndex
:
'
Timestamp
'
dataIndex
:
'
ServiceType
'
},
},
{
{
header
:
"
Session ID
"
,
header
:
"
Framed Protocol
"
,
hidden
:
true
,
sortable
:
true
,
dataIndex
:
'
AcctSessionID
'
dataIndex
:
'
FramedProtocol
'
},
{
header
:
"
Session Time
"
,
dataIndex
:
'
AcctSessionTime
'
},
},
{
{
header
:
"
NAS
I
P
"
,
header
:
"
NAS P
ort
"
,
hidden
:
true
,
sortable
:
true
,
dataIndex
:
'
NAS
IPAddress
'
dataIndex
:
'
NAS
Port
'
},
},
{
{
header
:
"
Port Type
"
,
header
:
"
NAS
Port Type
"
,
hidden
:
true
,
sortable
:
true
,
dataIndex
:
'
NASPortType
'
dataIndex
:
'
NASPortType
'
},
},
{
{
header
:
"
NAS Port
"
,
header
:
"
NAS Port ID
"
,
dataIndex
:
'
NASPort
'
sortable
:
true
,
},
dataIndex
:
'
NASPortID
'
{
header
:
"
Called Station
"
,
hidden
:
true
,
dataIndex
:
'
CalledStationID
'
},
},
{
{
header
:
"
Calling Station
"
,
header
:
"
Calling Station
"
,
...
@@ -181,19 +166,20 @@ function showWiSPUserLogsWindow(wispUserID) {
...
@@ -181,19 +166,20 @@ function showWiSPUserLogsWindow(wispUserID) {
dataIndex
:
'
CallingStationID
'
dataIndex
:
'
CallingStationID
'
},
},
{
{
header
:
"
NAS Xmit Rate
"
,
header
:
"
Called Station
"
,
dataIndex
:
'
NASTransmitRate
'
sortable
:
true
,
dataIndex
:
'
CalledStationID
'
},
},
{
{
header
:
"
NAS Recv Rate
"
,
header
:
"
Session ID
"
,
hidden
:
true
,
sortable
:
true
,
dataIndex
:
'
NASReceiveRate
'
dataIndex
:
'
AcctSessionID
'
},
},
{
{
header
:
"
IP Address
"
,
header
:
"
Framed IP
"
,
hidden
:
true
,
sortable
:
true
,
dataIndex
:
'
FramedIPAddress
'
dataIndex
:
'
FramedIPAddress
'
},
}
/*
,
{
{
header: "Input Mbyte",
header: "Input Mbyte",
dataIndex: 'AcctInputMbyte'
dataIndex: 'AcctInputMbyte'
...
@@ -202,35 +188,27 @@ function showWiSPUserLogsWindow(wispUserID) {
...
@@ -202,35 +188,27 @@ function showWiSPUserLogsWindow(wispUserID) {
header: "Output Mbyte",
header: "Output Mbyte",
dataIndex: 'AcctOutputMbyte'
dataIndex: 'AcctOutputMbyte'
},
},
{
header
:
"
Last Update
"
,
hidden
:
true
,
dataIndex
:
'
LastAcctUpdate
'
},
{
{
header: "Term. Reason",
header: "Term. Reason",
dataIndex: 'ConnectTermReason'
dataIndex: 'ConnectTermReason'
}
}
*/
])
])
},
},
// Store config
// Store config
{
{
baseParams
:
{
baseParams
:
{
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
:
'
WiSPUsers
'
,
SOAPModule
:
'
AdminUserLogs
'
,
SOAPFunction
:
'
getWiSPUserLogs
'
,
SOAPFunction
:
'
getAdminUserLogs
'
,
SOAPParams
:
'
0:UserID,__search
'
,
SOAPParams
:
'
ID,__search
'
UserID
:
wispUserID
}
}
},
},
// Filter config
// Filter config
{
{
filters
:
[
filters
:
[
{
type
:
'
numeric
'
,
dataIndex
:
'
ID
'
},
{
type
:
'
string
'
,
dataIndex
:
'
Username
'
},
{
type
:
'
numeric
'
,
dataIndex
:
'
Status
'
},
{
{
type
:
'
date
'
,
type
:
'
date
'
,
dataIndex
:
'
Timestamp
'
,
dataIndex
:
'
Timestamp
'
,
...
@@ -239,29 +217,21 @@ function showWiSPUserLogsWindow(wispUserID) {
...
@@ -239,29 +217,21 @@ function showWiSPUserLogsWindow(wispUserID) {
before
:
firstOfNext
before
:
firstOfNext
}
}
},
},
{
type
:
'
numeric
'
,
dataIndex
:
'
AcctStatusType
'
},
{
type
:
'
string
'
,
dataIndex
:
'
AcctSessionID
'
},
{
type
:
'
numeric
'
,
dataIndex
:
'
ServiceType
'
},
{
type
:
'
numeric
'
,
dataIndex
:
'
AcctSessionTime
'
},
{
type
:
'
numeric
'
,
dataIndex
:
'
FramedProtocol
'
},
{
type
:
'
string
'
,
dataIndex
:
'
NASIPAddress
'
},
{
type
:
'
string
'
,
dataIndex
:
'
NASPortType
'
},
{
type
:
'
string
'
,
dataIndex
:
'
NASPort
'
},
{
type
:
'
string
'
,
dataIndex
:
'
NASPort
'
},
{
type
:
'
string
'
,
dataIndex
:
'
CalledStationID
'
},
{
type
:
'
numeric
'
,
dataIndex
:
'
NASPortType
'
},
{
type
:
'
string
'
,
dataIndex
:
'
NASPortID
'
},
{
type
:
'
string
'
,
dataIndex
:
'
CallingStationID
'
},
{
type
:
'
string
'
,
dataIndex
:
'
CallingStationID
'
},
{
type
:
'
string
'
,
dataIndex
:
'
CalledStationID
'
},
{
type
:
'
string
'
,
dataIndex
:
'
NASTransmitRate
'
},
{
type
:
'
string
'
,
dataIndex
:
'
AcctSessionID
'
},
{
type
:
'
string
'
,
dataIndex
:
'
NASReceiveRate
'
},
{
type
:
'
string
'
,
dataIndex
:
'
FramedIPAddress
'
}
{
type
:
'
string
'
,
dataIndex
:
'
FramedIPAddress
'
},
{
type
:
'
date
'
,
dataIndex
:
'
LastAcctUpdate
'
},
{
type
:
'
string
'
,
dataIndex
:
'
ConnectTermReason
'
}
]
]
}
}
);
);
// Grab store
// Grab store
var
store
=
wisp
UserLogsWindow
.
getComponent
(
'
gridpanel
'
).
getStore
();
var
store
=
admin
UserLogsWindow
.
getComponent
(
'
gridpanel
'
).
getStore
();
store
.
on
(
'
load
'
,
function
()
{
store
.
on
(
'
load
'
,
function
()
{
var
inputTotal
=
store
.
sum
(
'
AcctInputMbyte
'
);
var
inputTotal
=
store
.
sum
(
'
AcctInputMbyte
'
);
...
@@ -276,12 +246,12 @@ function showWiSPUserLogsWindow(wispUserID) {
...
@@ -276,12 +246,12 @@ function showWiSPUserLogsWindow(wispUserID) {
var
userUsage
=
inputTotal
+
outputTotal
;
var
userUsage
=
inputTotal
+
outputTotal
;
var
userLeft
=
userTotalAllowed
-
userUsage
;
var
userLeft
=
userTotalAllowed
-
userUsage
;
var
form
=
wisp
UserLogsWindow
.
getComponent
(
'
summary-form
'
);
var
form
=
admin
UserLogsWindow
.
getComponent
(
'
summary-form
'
);
var
summaryTotal
=
form
.
getForm
().
findField
(
'
summaryTotal
'
);
var
summaryTotal
=
form
.
getForm
().
findField
(
'
summaryTotal
'
);
summaryTotal
.
setValue
(
summaryTotal
.
setValue
(
sprintf
(
'
Cap Total: %6d
\n
Topups : %6d
\n
-----------------
\n
%6d
\n
-----------------
\n
Usage : %6d
\n
=================
\n
Available: %6d
'
,
userCap
,
userTopups
,
userTotalAllowed
,
userUsage
,
userLeft
)
sprintf
(
'
Cap Total: %6d
\n
Topups : %6d
\n
-----------------
\n
%6d
\n
-----------------
\n
Usage : %6d
\n
=================
\n
Available: %6d
'
,
userCap
,
userTopups
,
userTotalAllowed
,
userUsage
,
userLeft
)
);
);
});
});
wisp
UserLogsWindow
.
show
();
admin
UserLogsWindow
.
show
();
}
}
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