Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
irods-clients
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RDM Infrastructure
irods-clients
Commits
d9583e19
Commit
d9583e19
authored
3 years ago
by
Staiger, Christine
Browse files
Options
Downloads
Patches
Plain Diff
Adding info page with server and user info
parent
7d96ce71
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gui/irodsInfo.py
+48
-0
48 additions, 0 deletions
gui/irodsInfo.py
gui/mainmenu.py
+7
-1
7 additions, 1 deletion
gui/mainmenu.py
gui/ui-files/tabInfo.ui
+307
-0
307 additions, 0 deletions
gui/ui-files/tabInfo.ui
with
362 additions
and
1 deletion
gui/irodsInfo.py
0 → 100644
+
48
−
0
View file @
d9583e19
from
PyQt5
import
QtWidgets
from
PyQt5
import
QtCore
from
PyQt5
import
QtGui
class
irodsInfo
():
def
__init__
(
self
,
widget
,
ic
):
self
.
ic
=
ic
self
.
widget
=
widget
self
.
widget
.
refreshButton
.
clicked
.
connect
(
self
.
refreshInfo
)
self
.
refreshInfo
()
def
refreshInfo
(
self
):
self
.
widget
.
rescTable
.
setRowCount
(
0
)
self
.
widget
.
setCursor
(
QtGui
.
QCursor
(
QtCore
.
Qt
.
WaitCursor
))
#irods Zone
self
.
widget
.
zoneLabel
.
setText
(
self
.
ic
.
session
.
zone
)
#irods user
self
.
widget
.
userLabel
.
setText
(
self
.
ic
.
session
.
username
)
#irods user type and groups
userType
,
userGroups
=
self
.
ic
.
getUserInfo
()
groupNames
=
[
x
for
x
in
userGroups
if
not
isinstance
(
x
,
int
)]
self
.
widget
.
typeLabel
.
setText
(
userType
[
0
])
self
.
widget
.
groupsLabel
.
setText
(
'
\n
'
.
join
(
groupNames
))
#irods server and version
self
.
widget
.
serverLabel
.
setText
(
self
.
ic
.
session
.
host
)
self
.
widget
.
versionLabel
.
setText
(
'
.
'
.
join
(
str
(
num
)
for
num
in
self
.
ic
.
session
.
server_version
))
#irods resources
resourceNames
=
self
.
ic
.
listResources
()
try
:
resources
=
[(
name
,
str
(
round
(
int
(
self
.
ic
.
resourceSize
(
name
))
/
1024
**
3
)))
for
name
in
resourceNames
]
except
:
resources
=
[(
name
,
"
no information
"
)
for
name
in
resourceNames
]
self
.
widget
.
rescTable
.
setRowCount
(
len
(
resources
))
row
=
0
for
rescName
,
rescSize
in
resources
:
self
.
widget
.
rescTable
.
setItem
(
row
,
0
,
QtWidgets
.
QTableWidgetItem
(
rescName
))
self
.
widget
.
rescTable
.
setItem
(
row
,
1
,
QtWidgets
.
QTableWidgetItem
(
rescSize
))
row
=
row
+
1
self
.
widget
.
rescTable
.
resizeColumnsToContents
()
self
.
widget
.
setCursor
(
QtGui
.
QCursor
(
QtCore
.
Qt
.
ArrowCursor
))
This diff is collapsed.
Click to expand it.
gui/mainmenu.py
+
7
−
1
View file @
d9583e19
...
@@ -10,6 +10,7 @@ from gui.elabUpload import elabUpload
...
@@ -10,6 +10,7 @@ from gui.elabUpload import elabUpload
from
gui.irodsSearch
import
irodsSearch
from
gui.irodsSearch
import
irodsSearch
from
gui.irodsUpDownload
import
irodsUpDownload
from
gui.irodsUpDownload
import
irodsUpDownload
from
gui.irodsDataCompression
import
irodsDataCompression
from
gui.irodsDataCompression
import
irodsDataCompression
from
gui.irodsInfo
import
irodsInfo
from
utils.utils
import
saveIenv
from
utils.utils
import
saveIenv
import
sys
import
sys
...
@@ -67,7 +68,12 @@ class mainmenu(QMainWindow):
...
@@ -67,7 +68,12 @@ class mainmenu(QMainWindow):
#PageWidget = loadUi("gui/ui-files/tabPage.ui")
#PageWidget = loadUi("gui/ui-files/tabPage.ui")
#self.tabWidget.addTab(FederationsWidget, "Federations")
#self.tabWidget.addTab(FederationsWidget, "Federations")
#self.elnTab = Federations(FederationsWidget, ic)
#self.elnTab = Federations(FederationsWidget, ic)
#general info
self
.
infoWidget
=
loadUi
(
"
gui/ui-files/tabInfo.ui
"
)
self
.
tabWidget
.
addTab
(
self
.
infoWidget
,
"
Info
"
)
self
.
irodsInfo
=
irodsInfo
(
self
.
infoWidget
,
ic
)
self
.
tabWidget
.
setCurrentIndex
(
0
)
self
.
tabWidget
.
setCurrentIndex
(
0
)
#connect functions
#connect functions
...
...
This diff is collapsed.
Click to expand it.
gui/ui-files/tabInfo.ui
0 → 100644
+
307
−
0
View file @
d9583e19
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
Form
</class>
<widget
class=
"QWidget"
name=
"Form"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
640
</width>
<height>
480
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<property
name=
"styleSheet"
>
<string
notr=
"true"
>
QWidget
{
color: rgb(86, 184, 139);
background-color: rgb(54, 54, 54);
selection-background-color: rgb(58, 152, 112);
}
QTableWidget
{
background-color: rgb(85, 87, 83);
}
QTextBrowser
{
background-color: rgb(85, 87, 83);
}
</string>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"12"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
Server
</string>
</property>
</widget>
</item>
<item
row=
"6"
column=
"0"
>
<spacer
name=
"verticalSpacer_4"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"7"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_5"
>
<property
name=
"text"
>
<string>
Groups
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"2"
>
<widget
class=
"QLabel"
name=
"zoneLabel"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"13"
column=
"0"
>
<widget
class=
"QLabel"
name=
"versionLabel_2"
>
<property
name=
"text"
>
<string>
Version
</string>
</property>
</widget>
</item>
<item
row=
"5"
column=
"2"
>
<widget
class=
"QLabel"
name=
"typeLabel"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"font"
>
<font>
<pointsize>
13
</pointsize>
<weight>
75
</weight>
<bold>
true
</bold>
</font>
</property>
<property
name=
"text"
>
<string>
Client Information
</string>
</property>
</widget>
</item>
<item
row=
"8"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_6"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"12"
column=
"2"
>
<widget
class=
"QLabel"
name=
"serverLabel"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"7"
column=
"2"
>
<widget
class=
"QLabel"
name=
"groupsLabel"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"10"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_7"
>
<property
name=
"font"
>
<font>
<pointsize>
13
</pointsize>
<weight>
75
</weight>
<bold>
true
</bold>
</font>
</property>
<property
name=
"text"
>
<string>
Server Information
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"5"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_10"
>
<property
name=
"text"
>
<string>
Usertype
</string>
</property>
</widget>
</item>
<item
row=
"15"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_9"
>
<property
name=
"text"
>
<string>
Resources
</string>
</property>
</widget>
</item>
<item
row=
"11"
column=
"0"
>
<spacer
name=
"verticalSpacer_5"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"14"
column=
"0"
>
<spacer
name=
"verticalSpacer_6"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"16"
column=
"2"
>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"15"
column=
"2"
>
<widget
class=
"QTableWidget"
name=
"rescTable"
>
<column>
<property
name=
"text"
>
<string>
Name
</string>
</property>
</column>
<column>
<property
name=
"text"
>
<string>
Free space in GB
</string>
</property>
</column>
</widget>
</item>
<item
row=
"13"
column=
"2"
>
<widget
class=
"QLabel"
name=
"versionLabel"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_3"
>
<property
name=
"text"
>
<string>
Zone
</string>
</property>
</widget>
</item>
<item
row=
"17"
column=
"2"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<spacer
name=
"horizontalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QPushButton"
name=
"refreshButton"
>
<property
name=
"font"
>
<font>
<pointsize>
11
</pointsize>
<weight>
75
</weight>
<bold>
true
</bold>
</font>
</property>
<property
name=
"text"
>
<string>
Refresh
</string>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"4"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"text"
>
<string>
Username
</string>
</property>
</widget>
</item>
<item
row=
"4"
column=
"2"
>
<widget
class=
"QLabel"
name=
"userLabel"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"9"
column=
"0"
>
<spacer
name=
"verticalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer
name=
"horizontalSpacer_3"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
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