diff --git a/BIOL6500/form.js b/BIOL6500/form.js deleted file mode 100644 index 1fa2895..0000000 --- a/BIOL6500/form.js +++ /dev/null @@ -1,108 +0,0 @@ -'use strict' - -/** - * Clamp between two numbers - * - * @param {number} min The minimum - * @param {number} max The maximum - * @param {number} val The value to clamp - */ -function clamp(min, max, val) { - return Math.min(max, Math.max(min, val)); -} - -/** - * Fix num cores, allowing blanks to remain - */ -function fix_num_cores() { - let node_type_input = $('#batch_connect_session_context_node_type'); - let num_cores_input = $('#batch_connect_session_context_num_cores'); - - if(num_cores_input.val() === '') { - return; - } - - set_ppn_by_node_type(node_type_input, num_cores_input); -} - -/** - * Sets the ppn by node type. - * - * @param {element} node_type_input The node type input - * @param {element} num_cores_input The number cores input - */ -function set_ppn_by_node_type(node_type_input, num_cores_input) { - let data = node_type_input.find(':selected').data(); - - num_cores_input.attr('max', data.maxPpn); - num_cores_input.attr('min', data.minPpn); - - // Clamp value between min and max - num_cores_input.val( - clamp(data.minPpn, data.maxPpn, num_cores_input.val()) - ); -} - -/** - * Toggle the visibilty of a form group - * - * @param {string} form_id The form identifier - * @param {boolean} show Whether to show or hide - */ -function toggle_visibilty_of_form_group(form_id, show) { - let form_element = $(form_id); - let parent = form_element.parent(); - - if(show) { - parent.show(); - } else { - form_element.val(''); - parent.hide(); - } -} - -/** - * Toggle the visibilty of the CUDA select - * - * Looking for the value of data-can-show-cuda - */ -function toggle_cuda_version_visibility() { - let node_type_input = $('#batch_connect_session_context_node_type'); - - // Allow for cuda_version control not existing - if ( ! ($('#batch_connect_session_context_cuda_version').length > 0) ) { - return; - } - - toggle_visibilty_of_form_group( - '#batch_connect_session_context_cuda_version', - node_type_input.find(':selected').data('can-show-cuda') - ); -} - -/** - * Sets the change handler for the node_type select. - */ -function set_node_type_change_handler() { - let node_type_input = $('#batch_connect_session_context_node_type'); - node_type_input.change(node_type_change_hander); -} - -/** - * Update UI when node_type changes - */ -function node_type_change_hander() { - fix_num_cores(); - toggle_cuda_version_visibility(); -} - -/** - * Main - */ - -// Set controls to align with the values of the last session context -fix_num_cores(); -toggle_cuda_version_visibility(); - -// Install event handlers -set_node_type_change_handler(); \ No newline at end of file diff --git a/BIOL6500/form.yml.erb.dynamic_partition b/BIOL6500/form.yml.erb.dynamic_partition deleted file mode 100644 index 0420985..0000000 --- a/BIOL6500/form.yml.erb.dynamic_partition +++ /dev/null @@ -1,57 +0,0 @@ -<%- - queues = OodAppkit.clusters[:notchpeak].custom_config[:queues] --%> ---- -cluster: "notchpeak" -attributes: - # Set the corresponding modules that need to be loaded for Jupyter to run - # - # @note It is called within the batch job as `module load ` if - # defined - # @example Do not load any modules - # modules: "" - # @example Using default python module - # modules: "python" - # @example Using specific python module - # modules: "python/3.5" - # @example Using combination of modules - # modules: "python/3.5 cuda/8.0.44" - modules: "python/3.5.2 R/3.4.2" - - bc_num_slots: - widget: "number_field" - label: "Number of tasks" - value: 1 - help: "Number of cores on node type." - min: 1 - max: 8 - step: 1 - custom_queue: - label: "Partition" - help: "Please select a queue from the drop-down." - widget: select - options: - <%- queues.each do |q| -%> - - [ "<%= q %>", "<%= q %>" ] - <%- end -%> - bc_account: - label: "Account" - help: "If left blank default account will be used. For notchpeak-guest partition, use account owner-guest" - node_type: - widget: select - label: "Node type" - help: | - - **any** - Chooses anyone of the available Notchpeak nodes. - This reduces the wait time as you have no requirements. - - **32 core node** - Chooses 32 core Notchpeak nodes. - options: - - ["any node", "any"] - - ["32 core node", "c32"] -form: - - modules - - bc_num_slots - - bc_num_hours - - bc_account - - custom_queue - - node_type - - bc_email_on_started diff --git a/BIOL6500/form.yml.org b/BIOL6500/form.yml.org deleted file mode 100644 index a86dd54..0000000 --- a/BIOL6500/form.yml.org +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "CHEN3603" -attributes: - cluster: - widget: "select" - options: - - "notchpeak" - - "kingspeak" - - "lonepeak" - - "ash" - - "tangent" - - "frisco1" - - "frisco2" - - "frisco3" - - "frisco4" - - "frisco5" - - "frisco6" - - "frisco7" - - "frisco8" - help: | - Select the cluster or Frisco node to create this session on.
If you select frisco please ignore all the entries below. - # Set the corresponding modules that need to be loaded for Jupyter to run - # - # @note It is called within the batch job as `module load ` if - # defined - # @example Do not load any modules - # modules: "" - # @example Using default python module - # modules: "python" - # @example Using specific python module - # modules: "python/3.5" - # @example Using combination of modules - # modules: "python/3.5 cuda/8.0.44" - #modules: "python/3.5.2 R/3.4.2" - custom_environment: - widget: text_area - label: Environment Setup (drag text area to enlarge) - help: "Enter commands (module load, source activate, etc) to create your desired jupyter notebook environment; jupyter MUST be on your path. For instructions how to install ypur own Python using Miniconda see https://www.chpc.utah.edu/documentation/software/python-anaconda.php. If you don't have one yet use 'module load python/3.6.3 R/3.6.1'" - value: | - module load python/3.6.3 R/3.6.1 - - bc_num_hours: - value: 1 - min: 1 - step: 1 - help: "Maximum wall time on notchpeak-shared-short is 8 hours, general nodes 72 hours, owner nodes 14 days." - bc_account: - label: "Account" - value: "notchpeak-shared-short" - bc_queue: - label: "Partition" - value: "notchpeak-shared-short" - -form: - - cluster - - custom_environment - - bc_num_hours - - bc_account - - bc_queue - - bc_email_on_started diff --git a/BIOL6500/view.html.erb.1 b/BIOL6500/view.html.erb.1 deleted file mode 100644 index 3ce1960..0000000 --- a/BIOL6500/view.html.erb.1 +++ /dev/null @@ -1,59 +0,0 @@ - -<%- if interface == "jupyter" -%> - -
- - -
- -<%- elsif interface == "rstudio" -%> - - -
- "> - - - - - -
- -<%- else -%> - -
- - - - - -
-
-
0 (low) to 9 (high)
-
-
-
0 (low) to 9 (high)
-
-
- - - - View Only (Share-able Link) -
- - -<%- end -%> diff --git a/BIOL6500/view.html.erb.org b/BIOL6500/view.html.erb.org deleted file mode 100644 index 6efa0e3..0000000 --- a/BIOL6500/view.html.erb.org +++ /dev/null @@ -1,27 +0,0 @@ - -<%- if interface != "jupyter" -%> - -
- - -
- -<%- else -%> - - -
- "> - - - - - -
- -<%- end -%>