1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-25 23:21:29 +03:00

B #5572: Fix schedule actions Sunstone recommended time (#1522)

This commit is contained in:
Frederick Borges 2021-10-13 16:05:35 +02:00 committed by GitHub
parent 22bcd546a4
commit eeb52b22b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,13 @@ define(function (require) {
CONSTANTS
*/
var CONFIRM_DIALOG_LEASES = require("utils/dialogs/leases/dialogId");
var defaultHour = "12:30";
var currentDate = new Date();
var newDate = new Date();
// if you want to add more time to the schedule action modify this
// variable
var hours = 1;
newDate.setTime(currentDate.getTime() + (hours*60*60*1000));
var defaultHour = newDate.getHours() + ":" + newDate.getMinutes();
var defaultActions = [
"terminate",
@ -84,7 +90,7 @@ define(function (require) {
var options_date_picker={
dateFormat: "yy-mm-dd",
minDate: new Date(),
minDate: currentDate,
showOptions: { direction: "down" }
};
@ -221,10 +227,9 @@ define(function (require) {
}
function _setup(context) {
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1;
var yyyy = today.getFullYear();
var dd = newDate.getDate();
var mm = newDate.getMonth() + 1;
var yyyy = newDate.getFullYear();
if (dd < 10) {
dd = "0" + dd;
}