{"version":3,"sources":["webpack:///./src/views/modal/RentalService/SnapshotImage.vue","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?f95e"],"names":["render","_vm","this","_c","_self","_setupProxy","targetImage","staticClass","_m","attrs","on","closeThisPopup","staticStyle","directives","name","rawName","value","isLoading","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","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","vm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kB,OAAM,WACL,EAAKlB,iBAIblG,eAAc,WACNT,KAAKyF,gBAAgBqB,cAAc9G,KAAKyF,gBAC5CzF,KAAKqE,KAAKrE,KAAM,eAAgB,IAChCA,KAAK4J,WAAWC,OAASC,mBCjRyQ,I,wBCQ1SC,EAAY,eACd,EACAjK,EACA2E,GACA,EACA,KACA,KACA,MAIa,aAAAsF,E,oECnBf","file":"js/chunk-56cad795.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;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,\n ].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()\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;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\")])])])\n},function (){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;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\")])])])\n},function (){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;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 \")])])])\n},function (){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;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}]\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=289e9aec&\"\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&id=289e9aec&prod&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","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&id=289e9aec&prod&lang=css&\""],"sourceRoot":""}