Skip to content

Commit

Permalink
Allow cuegui to create subscriptions larger than 50000 (#576)
Browse files Browse the repository at this point in the history
* increase max size and burst dialog values

* use max int value

* Add qt max int constant
  • Loading branch information
Greg Denton authored Dec 13, 2019
1 parent b0800fc commit 22735a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 2 additions & 0 deletions cuegui/cuegui/Constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,5 @@
COLOR_USER_2 = QtGui.QColor(100, 100, 50)
COLOR_USER_3 = QtGui.QColor(0, 50, 0)
COLOR_USER_4 = QtGui.QColor(50, 30, 0)

QT_MAX_INT = 2147483647
18 changes: 10 additions & 8 deletions cuegui/cuegui/MenuActions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,10 +1136,11 @@ def editSize(self, rpcObjects=None):
body = "Please enter the new subscription size value:\nThis " \
"should only be changed by administrators.\nPlease " \
"contact the resource department."
(value, choice) = QtWidgets.QInputDialog.getDouble(self._caller,
title, body,
current,
0, 50000, 0)
minSize = 0
decimalPlaces = 0
(value, choice) = QtWidgets.QInputDialog.getDouble(self._caller, title, body, current,
minSize, cuegui.Constants.QT_MAX_INT,
decimalPlaces)
if choice:
msg = QtWidgets.QMessageBox()
msg.setText("You are about to modify a number that can effect a shows billing. Are you in PSR-Resources?")
Expand All @@ -1162,10 +1163,11 @@ def editBurst(self, rpcObjects=None):
title = "Edit Subscription Burst"
body = "Please enter the maximum number of cores that this " \
"subscription should be allowed to reach:"
(value, choice) = QtWidgets.QInputDialog.getDouble(self._caller,
title, body,
current,
0, 50000, 0)
minSize = 0
decimalPlaces = 0
(value, choice) = QtWidgets.QInputDialog.getDouble(self._caller, title, body, current,
minSize, cuegui.Constants.QT_MAX_INT,
decimalPlaces)
if choice:
for sub in subs:
self.cuebotCall(sub.setBurst,
Expand Down

0 comments on commit 22735a3

Please sign in to comment.