|
|
@ -109,7 +109,6 @@
|
|
|
|
:monthChangeOnScroll="false"
|
|
|
|
:monthChangeOnScroll="false"
|
|
|
|
:minDate="minDate"
|
|
|
|
:minDate="minDate"
|
|
|
|
format="yyyy-MM-dd HH:mm"
|
|
|
|
format="yyyy-MM-dd HH:mm"
|
|
|
|
utc="preserve"
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -185,8 +184,8 @@
|
|
|
|
<Datepicker
|
|
|
|
<Datepicker
|
|
|
|
v-model="maintenance.timeRange"
|
|
|
|
v-model="maintenance.timeRange"
|
|
|
|
:dark="$root.isDark"
|
|
|
|
:dark="$root.isDark"
|
|
|
|
timePicker disableTimeRangeValidation range
|
|
|
|
timePicker
|
|
|
|
placeholder="Select Time"
|
|
|
|
disableTimeRangeValidation range
|
|
|
|
textInput
|
|
|
|
textInput
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -201,7 +200,7 @@
|
|
|
|
:monthChangeOnScroll="false"
|
|
|
|
:monthChangeOnScroll="false"
|
|
|
|
:minDate="minDate"
|
|
|
|
:minDate="minDate"
|
|
|
|
:enableTimePicker="false"
|
|
|
|
:enableTimePicker="false"
|
|
|
|
utc="preserve"
|
|
|
|
:utc="true"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -357,6 +356,9 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
init() {
|
|
|
|
init() {
|
|
|
|
|
|
|
|
// Use browser's timezone!
|
|
|
|
|
|
|
|
let timezone = dayjs.tz.guess();
|
|
|
|
|
|
|
|
|
|
|
|
this.affectedMonitors = [];
|
|
|
|
this.affectedMonitors = [];
|
|
|
|
this.selectedStatusPages = [];
|
|
|
|
this.selectedStatusPages = [];
|
|
|
|
|
|
|
|
|
|
|
@ -380,10 +382,8 @@ export default {
|
|
|
|
daysOfMonth: [],
|
|
|
|
daysOfMonth: [],
|
|
|
|
};
|
|
|
|
};
|
|
|
|
} else if (this.isEdit) {
|
|
|
|
} else if (this.isEdit) {
|
|
|
|
this.$root.getSocket().emit("getMaintenance", this.$route.params.id, (res) => {
|
|
|
|
this.$root.getSocket().emit("getMaintenance", this.$route.params.id, timezone, (res) => {
|
|
|
|
if (res.ok) {
|
|
|
|
if (res.ok) {
|
|
|
|
res.maintenance.start_date = this.$root.datetimeFormat(res.maintenance.start_date, "YYYY-MM-DDTHH:mm");
|
|
|
|
|
|
|
|
res.maintenance.end_date = this.$root.datetimeFormat(res.maintenance.end_date, "YYYY-MM-DDTHH:mm");
|
|
|
|
|
|
|
|
this.maintenance = res.maintenance;
|
|
|
|
this.maintenance = res.maintenance;
|
|
|
|
|
|
|
|
|
|
|
|
this.$root.getSocket().emit("getMonitorMaintenance", this.$route.params.id, (res) => {
|
|
|
|
this.$root.getSocket().emit("getMonitorMaintenance", this.$route.params.id, (res) => {
|
|
|
@ -441,8 +441,11 @@ export default {
|
|
|
|
this.maintenance.end_date = this.$root.toUTC(this.maintenance.end_date);
|
|
|
|
this.maintenance.end_date = this.$root.toUTC(this.maintenance.end_date);
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Use browser's timezone!
|
|
|
|
|
|
|
|
let timezone = dayjs.tz.guess();
|
|
|
|
|
|
|
|
|
|
|
|
if (this.isAdd) {
|
|
|
|
if (this.isAdd) {
|
|
|
|
this.$root.addMaintenance(this.maintenance, async (res) => {
|
|
|
|
this.$root.addMaintenance(this.maintenance, timezone, async (res) => {
|
|
|
|
if (res.ok) {
|
|
|
|
if (res.ok) {
|
|
|
|
await this.addMonitorMaintenance(res.maintenanceID, async () => {
|
|
|
|
await this.addMonitorMaintenance(res.maintenanceID, async () => {
|
|
|
|
await this.addMaintenanceStatusPage(res.maintenanceID, () => {
|
|
|
|
await this.addMaintenanceStatusPage(res.maintenanceID, () => {
|
|
|
@ -459,7 +462,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$root.getSocket().emit("editMaintenance", this.maintenance, async (res) => {
|
|
|
|
this.$root.getSocket().emit("editMaintenance", this.maintenance, timezone, async (res) => {
|
|
|
|
if (res.ok) {
|
|
|
|
if (res.ok) {
|
|
|
|
await this.addMonitorMaintenance(res.maintenanceID, async () => {
|
|
|
|
await this.addMonitorMaintenance(res.maintenanceID, async () => {
|
|
|
|
await this.addMaintenanceStatusPage(res.maintenanceID, () => {
|
|
|
|
await this.addMaintenanceStatusPage(res.maintenanceID, () => {
|
|
|
|