mirror of https://github.com/statping/statping
				
				
				
			vue
							parent
							
								
									f491cbd019
								
							
						
					
					
						commit
						7d927d2b24
					
				
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 96 KiB | 
|  | @ -19,7 +19,7 @@ | |||
|                 <label class="d-inline d-sm-none">Enable CDN</label> | ||||
|                 <label class="d-none d-sm-block">Enable CDN</label> | ||||
|                 <span @click="core.using_cdn = !!core.using_cdn" class="switch"> | ||||
|                     <input type="checkbox" name="using_cdn" class="switch" id="switch-normal" v-bind:checked="core.using_cdn"> | ||||
|                     <input v-model="core.using_cdn" type="checkbox" name="using_cdn" class="switch" id="switch-normal" :checked="core.using_cdn"> | ||||
|                     <label for="switch-normal"></label> | ||||
|                   </span> | ||||
|             </div> | ||||
|  | @ -32,8 +32,8 @@ | |||
|         </div> | ||||
| 
 | ||||
|         <div class="form-group"> | ||||
|             <label for="timezone">Timezone</label><span class="mt-1 small float-right">Current: {{now}}</span> | ||||
|             <select v-model="core.timezone" class="form-control" name="timezone" id="timezone"> | ||||
|             <label for="timezone">Timezone</label><span class="mt-1 small float-right">Current: {{now()}}</span> | ||||
|             <select v-model="core.timezone" class="form-control" id="timezone"> | ||||
|                 <option value="-12.0" >(GMT -12:00) Eniwetok, Kwajalein</option> | ||||
|                 <option value="-11.0" >(GMT -11:00) Midway Island, Samoa</option> | ||||
|                 <option value="-10.0" >(GMT -10:00) Hawaii</option> | ||||
|  | @ -72,7 +72,7 @@ | |||
|             <div class="col-12"> | ||||
|                 <label class="d-none d-sm-block">Send Updates only</label> | ||||
|                 <span class="switch"> | ||||
|                     <input @change="core.update_notify = !core.update_notify" type="checkbox" name="update_notify-option" class="switch" id="switch-update_notify" v-bind:checked="core.update_notify"> | ||||
|                     <input v-model="core.update_notify" @change="core.update_notify = !!core.update_notify" type="checkbox" class="switch" id="switch-update_notify" v-bind:checked="core.update_notify"> | ||||
|                     <label for="switch-update_notify" class="mt-2 mt-sm-0"></label> | ||||
|                     <small class="form-text text-muted">Enabling this will send only notifications when the status of a services changes.</small> | ||||
|                 </span> | ||||
|  | @ -125,7 +125,7 @@ export default { | |||
|           e.preventDefault() | ||||
|           const c = this.core | ||||
|           const coreForm = {name: c.name, description: c.description, domain: c.domain, | ||||
|             timezone: c.timezone, using_cdn: c.using_cdn, footer: c.footer} | ||||
|             timezone: c.timezone, using_cdn: c.using_cdn, footer: c.footer, update_notify: c.update_notify} | ||||
|           alert(JSON.stringify(coreForm)) | ||||
|           await Api.core_save(coreForm) | ||||
|           const core = await Api.core() | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ | |||
|             <label for="switch-group-public" class="col-sm-4 col-form-label">Public Group</label> | ||||
|             <div class="col-8 mt-1"> | ||||
|             <span @click="group.public = !!group.public" class="switch float-left"> | ||||
|                 <input v-model="group.public" type="checkbox" name="public" class="switch" id="switch-group-public" v-bind:checked="group.public"> | ||||
|                 <input v-model="group.public" type="checkbox" class="switch" id="switch-group-public" :checked="group.public"> | ||||
|                 <label for="switch-group-public">Show group services to the public</label> | ||||
|             </span> | ||||
|             </div> | ||||
|  |  | |||
|  | @ -121,7 +121,7 @@ | |||
|         <div v-if="service.type.match(/^(http)$/)" class="form-group row"> | ||||
|             <label for="order" class="col-sm-4 col-form-label">Verify SSL</label> | ||||
|             <div class="col-8 mt-1"> | ||||
|             <span class="switch float-left"> | ||||
|             <span @click="service.verify_ssl = !!service.verify_ssl" class="switch float-left"> | ||||
|                 <input v-model="service.verify_ssl" type="checkbox" name="verify_ssl-option" class="switch" id="switch-verify-ssl" v-bind:checked="service.verify_ssl"> | ||||
|                 <label for="switch-verify-ssl">Verify SSL Certificate for this service</label> | ||||
|             </span> | ||||
|  | @ -130,7 +130,7 @@ | |||
|         <div class="form-group row"> | ||||
|             <label for="order" class="col-sm-4 col-form-label">Notifications</label> | ||||
|             <div class="col-8 mt-1"> | ||||
|             <span class="switch float-left"> | ||||
|             <span @click="service.allow_notifications = !!service.allow_notifications" class="switch float-left"> | ||||
|                 <input v-model="service.allow_notifications" type="checkbox" name="allow_notifications-option" class="switch" id="switch-notifications" v-bind:checked="service.allow_notifications"> | ||||
|                 <label for="switch-notifications">Allow notifications to be sent for this service</label> | ||||
|             </span> | ||||
|  | @ -139,7 +139,7 @@ | |||
|         <div class="form-group row"> | ||||
|             <label for="order" class="col-sm-4 col-form-label">Visible</label> | ||||
|             <div class="col-8 mt-1"> | ||||
|             <span class="switch float-left"> | ||||
|             <span @click="service.public = !!service.public" class="switch float-left"> | ||||
|                 <input v-model="service.public" type="checkbox" name="public-option" class="switch" id="switch-public" v-bind:checked="service.public"> | ||||
|                 <label for="switch-public">Show service details to the public</label> | ||||
|             </span> | ||||
|  |  | |||
|  | @ -7,7 +7,7 @@ | |||
|             </div> | ||||
|             <div class="col-6 col-md-4"> | ||||
|                   <span @click="user.admin = !!user.admin" class="switch"> | ||||
|                     <input type="checkbox" name="admin" class="switch" id="switch-normal" v-bind:checked="user.admin"> | ||||
|                     <input v-model="user.admin" type="checkbox" class="switch" id="switch-normal" v-bind:checked="user.admin"> | ||||
|                     <label for="switch-normal">Administrator</label> | ||||
|                   </span> | ||||
|             </div> | ||||
|  |  | |||
|  | @ -74,8 +74,8 @@ const router = new VueRouter({ | |||
| 
 | ||||
| router.beforeEach((to, from, next) => { | ||||
|   if (to.matched.some(record => record.meta.requiresAuth)) { | ||||
|     const tk = Api.token() | ||||
|     if (tk === null) { | ||||
|     const tk = localStorage.getItem("statping_user") | ||||
|     if (tk !== null) { | ||||
|       next() | ||||
|       return | ||||
|     } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 hunterlong
						hunterlong