{"version":3,"sources":["webpack:///./src/views/modal/RentalService/SnapshotImage.vue?e687","webpack:///./src/scripts/modal/rentalService/snapshotImage.js","webpack:///./src/scripts/modal/rentalService/snapshotImage.js?6cc2","webpack:///./src/views/modal/RentalService/SnapshotImage.vue?ab95","webpack:///./src/views/modal/RentalService/SnapshotImage.vue?4708"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_m","attrs","on","closeThisPopup","staticStyle","targetImage","directives","name","rawName","value","expression","currentDisplayMode","displayMode","LIST","loadSnapshotList","_v","conditionalCreate","allowedCreated","openCreateForm","_e","_s","conditionalCreateMsg","parseInt","messageInfo","listSnapshot","length","_l","item","indexItem","key","id","padding","domProps","description","replace","_f","createdAt","lastModifiedAt","status","snapShotStatus","SAVED","CREATING","loadingProgress","SUCCEED","$event","restoreSnapshot","ERROR","RESTORING","includes","commandOptions","slot","commandName","data","CREATE","MODIFY","ref","newSnapshotItem","newSnapshotItemRules","nativeOn","preventDefault","model","callback","$$v","$set","canCreateModify","createModifySnapshot","cancelAddModify","staticRenderFns","extends","baseRentalService","components","IconError","lazyLoadComponent","componentFactory","loading","SkeletonBox","maxSnapshot","typeUser","required","message","trigger","min","max","intervalUpdate","computed","snapshotStatusMap","obj","SNAPSHOT_STATUS_INFO","reduce","snapItem","cur","i","SNAPSHOT_STATUS","props","type","Object","default","watch","newVal","oldVal","getConditionalCreate","autoUpdate","mounted","destroyed","clearInterval","methods","setInterval","isLoading","isSlient","feedStatusLoading","API_CALL_STATUS","LOADING","setTimeout","api","baseRequest","SETTINGS_SNAPSHOT_API","GET_SNAPSHOT_LIST","then","response","SUCCESS","catch","error","processCatchApiRequest","smoothTimeOut","CHECK_CONDITIONAL_CREATE","openModifyForm","targetItem","params","removeSnapshot","showConfirm","title","deviceInformation","JSON","stringify","getInformationClient","REMOVE_SNAPSHOT","notificationSuccess","$refs","snapshotForm","validate","valid","isCreateNew","messageSuccess","apiSetting","CREATE_SNAPSHOT","UPDATE_SNAPSHOT","machineId","msg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AAuBD,EAAO,4BACnC,EAAKpB,mBAEdmB,OAAM,WACL,EAAKnB,iBAIblG,eA/JK,WAgKGT,KAAKyF,gBAAgBqB,cAAc9G,KAAKyF,gBAC5CzF,KAAKqE,KAAKrE,KAAM,eAAgB,IAChCA,KAAK6J,WAAWC,OAASC,mBCjRyQ,I,wBCQ1SC,EAAY,eACd,EACAlK,EACA2E,GACA,EACA,KACA,KACA,MAIa,aAAAuF,E,2CCnBf,yBAAqf,EAAG,G","file":"js/chunk-10d962a3.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.targetImage)?_c('div',{staticClass:\"no-select d-flex flex-column m-3\"},[_c('div',{staticClass:\"d-flex flex-row justify-content-between no-select\"},[_vm._m(0),_c('button',{attrs:{\"type\":\"button\"},on:{\"click\":_vm.closeThisPopup}},[_c('i',{staticClass:\"el-icon-close button-close-popup\",staticStyle:{\"font-size\":\"1.75rem\"}})])]),_c('div',{staticClass:\"p-1 flex-fill d-flex\",staticStyle:{\"width\":\"100%\",\"min-height\":\"12.5rem\"}},[(_vm.targetImage)?_c('div',{staticClass:\"d-flex flex-column w-100\"},[_c('InformationBasic',{attrs:{\"targetImage\":_vm.targetImage}}),_c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.isLoading),expression:\"isLoading\"}],staticClass:\"d-flex flex-column mt-5 flex-fill\"},[_vm._m(1),_c('div',{staticClass:\"flex-fill d-flex flex-column\"},[_vm._m(2),(_vm.currentDisplayMode === _vm.displayMode.LIST)?_c('div',{staticClass:\"d-flex align-items-center pr-4\"},[_c('div',[_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"mini\"},on:{\"click\":_vm.loadSnapshotList}},[_c('i',{staticClass:\"el-icon-refresh\"}),_vm._v(\" Refresh list\\n \")]),(\n _vm.conditionalCreate &&\n _vm.conditionalCreate.allowedCreated\n )?_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"mini\"},on:{\"click\":_vm.openCreateForm}},[_c('i',{staticClass:\"el-icon-plus\"}),_vm._v(\" Create snapshot\\n \")]):_vm._e()],1),(\n _vm.conditionalCreate &&\n !_vm.conditionalCreate.allowedCreated\n )?_c('div',{staticClass:\"ml-3\"},[_c('span',{staticClass:\"text-danger\",staticStyle:{\"font-size\":\"80%\"}},[_c('i',[_vm._v(\"**\\n \"+_vm._s(_vm.conditionalCreateMsg[\n parseInt(\n _vm.conditionalCreate.messageInfo\n )\n ]))])])]):_vm._e()]):_vm._e(),_c('div',{staticClass:\"mt-3 flex-fill d-flex flex-column\"},[(\n _vm.listSnapshot.length > 0 &&\n _vm.currentDisplayMode === _vm.displayMode.LIST\n )?_c('VuePerfectScrollbar',{staticClass:\"flex-fill pr-4 pt-2\"},_vm._l((_vm.listSnapshot),function(item,indexItem){return _c('el-card',{key:item.id,staticClass:\"mb-2\",attrs:{\"body-style\":{ padding: '0.8rem' }}},[_c('div',{staticClass:\"d-flex align-items-start\"},[_c('div',{staticClass:\"mr-3\"},[_c('img',{staticStyle:{\"width\":\"4.5rem\"},attrs:{\"src\":\"/icon/snapshot/snapshot.svg\"}})]),_c('div',{staticClass:\"flex-fill pr-4 mr-2\"},[_c('div',[_c('h6',{staticClass:\"text-primary mb-1\"},[_c('strong',[_vm._v(_vm._s(item.name))])])]),_c('div',{staticStyle:{\"font-size\":\"90%\"}},[_c('span',{domProps:{\"innerHTML\":_vm._s(\n item.description.replace(\n /\\n/g,\n '
\\n'\n )\n )}})]),_c('div',{staticClass:\"mt-1\",staticStyle:{\"line-height\":\"1.1rem\"}},[_c('div',[_c('small',{staticClass:\"text-muted\"},[_c('i',{staticClass:\"el-icon-date text-primary mr-1\"}),_vm._v(\"\\n Created:\\n \"+_vm._s(_vm._f(\"pretyDateUtcToLocal\")(item.createdAt)))])]),(item.lastModifiedAt)?_c('div',[_c('small',{staticClass:\"text-muted\"},[_c('i',{staticClass:\"el-icon-date text-primary mr-1\"}),_vm._v(\"\\n Last modified:\\n \"+_vm._s(_vm._f(\"pretyDateUtcToLocal\")(item.lastModifiedAt)))])]):_vm._e()])]),_c('div',{staticClass:\"align-self-center\"},[(\n item.status ===\n _vm.snapShotStatus.SAVED\n )?_c('div',{staticClass:\"mr-5 mt-1\"},[_c('div',{staticClass:\"font-size-75\",staticStyle:{\"color\":\"darkorange\",\"font-weight\":\"500\"}},[_vm._v(\"\\n Preparing create snapshot...\\n \")]),_c('v-progress-linear',{staticClass:\"mt-2\",staticStyle:{\"width\":\"10rem\"},attrs:{\"indeterminate\":true,\"color\":\"light-blue\",\"height\":\"10\",\"value\":0}}),_c('div',{staticClass:\"mt-1 mb-3\",staticStyle:{\"font-size\":\"0.675rem\",\"color\":\"#9e9e9e\",\"font-style\":\"italic\"}},[_vm._v(\"\\n This may take a few minutes\\n \")])],1):_vm._e(),(\n item.status ===\n _vm.snapShotStatus.CREATING\n )?_c('div',[_c('div',{staticClass:\"font-size-75\",staticStyle:{\"color\":\"darkorange\",\"font-weight\":\"500\"}},[_vm._v(\"\\n Creating snapshot...\\n \")]),_c('v-progress-linear',{staticClass:\"mt-2\",staticStyle:{\"width\":\"10rem\"},attrs:{\"indeterminate\":item.loadingProgress ===\n 0\n ? true\n : false,\"color\":\"light-blue\",\"height\":\"10\",\"value\":item.loadingProgress}}),_c('div',{staticClass:\"mt-1 mb-3\",staticStyle:{\"font-size\":\"0.675rem\",\"color\":\"#9e9e9e\",\"font-style\":\"italic\"}},[_vm._v(\"\\n This may take a few minutes\\n \")])],1):_vm._e(),(\n item.status ===\n _vm.snapShotStatus.SUCCEED\n )?_c('div',{staticClass:\"mr-5 mt-2\"},[_c('el-button',{staticClass:\"mt0 mb-0 pt-0 pb-0\",attrs:{\"type\":\"text\"},on:{\"click\":function($event){return _vm.restoreSnapshot(item)}}},[_c('div',{staticClass:\"d-flex flex-column align-items-center\"},[_c('img',{staticStyle:{\"width\":\"2.2rem\"},attrs:{\"src\":\"/icon/snapshot/restore.svg\"}}),_c('span',{staticClass:\"font-size-75 mt-2\",staticStyle:{\"font-weight\":\"500\"}},[_vm._v(\"Restore\")])])])],1):_vm._e(),(\n item.status ===\n _vm.snapShotStatus.ERROR\n )?_c('div',{staticClass:\"mr-5 mt-2\"},[_c('div',{staticClass:\"text-danger d-flex flex-column align-items-center image-error\"},[_c('IconError'),_c('span',{staticClass:\"font-size-75 mt-1\",staticStyle:{\"font-weight\":\"500\"}},[_vm._v(\"Error\")])],1)]):_vm._e(),(\n item.status ===\n _vm.snapShotStatus.RESTORING\n )?_c('div',[_c('div',{staticClass:\"font-size-75\",staticStyle:{\"color\":\"darkorange\",\"font-weight\":\"500\"}},[_vm._v(\"\\n Restoring snapshot...\\n \")]),_c('v-progress-linear',{staticClass:\"mt-2\",staticStyle:{\"width\":\"10rem\"},attrs:{\"indeterminate\":item.loadingProgress ===\n 0\n ? true\n : false,\"color\":\"light-blue\",\"height\":\"10\",\"value\":item.loadingProgress}}),_c('div',{staticClass:\"mt-1 mb-3\",staticStyle:{\"font-size\":\"0.675rem\",\"color\":\"#9e9e9e\",\"font-style\":\"italic\"}},[_vm._v(\"\\n This may take a few minutes\\n \")])],1):_vm._e()]),(\n [\n _vm.snapShotStatus.SUCCEED,\n _vm.snapShotStatus.ERROR ].includes(item.status)\n )?_c('div',[_c('el-dropdown',{attrs:{\"trigger\":\"click\",\"placement\":\"bottom-end\"},on:{\"command\":_vm.commandOptions}},[_c('i',{staticClass:\"el-icon-more pl-2 pr-0\",staticStyle:{\"color\":\"#757575\",\"font-size\":\"1.3rem\"}}),_c('el-dropdown-menu',{staticClass:\"no-select\",attrs:{\"slot\":\"dropdown\"},slot:\"dropdown\"},[_c('el-dropdown-item',{attrs:{\"disabled\":false,\"command\":{\n commandName:\n 'MODIFY',\n data: item,\n }}},[_c('a',{staticStyle:{\"text-decoration\":\"none\"}},[_c('i',{staticClass:\"el-icon-postcard\",staticStyle:{\"margin-right\":\"0.95rem\"}}),_c('span',{staticClass:\"font-size-9\"},[_vm._v(\"Modify\")])])]),_c('el-dropdown-item',{attrs:{\"divided\":\"\",\"disabled\":false,\"command\":{\n commandName:\n 'REMOVE',\n data: item,\n }}},[_c('a',{staticStyle:{\"text-decoration\":\"none\"}},[_c('i',{staticClass:\"el-icon-delete text-danger\",staticStyle:{\"margin-right\":\"0.95rem\"}}),_c('span',{staticClass:\"font-size-9 text-danger\"},[_vm._v(\"Remove\")])])])],1)],1)],1):_vm._e()])])}),1):_vm._e(),(\n _vm.listSnapshot.length === 0 &&\n _vm.currentDisplayMode === _vm.displayMode.LIST\n )?_c('div',[_vm._m(3)]):_vm._e(),(\n _vm.currentDisplayMode === _vm.displayMode.CREATE ||\n _vm.currentDisplayMode === _vm.displayMode.MODIFY\n )?_c('div',{staticClass:\"pr-3\"},[_c('div',{staticClass:\"mb-5 text-primary d-flex align-items-center\"},[(\n _vm.currentDisplayMode ===\n _vm.displayMode.CREATE\n )?_c('strong',[_vm._v(\"\\n Create new snapshot for machine\\n \"+_vm._s(_vm.targetImage.id)+\"\\n \")]):_vm._e(),(\n _vm.currentDisplayMode ===\n _vm.displayMode.MODIFY\n )?_c('strong',[_vm._v(\"\\n Modify infomations snapshot for machine\\n \"+_vm._s(_vm.targetImage.id)+\"\\n \")]):_vm._e()]),_c('el-form',{ref:\"snapshotForm\",attrs:{\"model\":_vm.newSnapshotItem,\"rules\":_vm.newSnapshotItemRules},nativeOn:{\"submit\":function($event){$event.preventDefault();}}},[_c('div',{staticClass:\"mb-4\"},[_c('div',{staticClass:\"mb-1\"},[_c('small',{staticClass:\"text-muted\"},[_vm._v(\"Name of snapshot\\n \"),_c('span',{staticClass:\"text-danger\"},[_vm._v(\"*\")])])]),_c('el-form-item',{attrs:{\"prop\":\"name\"}},[_c('el-input',{attrs:{\"placeholder\":\"Enter name of snapshot..\"},model:{value:(_vm.newSnapshotItem.name),callback:function ($$v) {_vm.$set(_vm.newSnapshotItem, \"name\", $$v)},expression:\"newSnapshotItem.name\"}})],1)],1),_c('div',{staticClass:\"mb-4\"},[_c('div',{staticClass:\"mb-1\"},[_c('small',{staticClass:\"text-muted\"},[_vm._v(\"Description of snapshot\\n \"),_c('span',{staticClass:\"text-danger\"},[_vm._v(\"*\")])])]),_c('el-form-item',{attrs:{\"prop\":\"description\"}},[_c('el-input',{attrs:{\"placeholder\":\"Enter description..\",\"type\":\"textarea\",\"rows\":4},model:{value:(\n _vm.newSnapshotItem.description\n ),callback:function ($$v) {_vm.$set(_vm.newSnapshotItem, \"description\", $$v)},expression:\"\\n newSnapshotItem.description\\n \"}})],1)],1),_c('div',{staticClass:\"text-center mt-4\"},[_c('el-button',{attrs:{\"type\":\"primary\",\"disabled\":!_vm.canCreateModify},on:{\"click\":_vm.createModifySnapshot}},[_c('i',{staticClass:\"el-icon-check\"}),_vm._v(\"\\n \"+_vm._s(_vm.currentDisplayMode ===\n _vm.displayMode.CREATE\n ? \"Create\"\n : \"Modify\")+\"\\n \")]),_c('el-button',{on:{\"click\":_vm.cancelAddModify}},[_c('i',{staticClass:\"el-icon-close\"}),_vm._v(\" Cancel\\n \")])],1)])],1):_vm._e()],1)])])],1):_vm._e()])]):_vm._e()}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"d-flex flex-row flex-fill justify-content-center\",staticStyle:{\"color\":\"#1976d2\"}},[_c('div',[_c('i',{staticClass:\"el-icon-camera\",staticStyle:{\"font-size\":\"1rem\"}})]),_c('div',[_c('span',{staticClass:\"pop-up-title\"},[_vm._v(\"Snapshot machine\")])])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"title-item d-flex align-items-center mr-4\"},[_c('div',{staticClass:\"flex-fill\"},[_c('div',[_vm._v(\"Snapshot machine management\")])])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"text-muted\",staticStyle:{\"font-size\":\"80%\"}},[_c('ul',{staticClass:\"mb-2\",staticStyle:{\"list-style-position\":\"inside\"}},[_c('li',[_vm._v(\"Normal user can make 1 snapshot backup\")]),_c('li',[_vm._v(\"\\n Paid user more than 2 times can created 3\\n snapshot backups\\n \")]),_c('li',[_vm._v(\"\\n Prime user can create 1 snapshot backup per\\n machine\\n \")])])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"text-center mt-2 pb-3\"},[_c('img',{staticClass:\"m-auto\",staticStyle:{\"height\":\"15rem\"},attrs:{\"src\":\"/package/no-package-available.svg\"}}),_c('div',{staticClass:\"mt-4\"},[_c('h5',{staticClass:\"mb-1\"},[_c('strong',{staticClass:\"text-muted\"},[_vm._v(\"No snapshots have been created\\n yet\")])]),_c('div',[_c('i',{staticClass:\"text-muted\"},[_vm._v(\"Create a new snapshot now !\")])])])])}]\n\nexport { render, staticRenderFns }","// Event, Dialog\r\nimport EventBus from \"@/event/EventBus\";\r\n// Api\r\nimport api from '@/api/baseApi';\r\n// Constant\r\nimport { SETTINGS_SNAPSHOT_API } from \"@/constant/apiSettings\";\r\nimport { POPUP_ID } from \"@/constant/baseConstant\";\r\nimport { API_CALL_STATUS } from \"@/constant/baseConstant\";\r\nimport { SNAPSHOT_STATUS_INFO, SNAPSHOT_STATUS } from \"@/constant/constant\";\r\n// Extend\r\nimport baseRentalService from '@/scripts/rentalService/baseRentalService';\r\nimport lazyLoadComponent from \"@/scripts/lazyLoadComponent\";\r\nimport SkeletonBox from \"@/views/component/SkeletonBox\";\r\n\r\nexport default {\r\n\r\n extends: baseRentalService,\r\n components: {\r\n IconError: lazyLoadComponent({\r\n componentFactory: () => import(\"@/assets/svg/Error\"),\r\n loading: SkeletonBox\r\n }),\r\n },\r\n data() {\r\n\r\n return {\r\n listSnapshot: [],\r\n displayMode: {\r\n LIST: 1,\r\n CREATE: 2,\r\n MODIFY: 3\r\n },\r\n currentDisplayMode: 1,\r\n conditionalCreate: {\r\n allowedCreated: false,\r\n messageInfo: '0',\r\n maxSnapshot: 1,\r\n typeUser: 1\r\n },\r\n conditionalCreateMsg: [\r\n '',\r\n 'You can only create up to 1 snapshots for all image. You have reached the limit',\r\n 'You can only create up to 3 snapshots for all image. You have reached the limit',\r\n 'You can only create up to 1 snapshots for each image. You have reached the limit on this machine'\r\n ],\r\n newSnapshotItem: {\r\n name: '',\r\n description: ''\r\n },\r\n newSnapshotItemRules: {\r\n name: [\r\n {\r\n required: true,\r\n message: \"Name is required\",\r\n trigger: \"blur\"\r\n },\r\n { min: 3, max: 50, message: 'Length should be 3 to 50 characters', trigger: 'blur' }\r\n ],\r\n description: [\r\n {\r\n required: true,\r\n message: \"Description is required\",\r\n trigger: \"blur\"\r\n },\r\n { min: 3, max: 50, message: 'Length should be 3 to 250 characters', trigger: 'blur' }\r\n ],\r\n },\r\n intervalUpdate: null,\r\n };\r\n },\r\n\r\n computed: {\r\n snapshotStatusMap() {\r\n var obj = SNAPSHOT_STATUS_INFO.reduce(function (snapItem, cur, i) {\r\n snapItem[cur.id] = cur;\r\n return snapItem;\r\n }, {});\r\n return obj;\r\n },\r\n snapShotStatus() {\r\n return SNAPSHOT_STATUS;\r\n },\r\n canCreateModify() {\r\n return this.newSnapshotItem.name && this.newSnapshotItem.description;\r\n }\r\n },\r\n\r\n props: {\r\n targetImage: {\r\n type: Object,\r\n default: null,\r\n },\r\n },\r\n\r\n watch: {\r\n targetImage: function (newVal, oldVal) {\r\n this.getConditionalCreate();\r\n this.loadSnapshotList();\r\n this.autoUpdate();\r\n }\r\n },\r\n\r\n mounted() {\r\n this.getConditionalCreate();\r\n this.loadSnapshotList();\r\n this.autoUpdate();\r\n },\r\n destroyed() {\r\n if (this.intervalUpdate) clearInterval(this.intervalUpdate);\r\n this.$set(this, 'listSnapshot', []);\r\n },\r\n methods: {\r\n autoUpdate() {\r\n if (this.intervalUpdate) clearInterval(this.intervalUpdate);\r\n this.intervalUpdate = setInterval(() => {\r\n if (this.currentDisplayMode === this.displayMode.LIST && !this.isLoading) this.loadSnapshotList(true);\r\n }, 5000);\r\n },\r\n loadSnapshotList(isSlient = false) {\r\n if (!isSlient) this.feedStatusLoading(API_CALL_STATUS.LOADING);\r\n setTimeout(() => {\r\n api.baseRequest(SETTINGS_SNAPSHOT_API.GET_SNAPSHOT_LIST, null, `/${this.targetImage.id}`)\r\n .then((response) => {\r\n this.feedStatusLoading(API_CALL_STATUS.SUCCESS);\r\n if (!isSlient) {\r\n this.$set(this, 'listSnapshot', response.data);\r\n this.cancelAddModify();\r\n }\r\n else {\r\n this.$set(this, 'listSnapshot', response.data);\r\n }\r\n })\r\n .catch(error => {\r\n this.processCatchApiRequest(error, \"Load snapshot failed ...\");\r\n });\r\n }, this.smoothTimeOut);\r\n },\r\n getConditionalCreate() {\r\n api.baseRequest(SETTINGS_SNAPSHOT_API.CHECK_CONDITIONAL_CREATE, null, `/${this.targetImage.id}`)\r\n .then((response) => {\r\n this.$set(this, 'conditionalCreate', response.data);\r\n })\r\n .catch(error => {\r\n\r\n });\r\n },\r\n openCreateForm() {\r\n if (this.intervalUpdate) clearInterval(this.intervalUpdate);\r\n this.newSnapshotItem = {\r\n name: '',\r\n description: ''\r\n };\r\n this.currentDisplayMode = this.displayMode.CREATE;\r\n },\r\n openModifyForm(targetItem) {\r\n if (this.intervalUpdate) clearInterval(this.intervalUpdate);\r\n this.newSnapshotItem = {\r\n id: targetItem.id,\r\n name: targetItem.name,\r\n description: targetItem.description\r\n };\r\n this.currentDisplayMode = this.displayMode.MODIFY;\r\n },\r\n cancelAddModify() {\r\n this.newSnapshotItem = {\r\n name: '',\r\n description: ''\r\n };\r\n this.currentDisplayMode = this.displayMode.LIST;\r\n this.autoUpdate();\r\n },\r\n commandOptions(params) {\r\n if (this.intervalUpdate) clearInterval(this.intervalUpdate);\r\n switch (params.commandName) {\r\n case 'MODIFY':\r\n this.openModifyForm(params.data);\r\n break;\r\n case 'REMOVE':\r\n this.removeSnapshot(params.data);\r\n break;\r\n }\r\n },\r\n removeSnapshot(targetItem) {\r\n this.showConfirm({ title: 'Confirm', message: 'This will permanently remove the snapshot. Continue?' }).then(() => {\r\n let data = {\r\n id: targetItem.id,\r\n deviceInformation: JSON.stringify(this.getInformationClient())\r\n };\r\n api.baseRequest(SETTINGS_SNAPSHOT_API.REMOVE_SNAPSHOT, data)\r\n .then((response) => {\r\n this.loadSnapshotList();\r\n this.notificationSuccess('Succeed !', 'The snapshot was deleted.');\r\n this.autoUpdate();\r\n this.getConditionalCreate();\r\n })\r\n .catch(error => {\r\n this.processCatchApiRequest(error, \"Load snapshot failed ...\");\r\n this.autoUpdate();\r\n this.getConditionalCreate();\r\n });\r\n }).catch(() => {\r\n\r\n });\r\n },\r\n createModifySnapshot() {\r\n this.$refs.snapshotForm.validate(valid => {\r\n if (valid) {\r\n let isCreateNew = this.currentDisplayMode === this.displayMode.CREATE;\r\n let message = isCreateNew ? 'This will create a new snapshot' : 'This will modified snapshot';\r\n let messageSuccess = isCreateNew ? 'The snapshot was created !' : 'The snapshot was modified !';\r\n this.showConfirm({ title: 'Confirm', message: `#${message}. Continue?` }).then(() => {\r\n let apiSetting = isCreateNew ? SETTINGS_SNAPSHOT_API.CREATE_SNAPSHOT : SETTINGS_SNAPSHOT_API.UPDATE_SNAPSHOT;\r\n let data = {};\r\n if (isCreateNew) {\r\n data = {\r\n ...this.newSnapshotItem,\r\n machineId: this.targetImage.id,\r\n deviceInformation: JSON.stringify(this.getInformationClient())\r\n };\r\n }\r\n else {\r\n data = {\r\n ...this.newSnapshotItem,\r\n deviceInformation: JSON.stringify(this.getInformationClient())\r\n };\r\n }\r\n\r\n api.baseRequest(apiSetting, data)\r\n .then((response) => {\r\n this.loadSnapshotList();\r\n this.notificationSuccess('Succeed !', messageSuccess);\r\n this.getConditionalCreate();\r\n })\r\n .catch(error => {\r\n this.processCatchApiRequest(error, \"Load snapshot failed ...\");\r\n this.getConditionalCreate();\r\n });\r\n\r\n }).catch(() => {\r\n this.autoUpdate();\r\n this.getConditionalCreate();\r\n });\r\n } else {\r\n return false;\r\n }\r\n });\r\n },\r\n restoreSnapshot(targetItem) {\r\n if (this.intervalUpdate) clearInterval(this.intervalUpdate);\r\n let msg = `Do you really want to restore this backup? Note that all image [${targetItem.vmMachineId}]-[${targetItem.imageName}] data will be overwritten. Continue?`;\r\n this.showConfirm({ title: 'Confirm', message: msg }).then(() => {\r\n let data = {\r\n id: targetItem.id,\r\n deviceInformation: JSON.stringify(this.getInformationClient())\r\n };\r\n api.baseRequest(SETTINGS_SNAPSHOT_API.RESTORE_SNAPSHOT, data)\r\n .then((response) => {\r\n this.loadSnapshotList();\r\n this.notificationSuccess('Succeed !', 'The snapshot restoring is inprogress.');\r\n this.autoUpdate();\r\n })\r\n .catch(error => {\r\n this.processCatchApiRequest(error, \"Load snapshot failed ...\");\r\n this.autoUpdate();\r\n });\r\n }).catch(() => {\r\n this.autoUpdate();\r\n });\r\n },\r\n // Close this pop-up\r\n closeThisPopup() {\r\n if (this.intervalUpdate) clearInterval(this.intervalUpdate);\r\n this.$set(this, 'listSnapshot', []);\r\n this.closePopup(POPUP_ID.SNAPSHOT_IMAGE);\r\n },\r\n },\r\n}","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/eslint-loader/index.js??ref--13-0!./snapshotImage.js?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/eslint-loader/index.js??ref--13-0!./snapshotImage.js?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./SnapshotImage.vue?vue&type=template&id=3b8600f8&\"\nimport script from \"@/scripts/modal/rentalService/snapshotImage.js?vue&type=script&lang=js&\"\nexport * from \"@/scripts/modal/rentalService/snapshotImage.js?vue&type=script&lang=js&\"\nimport style0 from \"./SnapshotImage.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SnapshotImage.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SnapshotImage.vue?vue&type=style&index=0&lang=css&\""],"sourceRoot":""}