Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow cuegui to create subscriptions larger than 50000 #576

Merged
merged 4 commits into from
Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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