Skip to content
Snippets Groups Projects
Select Git revision
  • cc75a7681d135de20067b16cf93ae8ab07a1090d
  • experimental default protected
  • v2023.2.5-ffs
  • nrb/ex400-remove-wps
  • nrb/airmax-test
  • v2023.2.4-ffs
  • nrb/ar9344-reset-sequence
  • autinerd/experimental-openwrt-24.10
  • v2023.2.3-ffs
  • v2023.2.2-ffs
  • v2023.2-ffs
  • v2023.1-ffs
  • v2022.1.4-ffs
  • feature/addMikrotikwAP
  • v2022.1.3-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • master protected
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • v2023.2.5-ffs0.1
  • experimental-2025-06-08
  • experimental-2025-06-08-base
  • experimental-2025-06-06
  • experimental-2025-06-06-base
  • experimental-2025-05-27
  • experimental-2025-05-27-base
  • experimental-2025-05-18
  • experimental-2025-05-18-base
  • experimental-2025-05-15
  • experimental-2025-05-15-base
  • experimental-2025-05-13
  • experimental-2025-05-13-base
  • experimental-2025-05-08
  • experimental-2025-05-08-base
  • experimental-2025-05-05
  • experimental-2025-05-05-base
  • experimental-2025-05-02
  • experimental-2025-05-02-base
  • experimental-2025-05-01
41 results

generate-actions.py

Blame
  • gluon-web-model.js 11.26 KiB
    /*
    	Copyright 2008 Steven Barth <steven@midlink.org>
    	Copyright 2008-2012 Jo-Philipp Wich <jow@openwrt.org>
    	Copyright 2017 Matthias Schiffer <mschiffer@universe-factory.net>
    
    	Licensed under the Apache License, Version 2.0 (the "License");
    	you may not use this file except in compliance with the License.
    	You may obtain a copy of the License at
    
    	http://www.apache.org/licenses/LICENSE-2.0
    */
    
    /*
    	Build using:
    
    	uglifyjs javascript/gluon-web-model.js -o files/lib/gluon/web/www/static/gluon-web-model.js -c -m --support-ie8
    */
    
    
    
    (function() {
    	var dep_entries = {};
    
    	function Int(x) {
    		return (/^-?\d+$/.test(x) ? +x : NaN);
    	}
    
    	function Dec(x) {
    		return (/^-?\d*\.?\d+?$/.test(x) ? +x : NaN);
    	}
    
    	var validators = {
    
    		'integer': function() {
    			return !isNaN(Int(this));
    		},
    
    		'uinteger': function() {
    			return (Int(this) >= 0);
    		},
    
    		'float': function() {
    			return !isNaN(Dec(this));
    		},
    
    		'ufloat': function() {
    			return (Dec(this) >= 0);
    		},
    
    		'ipaddr': function() {
    			return validators.ip4addr.apply(this) ||
    				validators.ip6addr.apply(this);
    		},
    
    		'ip4addr': function() {
    			var match;
    			if ((match = this.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/))) {
    				return (match[1] >= 0) && (match[1] <= 255) &&
    				       (match[2] >= 0) && (match[2] <= 255) &&
    				       (match[3] >= 0) && (match[3] <= 255) &&
    				       (match[4] >= 0) && (match[4] <= 255);
    			}
    
    			return false;
    		},
    
    		'ip6addr': function() {
    			if (this.indexOf('::') < 0)
    				return (this.match(/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i) != null);