mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
M #~: remove period and number flow (#4714)
Signed-off-by: Jorge Lobo <jlobo@opennebula.io>
This commit is contained in:
parent
d7af2a9a86
commit
41f27b0539
@ -7,23 +7,18 @@ distributed on an "AS IS" BASIS, }} {{! WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
the License for the specific language governing permissions and }} {{! limitations under the License. }} {{! --------------------------------------------------------------------------
|
||||
}}
|
||||
<table>
|
||||
<tr>
|
||||
<td id="list_vms_sched_actions" colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="title" colspan="3">
|
||||
<h6 class="title_label">{{tr "New scheduled action"}}:</h6>
|
||||
<h6 class="title_label">{{tr "Perform an action"}}:</h6>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_schedule_base">
|
||||
<td>
|
||||
<tr id="tr_schedule_base" style="vertical-align: top;">
|
||||
<td style="width:50%;">
|
||||
<select style="width: 100%" id="select_new_action" class="select_new_action" name="select_action">{{{actions}}}</select>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div style="display:flex;">
|
||||
<select id="role_name" class="select_role" name="select_action" style="width: 100%">{{{roles}}}</select>
|
||||
<input type="number" id="period" placeholder="{{tr 'Period'}}" style="width: 100%">
|
||||
<input type="number" id="number" placeholder="{{tr 'Number'}}" style="width: 100%">
|
||||
</div>
|
||||
<div style="display:flex;">
|
||||
<input type="number" class="hide" id="diskid" placeholder="{{tr 'Disk Id'}}" style="width: 100%">
|
||||
|
@ -75,7 +75,6 @@ define(function(require) {
|
||||
Panel.PANEL_ID = PANEL_ID;
|
||||
Panel.prototype.html = _html;
|
||||
Panel.prototype.setup = _setup;
|
||||
Panel.prototype.onShow = _onShow;
|
||||
|
||||
return Panel;
|
||||
|
||||
@ -150,8 +149,6 @@ define(function(require) {
|
||||
context.off("click", "#add_"+RESOURCE+"_action_json").on("click", "#add_"+RESOURCE+"_action_json", function(){
|
||||
var new_action = $("select#select_new_action").val();
|
||||
var role = $("select#role_name").val();
|
||||
var period = $("input#period").val();
|
||||
var number = $("input#number").val();
|
||||
var snap_name = $("#snapname").val();
|
||||
var snap_id = $("#snapid").val();
|
||||
var disk_id = $("#diskid").val();
|
||||
@ -168,12 +165,6 @@ define(function(require) {
|
||||
actionJSON.data.id = that.id;
|
||||
actionJSON.data.action = {perform: new_action};
|
||||
actionJSON.data.action.params = {};
|
||||
if(period!=='' && period!==undefined){
|
||||
actionJSON.data.action.params.period = period;
|
||||
}
|
||||
if(number!=='' && number!==undefined){
|
||||
actionJSON.data.action.params.number = number;
|
||||
}
|
||||
if(that.actions.includes(new_action)){
|
||||
var rawData = [disk_id,snap_id,snap_name];
|
||||
var args = rawData.filter(function (e) {return e;}).join();
|
||||
@ -189,15 +180,4 @@ define(function(require) {
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function _onShow(context) {
|
||||
var deploys = this.data.filter(function(roles){
|
||||
return roles && roles.nodes;
|
||||
}).flatMap(function(node){
|
||||
return node.nodes;
|
||||
}).map(function(nde){
|
||||
return nde && nde.deploy_id && nde.vm_info && nde.vm_info.VM && nde.vm_info.VM.NAME ? "<a style='margin-right: 1rem;' href='/#oneflow-services-tab/"+nde.deploy_id+"'>"+nde.vm_info.VM.NAME+"</a>" : "" ;
|
||||
}).join("");
|
||||
$("#list_vms_sched_actions").empty().append(deploys);
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user