Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
05d732a3
Commit
05d732a3
authored
Jun 16, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy dc/Summary.js from manager to manager5
parent
104359ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
145 additions
and
0 deletions
+145
-0
Summary.js
www/manager5/dc/Summary.js
+145
-0
No files found.
www/manager5/dc/Summary.js
0 → 100644
View file @
05d732a3
Ext
.
define
(
'
PVE.dc.NodeView
'
,
{
extend
:
'
Ext.grid.GridPanel
'
,
alias
:
[
'
widget.pveDcNodeView
'
],
initComponent
:
function
()
{
var
me
=
this
;
var
rstore
=
Ext
.
create
(
'
PVE.data.UpdateStore
'
,
{
interval
:
3000
,
storeid
:
'
pve-dc-nodes
'
,
model
:
'
pve-dc-nodes
'
,
proxy
:
{
type
:
'
pve
'
,
url
:
"
/api2/json/cluster/status
"
},
filters
:
{
property
:
'
type
'
,
value
:
'
node
'
}
});
var
store
=
Ext
.
create
(
'
PVE.data.DiffStore
'
,
{
rstore
:
rstore
});
var
noClusterText
=
gettext
(
"
Standalone node - no cluster defined
"
);
var
status
=
Ext
.
create
(
'
Ext.Component
'
,
{
padding
:
2
,
html
:
'
'
,
dock
:
'
bottom
'
});
Ext
.
apply
(
me
,
{
store
:
store
,
stateful
:
false
,
bbar
:
[
status
],
columns
:
[
{
header
:
gettext
(
'
Name
'
),
width
:
200
,
sortable
:
true
,
dataIndex
:
'
name
'
},
{
header
:
'
ID
'
,
width
:
50
,
sortable
:
true
,
dataIndex
:
'
nodeid
'
},
{
header
:
gettext
(
'
Online
'
),
width
:
100
,
sortable
:
true
,
dataIndex
:
'
online
'
,
renderer
:
PVE
.
Utils
.
format_boolean
},
{
header
:
gettext
(
'
Support
'
),
width
:
100
,
sortable
:
true
,
dataIndex
:
'
level
'
,
renderer
:
PVE
.
Utils
.
render_support_level
},
{
header
:
gettext
(
'
Server Address
'
),
flex
:
1
,
sortable
:
true
,
dataIndex
:
'
ip
'
}
],
listeners
:
{
show
:
rstore
.
startUpdate
,
hide
:
rstore
.
stopUpdate
,
destroy
:
rstore
.
stopUpdate
}
});
me
.
callParent
();
rstore
.
on
(
'
load
'
,
function
(
s
,
records
,
success
)
{
if
(
!
success
)
{
return
;
}
console
.
log
(
"
test1
"
);
console
.
dir
(
records
);
var
cluster_rec
=
rstore
.
getById
(
'
cluster
'
);
if
(
!
cluster_rec
)
{
status
.
update
(
noClusterText
);
return
;
}
var
cluster_raw
=
cluster_rec
.
raw
;
if
(
!
cluster_raw
)
{
status
.
update
(
noClusterText
);
return
;
}
var
text
=
gettext
(
"
Cluster
"
)
+
"
:
"
+
cluster_raw
.
name
+
"
,
"
+
gettext
(
"
Quorate
"
)
+
"
:
"
+
PVE
.
Utils
.
format_boolean
(
cluster_raw
.
quorate
);
status
.
update
(
text
);
});
}
},
function
()
{
Ext
.
define
(
'
pve-dc-nodes
'
,
{
extend
:
'
Ext.data.Model
'
,
fields
:
[
'
id
'
,
'
type
'
,
'
name
'
,
'
nodeid
'
,
'
ip
'
,
'
level
'
,
'
local
'
,
'
online
'
],
idProperty
:
'
id
'
});
});
Ext
.
define
(
'
PVE.dc.Summary
'
,
{
extend
:
'
Ext.panel.Panel
'
,
alias
:
[
'
widget.pveDcSummary
'
],
initComponent
:
function
()
{
var
me
=
this
;
var
nodegrid
=
Ext
.
create
(
'
PVE.dc.NodeView
'
,
{
title
:
gettext
(
'
Nodes
'
),
border
:
false
,
region
:
'
center
'
,
flex
:
3
});
Ext
.
apply
(
me
,
{
layout
:
'
border
'
,
items
:
[
nodegrid
],
listeners
:
{
show
:
function
()
{
nodegrid
.
fireEvent
(
'
show
'
,
nodegrid
);
},
hide
:
function
()
{
nodegrid
.
fireEvent
(
'
hide
'
,
nodegrid
);
}
}
});
me
.
callParent
();
}
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment