diff --git a/kadmos/vistoms/templates/VISTOMS.html b/kadmos/vistoms/templates/VISTOMS.html index be377c5da9359e99be8334d5f8a8a3b8e7a4227e..f812b40b4d0ce207bbd453b90a9fff78664047a9 100644 --- a/kadmos/vistoms/templates/VISTOMS.html +++ b/kadmos/vistoms/templates/VISTOMS.html @@ -19528,9 +19528,10 @@ minWidth: 200, minHeight: 200, maxWidth: 1100, - maxHeight: 1100, + maxHeight: 1200, }); $('.myPanel').lobiPanel('unpin'); + $('.myPanel').lobiPanel('height','5000'); } } } @@ -20896,7 +20897,7 @@ minWidth: 200, minHeight: 200, maxWidth: 1100, - maxHeight: 1100, + maxHeight: 1200, }); $('.myPanel').lobiPanel('unpin'); } @@ -21290,7 +21291,7 @@ minWidth: 200, minHeight: 200, maxWidth: 1100, - maxHeight: 1100, + maxHeight: 1200, }); $('.myPanel').lobiPanel('unpin'); } @@ -21859,7 +21860,7 @@ minWidth: 200, minHeight: 200, maxWidth: 1100, - maxHeight: 1100, + maxHeight: 1200, }); $('.myPanel').lobiPanel('unpin'); } @@ -23017,7 +23018,7 @@ minWidth: 200, minHeight: 200, maxWidth: 1100, - maxHeight: 1100, + maxHeight: 1200, }); $('.myPanel').lobiPanel('unpin'); } @@ -23169,7 +23170,7 @@ minWidth: 200, minHeight: 200, maxWidth: 1100, - maxHeight: 1100, + maxHeight: 1200, }); $('.myPanel').lobiPanel('unpin'); } @@ -23931,7 +23932,7 @@ minWidth: 200, minHeight: 200, maxWidth: 1100, - maxHeight: 1100, + maxHeight: 1200, }); $('.myPanel').lobiPanel('unpin'); } @@ -25609,7 +25610,7 @@ minWidth: 200, minHeight: 200, maxWidth: 1100, - maxHeight: 1100, + maxHeight: 1200, }); $('.myPanel').lobiPanel('unpin'); } @@ -25829,7 +25830,7 @@ minWidth: 200, minHeight: 200, maxWidth: 1100, - maxHeight: 1100, + maxHeight: 1200, }); $('.myPanel').lobiPanel('unpin'); } @@ -26389,7 +26390,7 @@ minWidth: 200, minHeight: 200, maxWidth: 1100, - maxHeight: 1100, + maxHeight: 1200, }); $('.myPanel').lobiPanel('unpin'); } diff --git a/kadmos/vistoms/vistoms.py b/kadmos/vistoms/vistoms.py index 6f1d17ef4b33fdbdef160afff448acac603df2e4..7b3d1160175cc87758811884a53eef91224a9b78 100644 --- a/kadmos/vistoms/vistoms.py +++ b/kadmos/vistoms/vistoms.py @@ -17,9 +17,6 @@ from kadmos.graph import load, FundamentalProblemGraph app = Flask(__name__) -# Settings for logging -logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) - # Folder and file settings UPLOAD_FOLDER = '' TEMP_FILE = 'tmp' @@ -1535,10 +1532,15 @@ def kadmosImposeMDAOArchitecture(): # Then in the run_vistoms handle the folder and open_vistoms # arguments as follows: -def run_vistoms(folder=None): +def run_vistoms(folder=None, write_log=True, open_vistoms=True): global UPLOAD_FOLDER - # Open VISTOMS when running the app.py in the beginning - webbrowser.open_new('http://127.0.0.1:5000/VISTOMS') + if open_vistoms: + # Open VISTOMS when running the app.py in the beginning + webbrowser.open_new('http://127.0.0.1:5000/VISTOMS') + + if write_log: + # Settings for logging + logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) if folder is None: # Create temporary directory @@ -1562,6 +1564,7 @@ def run_vistoms(folder=None): # python vistoms.py # python vistoms.py -folder C:/Users/aigner/Desktop/vistoms_tmp # python vistoms.py -open y -folder C:/Users/aigner/Desktop/vistoms_tmp +# python vistoms.py -open y -folder C:/Users/aigner/Desktop/vistoms_tmp -write_log y if __name__ == '__main__': # Get system arguments args = sys.argv @@ -1583,5 +1586,17 @@ if __name__ == '__main__': raise IOError('Please provide valid argument for -open, either y or n.') else: open_vistoms = True # default is to open + # Check if write_log is given in args + if '-write_log' in args: + write_log = args[args.index('-write_log') + 1] + assert write_log.lower() in ['y', 'yes', 'n', 'no'] + if write_log.lower() in ['y', 'yes']: + write_log = True + elif write_log.lower() in ['n', 'no']: + write_log = False + else: + raise IOError('Please provide valid argument for -open, either y or n.') + else: + write_log = True # Now run the Python VISTOMS method that you have in app.py - run_vistoms(folder=folder) \ No newline at end of file + run_vistoms(folder=folder, write_log=write_log, open_vistoms=open_vistoms) \ No newline at end of file