summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-03-10 22:45:18 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-03-24 01:18:13 +0200
commit7d9c43916b0600ac4879dfe9793eab807a83ab2b (patch)
treeec54ed64c9a557b6ea4ad88d31138a02d3e0cd04
parentcb6c243dc356ef1d46d7ddb96e6ea6ae007c6cca (diff)
downloadaconf-7d9c43916b0600ac4879dfe9793eab807a83ab2b.tar.bz2
aconf-7d9c43916b0600ac4879dfe9793eab807a83ab2b.tar.xz
rename ACF2 to Alpine Configurator (aconf)
-rw-r--r--Makefile12
-rw-r--r--acf2/init.lua25
-rw-r--r--aconf/error.lua (renamed from acf2/error.lua)6
-rw-r--r--aconf/init.lua25
-rw-r--r--aconf/loader.lua (renamed from acf2/loader.lua)6
-rw-r--r--aconf/model/aaa.lua (renamed from acf2/model/aaa.lua)4
-rw-r--r--aconf/model/binary.lua (renamed from acf2/model/binary.lua)4
-rw-r--r--aconf/model/combination.lua (renamed from acf2/model/combination.lua)10
-rw-r--r--aconf/model/field.lua (renamed from acf2/model/field.lua)8
-rw-r--r--aconf/model/init.lua (renamed from acf2/model/init.lua)34
-rw-r--r--aconf/model/model.lua (renamed from acf2/model/model.lua)12
-rw-r--r--aconf/model/net.lua (renamed from acf2/model/net.lua)12
-rw-r--r--aconf/model/node.lua (renamed from acf2/model/node.lua)8
-rw-r--r--aconf/model/permission.lua (renamed from acf2/model/permission.lua)6
-rw-r--r--aconf/model/root.lua (renamed from acf2/model/root.lua)12
-rw-r--r--aconf/model/service.lua (renamed from acf2/model/service.lua)10
-rw-r--r--aconf/model/set.lua (renamed from acf2/model/set.lua)14
-rw-r--r--aconf/model/time.lua (renamed from acf2/model/time.lua)6
-rw-r--r--aconf/modules/demo-awall.lua (renamed from acf2/modules/demo-awall.lua)4
-rw-r--r--aconf/modules/demo-generic.lua (renamed from acf2/modules/demo-generic.lua)4
-rw-r--r--aconf/modules/network.lua (renamed from acf2/modules/network.lua)2
-rw-r--r--aconf/modules/openssh.lua (renamed from acf2/modules/openssh.lua)2
-rw-r--r--aconf/object.lua (renamed from acf2/object.lua)0
-rw-r--r--aconf/path.lua (renamed from acf2/path.lua)4
-rw-r--r--aconf/persistence/backends/augeas.lua (renamed from acf2/persistence/backends/augeas.lua)10
-rw-r--r--aconf/persistence/backends/files.lua (renamed from acf2/persistence/backends/files.lua)12
-rw-r--r--aconf/persistence/backends/json.lua (renamed from acf2/persistence/backends/json.lua)12
-rw-r--r--aconf/persistence/backends/null.lua (renamed from acf2/persistence/backends/null.lua)4
-rw-r--r--aconf/persistence/backends/service.lua (renamed from acf2/persistence/backends/service.lua)4
-rw-r--r--aconf/persistence/backends/volatile.lua (renamed from acf2/persistence/backends/volatile.lua)6
-rw-r--r--aconf/persistence/defer.lua (renamed from acf2/persistence/defer.lua)8
-rw-r--r--aconf/persistence/init.lua (renamed from acf2/persistence/init.lua)12
-rw-r--r--aconf/persistence/util.lua (renamed from acf2/persistence/util.lua)0
-rw-r--r--aconf/transaction/base.lua (renamed from acf2/transaction/base.lua)8
-rw-r--r--aconf/transaction/init.lua (renamed from acf2/transaction/init.lua)16
-rw-r--r--aconf/util.lua (renamed from acf2/util.lua)6
-rwxr-xr-xdev-shell84
-rwxr-xr-xinstall-deps.sh2
-rw-r--r--protocol.txt18
-rwxr-xr-xrun-server.sh4
-rw-r--r--server.lua28
-rw-r--r--web/client.js28
-rw-r--r--web/dom.js2
-rw-r--r--web/layout/stacked.js2
-rw-r--r--web/layout/tabular.js8
-rw-r--r--web/statusbar.js2
-rw-r--r--web/transaction.js8
-rw-r--r--web/widget/abstract/base.js2
-rw-r--r--web/widget/abstract/fields.js20
-rw-r--r--web/widget/abstract/inline.js2
-rw-r--r--web/widget/abstract/node.js2
-rw-r--r--web/widget/audio.js2
-rw-r--r--web/widget/checkbox.js2
-rw-r--r--web/widget/checkboxes.js6
-rw-r--r--web/widget/combobox.js2
-rw-r--r--web/widget/date.js2
-rw-r--r--web/widget/field.js8
-rw-r--r--web/widget/inline.js8
-rw-r--r--web/widget/link.js2
-rw-r--r--web/widget/reference.js2
-rw-r--r--web/widget/table/header.js2
-rw-r--r--web/widget/table/row.js2
62 files changed, 289 insertions, 289 deletions
diff --git a/Makefile b/Makefile
index ae208a5..7ac47e2 100644
--- a/Makefile
+++ b/Makefile
@@ -4,11 +4,11 @@
ROOT_DIR := /
LUA_VERSION := 5.2
-confdir := etc/acf2
-luadir := usr/share/lua/$(LUA_VERSION)/acf2
-resdir := usr/share/acf2
+confdir := etc/aconf
+luadir := usr/share/lua/$(LUA_VERSION)/aconf
+resdir := usr/share/aconf
webdir := $(resdir)/web
-starter := usr/sbin/acf2
+starter := usr/sbin/aconfd
all: install
@@ -40,8 +40,8 @@ files += $(resdir)/$(1)
endef
-$(eval $(call link,acf2,$(luadir)))
-$(eval $(call rcopy,acf2,$(luadir),lua,-not -path 'acf2/modules/demo-*'))
+$(eval $(call link,aconf,$(luadir)))
+$(eval $(call rcopy,aconf,$(luadir),lua,-not -path 'aconf/modules/demo-*'))
$(eval $(call link,config,$(confdir)))
$(eval $(call copy,config,$(confdir),aaa.json,600))
diff --git a/acf2/init.lua b/acf2/init.lua
deleted file mode 100644
index 95ce91e..0000000
--- a/acf2/init.lua
+++ /dev/null
@@ -1,25 +0,0 @@
---[[
-Copyright (c) 2012-2014 Kaarle Ritvanen
-See LICENSE file for license details
---]]
-
-local M = {}
-
-M.model = require('acf2.model')
-
-require('acf2.model.aaa')
-local mods = require('acf2.loader')('modules')
-
-M.call = require('acf2.error').call
-M.object = require('acf2.object')
-M.path = require('acf2.path')
-M.start_txn = require('acf2.transaction')
-
-local txn = M.start_txn()
-for _, rv in pairs(mods) do if type(rv) == 'function' then rv(txn) end end
-txn:commit()
-
-local def_store = require('acf2.persistence.defer')
-function M.commit() def_store:commit() end
-
-return M
diff --git a/acf2/error.lua b/aconf/error.lua
index 14a2570..165bb46 100644
--- a/acf2/error.lua
+++ b/aconf/error.lua
@@ -1,14 +1,14 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
local M = {}
-local object = require('acf2.object')
+local object = require('aconf.object')
local class = object.class
-local util = require('acf2.util')
+local util = require('aconf.util')
local json = require('cjson')
diff --git a/aconf/init.lua b/aconf/init.lua
new file mode 100644
index 0000000..9a4e0b5
--- /dev/null
+++ b/aconf/init.lua
@@ -0,0 +1,25 @@
+--[[
+Copyright (c) 2012-2014 Kaarle Ritvanen
+See LICENSE file for license details
+--]]
+
+local M = {}
+
+M.model = require('aconf.model')
+
+require('aconf.model.aaa')
+local mods = require('aconf.loader')('modules')
+
+M.call = require('aconf.error').call
+M.object = require('aconf.object')
+M.path = require('aconf.path')
+M.start_txn = require('aconf.transaction')
+
+local txn = M.start_txn()
+for _, rv in pairs(mods) do if type(rv) == 'function' then rv(txn) end end
+txn:commit()
+
+local def_store = require('aconf.persistence.defer')
+function M.commit() def_store:commit() end
+
+return M
diff --git a/acf2/loader.lua b/aconf/loader.lua
index f5cac80..8c58adc 100644
--- a/acf2/loader.lua
+++ b/aconf/loader.lua
@@ -1,15 +1,15 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local pth = require('acf2.path')
+local pth = require('aconf.path')
local posix = require('posix')
local stringy = require('stringy')
return function(subdir)
- local comps = pth.split('acf2/'..subdir)
+ local comps = pth.split('aconf/'..subdir)
local res = {}
for _, modfile in ipairs(posix.dir(pth.join(unpack(comps)))) do
if stringy.endswith(modfile, '.lua') then
diff --git a/acf2/model/aaa.lua b/aconf/model/aaa.lua
index 7a650a8..e324381 100644
--- a/acf2/model/aaa.lua
+++ b/aconf/model/aaa.lua
@@ -3,8 +3,8 @@ Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local M = require('acf2.model')
-local object = require('acf2.object')
+local M = require('aconf.model')
+local object = require('aconf.object')
local digest = require('crypto').digest
diff --git a/acf2/model/binary.lua b/aconf/model/binary.lua
index 2af10a0..fcff3ea 100644
--- a/acf2/model/binary.lua
+++ b/aconf/model/binary.lua
@@ -5,7 +5,7 @@ See LICENSE file for license details
local M = {}
-local object = require('acf2.object')
+local object = require('aconf.object')
local class = object.class
local super = object.super
@@ -30,7 +30,7 @@ function M.Data:encode()
end
-M.Audio = class(require('acf2.model.field').Field)
+M.Audio = class(require('aconf.model.field').Field)
function M.Audio:init(params)
super(self, M.Audio):init(params)
diff --git a/acf2/model/combination.lua b/aconf/model/combination.lua
index 28c1570..cc145c3 100644
--- a/acf2/model/combination.lua
+++ b/aconf/model/combination.lua
@@ -1,19 +1,19 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
local M = {}
-local err = require('acf2.error')
+local err = require('aconf.error')
local raise = err.raise
-local fld = require('acf2.model.field')
+local fld = require('aconf.model.field')
local String = fld.String
-local to_field = require('acf2.model.model').to_field
+local to_field = require('aconf.model.model').to_field
-local object = require('acf2.object')
+local object = require('aconf.object')
local class = object.class
local super = object.super
diff --git a/acf2/model/field.lua b/aconf/model/field.lua
index 001a77b..80f08c5 100644
--- a/acf2/model/field.lua
+++ b/aconf/model/field.lua
@@ -5,16 +5,16 @@ See LICENSE file for license details
local M = {}
-local err = require('acf2.error')
+local err = require('aconf.error')
local raise = err.raise
-local node = require('acf2.model.node')
+local node = require('aconf.model.node')
-local object = require('acf2.object')
+local object = require('aconf.object')
local class = object.class
local super = object.super
-local util = require('acf2.util')
+local util = require('aconf.util')
local map = util.map
local setdefaults = util.setdefaults
diff --git a/acf2/model/init.lua b/aconf/model/init.lua
index bbefbc8..c0b5998 100644
--- a/acf2/model/init.lua
+++ b/aconf/model/init.lua
@@ -5,31 +5,31 @@ See LICENSE file for license details
local M = {}
-M.error = require('acf2.error')
+M.error = require('aconf.error')
local raise = M.error.raise
local relabel = M.error.relabel
-M.binary = require('acf2.model.binary')
+M.binary = require('aconf.model.binary')
-local combination = require('acf2.model.combination')
+local combination = require('aconf.model.combination')
M.Union = combination.Union
M.Range = combination.Range
-local fld = require('acf2.model.field')
+local fld = require('aconf.model.field')
local Field = fld.Field
M.Boolean = fld.Boolean
M.Integer = fld.Integer
M.Number = fld.Number
M.String = fld.String
-local model = require('acf2.model.model')
+local model = require('aconf.model.model')
M.Action = model.Action
M.new = model.new
local to_field = model.to_field
-M.net = require('acf2.model.net')
+M.net = require('aconf.model.net')
-local node = require('acf2.model.node')
+local node = require('aconf.model.node')
M.node = {}
for _, m in ipairs{
'List',
@@ -47,22 +47,22 @@ for _, m in ipairs{
'ipairs'
} do M.node[m] = node[m] end
-M.permission = require('acf2.model.permission')
-M.register = require('acf2.model.root').register
-M.service = require('acf2.model.service')
-M.node.Set = require('acf2.model.set').Set
-M.time = require('acf2.model.time')
+M.permission = require('aconf.model.permission')
+M.register = require('aconf.model.root').register
+M.service = require('aconf.model.service')
+M.node.Set = require('aconf.model.set').Set
+M.time = require('aconf.model.time')
-local object = require('acf2.object')
+local object = require('aconf.object')
local class = object.class
local isinstance = object.isinstance
local super = object.super
-M.path = require('acf2.path')
-local store = require('acf2.persistence')
-local def_store = require('acf2.persistence.defer')
+M.path = require('aconf.path')
+local store = require('aconf.persistence')
+local def_store = require('aconf.persistence.defer')
-local util = require('acf2.util')
+local util = require('aconf.util')
local setdefault = util.setdefault
local update = util.update
diff --git a/acf2/model/model.lua b/aconf/model/model.lua
index cf90d88..0ff41d1 100644
--- a/acf2/model/model.lua
+++ b/aconf/model/model.lua
@@ -5,25 +5,25 @@ See LICENSE file for license details
local M = {}
-local raise = require('acf2.error').raise
+local raise = require('aconf.error').raise
-local fld = require('acf2.model.field')
+local fld = require('aconf.model.field')
local Field = fld.Field
local Member = fld.Member
local Model = fld.Model
local normalize_name = fld.normalize_name
-local node = require('acf2.model.node')
+local node = require('aconf.model.node')
local BoundMember = node.BoundMember
-local object = require('acf2.object')
+local object = require('aconf.object')
local class = object.class
local super = object.super
local isinstance = object.isinstance
-local pth = require('acf2.path')
+local pth = require('aconf.path')
-local util = require('acf2.util')
+local util = require('aconf.util')
local copy = util.copy
local map = util.map
diff --git a/acf2/model/net.lua b/aconf/model/net.lua
index d965abc..7d7a00f 100644
--- a/acf2/model/net.lua
+++ b/aconf/model/net.lua
@@ -5,18 +5,18 @@ See LICENSE file for license details
local M = {}
-local raise = require('acf2.error').raise
-local Union = require('acf2.model.combination').Union
+local raise = require('aconf.error').raise
+local Union = require('aconf.model.combination').Union
-local fld = require('acf2.model.field')
+local fld = require('aconf.model.field')
local String = fld.String
-local object = require('acf2.object')
+local object = require('aconf.object')
local class = object.class
local super = object.super
-local pth = require('acf2.path')
-local update = require('acf2.util').update
+local pth = require('aconf.path')
+local update = require('aconf.util').update
local stringy = require('stringy')
diff --git a/acf2/model/node.lua b/aconf/model/node.lua
index 86a9f0c..49053f5 100644
--- a/acf2/model/node.lua
+++ b/aconf/model/node.lua
@@ -5,16 +5,16 @@ See LICENSE file for license details
local M = {}
-local raise = require('acf2.error').raise
+local raise = require('aconf.error').raise
-local object = require('acf2.object')
+local object = require('aconf.object')
local class = object.class
local isinstance = object.isinstance
local super = object.super
-local pth = require('acf2.path')
+local pth = require('aconf.path')
-local util = require('acf2.util')
+local util = require('aconf.util')
local copy = util.copy
local update = util.update
diff --git a/acf2/model/permission.lua b/aconf/model/permission.lua
index 9911ba0..e90099b 100644
--- a/acf2/model/permission.lua
+++ b/aconf/model/permission.lua
@@ -1,12 +1,12 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
local M = {}
-local node = require('acf2.model.node')
-local start_txn = require('acf2.transaction')
+local node = require('aconf.model.node')
+local start_txn = require('aconf.transaction')
function M.define(path, ...)
local txn = start_txn()
diff --git a/acf2/model/root.lua b/aconf/model/root.lua
index a6954af..027b2e2 100644
--- a/acf2/model/root.lua
+++ b/aconf/model/root.lua
@@ -1,16 +1,16 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
local M = {}
-local model = require('acf2.model.model')
-local node = require('acf2.model.node')
-local object = require('acf2.object')
-local pth = require('acf2.path')
+local model = require('aconf.model.model')
+local node = require('aconf.model.node')
+local object = require('aconf.object')
+local pth = require('aconf.path')
-local util = require('acf2.util')
+local util = require('aconf.util')
local setdefault = util.setdefault
diff --git a/acf2/model/service.lua b/aconf/model/service.lua
index 8d7d6f8..6951ffc 100644
--- a/acf2/model/service.lua
+++ b/aconf/model/service.lua
@@ -3,11 +3,11 @@ Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local fld = require('acf2.model.field')
-local new = require('acf2.model.model').new
-local super = require('acf2.object').super
-local pth = require('acf2.path')
-local store = require('acf2.persistence')
+local fld = require('aconf.model.field')
+local new = require('aconf.model.model').new
+local super = require('aconf.object').super
+local pth = require('aconf.path')
+local store = require('aconf.persistence')
return function(name)
local res = new()
diff --git a/acf2/model/set.lua b/aconf/model/set.lua
index 8d255d9..efed851 100644
--- a/acf2/model/set.lua
+++ b/aconf/model/set.lua
@@ -1,18 +1,18 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
local M = {}
-local TreeNode = require('acf2.model.field').TreeNode
-local node = require('acf2.model.node')
-local object = require('acf2.object')
-local pth = require('acf2.path')
-local setdefaults = require('acf2.util').setdefaults
+local TreeNode = require('aconf.model.field').TreeNode
+local node = require('aconf.model.node')
+local object = require('aconf.object')
+local pth = require('aconf.path')
+local setdefaults = require('aconf.util').setdefaults
-M.Set = object.class(require('acf2.model.node').List)
+M.Set = object.class(require('aconf.model.node').List)
function M.Set:init(context, params)
assert(not object.isinstance(params.field, TreeNode))
diff --git a/acf2/model/time.lua b/aconf/model/time.lua
index 5630e38..ca6008d 100644
--- a/acf2/model/time.lua
+++ b/aconf/model/time.lua
@@ -5,9 +5,9 @@ See LICENSE file for license details
local M = {}
-local raise = require('acf2.error').raise
+local raise = require('aconf.error').raise
-local object = require('acf2.object')
+local object = require('aconf.object')
local class = object.class
local super = object.super
@@ -15,7 +15,7 @@ local super = object.super
local posix = require('posix')
-M.Timestamp = class(require('acf2.model.field').String)
+M.Timestamp = class(require('aconf.model.field').String)
M.Date = class(M.Timestamp)
M.Time = class(M.Timestamp)
diff --git a/acf2/modules/demo-awall.lua b/aconf/modules/demo-awall.lua
index 45c3674..7d28989 100644
--- a/acf2/modules/demo-awall.lua
+++ b/aconf/modules/demo-awall.lua
@@ -3,8 +3,8 @@ Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local M = require('acf2.model')
-local object = require('acf2.object')
+local M = require('aconf.model')
+local object = require('aconf.object')
local Direction = object.class(M.String)
diff --git a/acf2/modules/demo-generic.lua b/aconf/modules/demo-generic.lua
index 254add8..4e602fa 100644
--- a/acf2/modules/demo-generic.lua
+++ b/aconf/modules/demo-generic.lua
@@ -1,11 +1,11 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-- provided as an example, to be removed from production version
-local M = require('acf2.model')
+local M = require('aconf.model')
M.register('proc', M.Mixed, {addr='/files/proc', ui_name='/proc'})
M.permission.defaults('/proc')
diff --git a/acf2/modules/network.lua b/aconf/modules/network.lua
index 77407f6..ad772ed 100644
--- a/acf2/modules/network.lua
+++ b/aconf/modules/network.lua
@@ -3,7 +3,7 @@ Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local M = require('acf2.model')
+local M = require('aconf.model')
local posix = require('posix')
diff --git a/acf2/modules/openssh.lua b/aconf/modules/openssh.lua
index 458d2d7..5ca2544 100644
--- a/acf2/modules/openssh.lua
+++ b/aconf/modules/openssh.lua
@@ -4,7 +4,7 @@ Copyright (c) 2013-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local M = require('acf2.model')
+local M = require('aconf.model')
local Sshd = M.service('sshd')
Sshd.root_login = M.Boolean{
diff --git a/acf2/object.lua b/aconf/object.lua
index 64fbb9c..64fbb9c 100644
--- a/acf2/object.lua
+++ b/aconf/object.lua
diff --git a/acf2/path.lua b/aconf/path.lua
index 431f0df..8f0bd14 100644
--- a/acf2/path.lua
+++ b/aconf/path.lua
@@ -1,11 +1,11 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
local M = {}
-local map = require('acf2.util').map
+local map = require('aconf.util').map
M.up = {}
diff --git a/acf2/persistence/backends/augeas.lua b/aconf/persistence/backends/augeas.lua
index d086ea4..a448e65 100644
--- a/acf2/persistence/backends/augeas.lua
+++ b/aconf/persistence/backends/augeas.lua
@@ -3,12 +3,12 @@ Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local topology = require('acf2.model.root').topology
-local class = require('acf2.object').class
-local pth = require('acf2.path')
-local tostr = require('acf2.persistence.util').tostring
+local topology = require('aconf.model.root').topology
+local class = require('aconf.object').class
+local pth = require('aconf.path')
+local tostr = require('aconf.persistence.util').tostring
-local util = require('acf2.util')
+local util = require('aconf.util')
local copy = util.copy
diff --git a/acf2/persistence/backends/files.lua b/aconf/persistence/backends/files.lua
index 02dcf82..e19763d 100644
--- a/acf2/persistence/backends/files.lua
+++ b/aconf/persistence/backends/files.lua
@@ -1,12 +1,12 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local topology = require('acf2.model.root').topology
-local pth = require('acf2.path')
-local util = require('acf2.persistence.util')
-local copy = require('acf2.util').copy
+local topology = require('aconf.model.root').topology
+local pth = require('aconf.path')
+local util = require('aconf.persistence.util')
+local copy = require('aconf.util').copy
local posix = require('posix')
local stringy = require('stringy')
@@ -23,7 +23,7 @@ local function get_scope(top)
end
-local backend = require('acf2.object').class()
+local backend = require('aconf.object').class()
-- TODO cache expiration
function backend:init() self.cache = {} end
diff --git a/acf2/persistence/backends/json.lua b/aconf/persistence/backends/json.lua
index 809d947..607315a 100644
--- a/acf2/persistence/backends/json.lua
+++ b/aconf/persistence/backends/json.lua
@@ -1,18 +1,18 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local pth = require('acf2.path')
-local Cache = require('acf2.persistence.backends.volatile')
-local util = require('acf2.persistence.util')
-local copy = require('acf2.util').copy
+local pth = require('aconf.path')
+local Cache = require('aconf.persistence.backends.volatile')
+local util = require('aconf.persistence.util')
+local copy = require('aconf.util').copy
local json = require('cjson')
local posix = require('posix')
-local backend = require('acf2.object').class()
+local backend = require('aconf.object').class()
function backend:init()
-- TODO cache expiration
diff --git a/acf2/persistence/backends/null.lua b/aconf/persistence/backends/null.lua
index 118f35b..770e5e8 100644
--- a/acf2/persistence/backends/null.lua
+++ b/aconf/persistence/backends/null.lua
@@ -1,9 +1,9 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local backend = require('acf2.object').class()
+local backend = require('aconf.object').class()
function backend:get(path, top) if #path == 0 then return {} end end
function backend:set(mods) end
diff --git a/acf2/persistence/backends/service.lua b/aconf/persistence/backends/service.lua
index 2163184..4569ce8 100644
--- a/acf2/persistence/backends/service.lua
+++ b/aconf/persistence/backends/service.lua
@@ -1,5 +1,5 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
@@ -7,7 +7,7 @@ local rc = require('rc')
local stringy = require('stringy')
-local backend = require('acf2.object').class()
+local backend = require('aconf.object').class()
function backend:get(path, top)
if #path == 1 then return {'enabled', 'status'} end
diff --git a/acf2/persistence/backends/volatile.lua b/aconf/persistence/backends/volatile.lua
index e33068d..7016a9b 100644
--- a/acf2/persistence/backends/volatile.lua
+++ b/aconf/persistence/backends/volatile.lua
@@ -1,12 +1,12 @@
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local util = require('acf2.util')
+local util = require('aconf.util')
-local backend = require('acf2.object').class()
+local backend = require('aconf.object').class()
function backend:init(data) self.data = data or {} end
diff --git a/acf2/persistence/defer.lua b/aconf/persistence/defer.lua
index e93f49e..5db5a21 100644
--- a/acf2/persistence/defer.lua
+++ b/aconf/persistence/defer.lua
@@ -3,14 +3,14 @@ Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local object = require('acf2.object')
+local object = require('aconf.object')
local super = object.super
-local pth = require('acf2.path')
+local pth = require('aconf.path')
local DeferringCommitter = object.class(
- require('acf2.transaction.base').Transaction
+ require('aconf.transaction.base').Transaction
)
function DeferringCommitter:init(backend)
@@ -44,4 +44,4 @@ function DeferringCommitter:commit()
end
-return DeferringCommitter(require('acf2.persistence'))
+return DeferringCommitter(require('aconf.persistence'))
diff --git a/acf2/persistence/init.lua b/aconf/persistence/init.lua
index 6f7fbf8..991776a 100644
--- a/acf2/persistence/init.lua
+++ b/aconf/persistence/init.lua
@@ -3,12 +3,12 @@ Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local loadmods = require('acf2.loader')
-local topology = require('acf2.model.root').topology
-local object = require('acf2.object')
-local pth = require('acf2.path')
+local loadmods = require('aconf.loader')
+local topology = require('aconf.model.root').topology
+local object = require('aconf.object')
+local pth = require('aconf.path')
-local util = require('acf2.util')
+local util = require('aconf.util')
local contains = util.contains
local setdefault = util.setdefault
@@ -16,7 +16,7 @@ local stringy = require('stringy')
local DataStore = object.class(
- require('acf2.transaction.base').TransactionBackend
+ require('aconf.transaction.base').TransactionBackend
)
function DataStore:init()
diff --git a/acf2/persistence/util.lua b/aconf/persistence/util.lua
index d233b1d..d233b1d 100644
--- a/acf2/persistence/util.lua
+++ b/aconf/persistence/util.lua
diff --git a/acf2/transaction/base.lua b/aconf/transaction/base.lua
index 8ca21f3..9df0bc2 100644
--- a/acf2/transaction/base.lua
+++ b/aconf/transaction/base.lua
@@ -5,13 +5,13 @@ See LICENSE file for license details
local M = {}
-local err = require('acf2.error')
+local err = require('aconf.error')
-local object = require('acf2.object')
+local object = require('aconf.object')
local class = object.class
-local pth = require('acf2.path')
-local copy = require('acf2.util').copy
+local pth = require('aconf.path')
+local copy = require('aconf.util').copy
-- TODO each transaction backend (i.e. persistence manager or
-- transaction proper) should be implemented as a thread or have its
diff --git a/acf2/transaction/init.lua b/aconf/transaction/init.lua
index 69b23fd..9e508b9 100644
--- a/acf2/transaction/init.lua
+++ b/aconf/transaction/init.lua
@@ -3,20 +3,20 @@ Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local ErrorDict = require('acf2.error').ErrorDict
-local root = require('acf2.model.root')
+local ErrorDict = require('aconf.error').ErrorDict
+local root = require('aconf.model.root')
-local object = require('acf2.object')
+local object = require('aconf.object')
local super = object.super
-local pth = require('acf2.path')
+local pth = require('aconf.path')
-local util = require('acf2.util')
+local util = require('aconf.util')
local copy = util.copy
local ModelTransaction = object.class(
- require('acf2.transaction.base').Transaction
+ require('aconf.transaction.base').Transaction
)
function ModelTransaction:init(backend, validate)
@@ -112,8 +112,8 @@ function ModelTransaction:commit()
end
-local store = require('acf2.persistence')
-local def_store = require('acf2.persistence.defer')
+local store = require('aconf.persistence')
+local def_store = require('aconf.persistence.defer')
return function(options)
options = options or {}
diff --git a/acf2/util.lua b/aconf/util.lua
index f4c47d6..d5d5d42 100644
--- a/acf2/util.lua
+++ b/aconf/util.lua
@@ -1,9 +1,9 @@
---- ACF2 utility functions.
+--- Alpine Configurator utility functions.
--
--- @module acf2.util
+-- @module aconf.util
--[[
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
diff --git a/dev-shell b/dev-shell
index dfe8db2..2935d3d 100755
--- a/dev-shell
+++ b/dev-shell
@@ -1,16 +1,16 @@
#!/bin/bash
-# Copyright (c) 2012-2013 Kaarle Ritvanen
+# Copyright (c) 2012-2014 Kaarle Ritvanen
# See LICENSE file for license details
-function _acf_req {
- local url=$ACF_URL$1
+function _aconf_req {
+ local url=$ACONF_URL$1
shift
local resp
resp=$(curl -s -w $'\n\nStatus: %{response_code}\r\n' \
- ${ACF_Auth_Token:+-H "X-ACF-Auth-Token: $ACF_Auth_Token"} \
- ${ACF_Transaction_ID:+-H "X-ACF-Transaction-ID: $ACF_Transaction_ID"} \
+ ${AConf_Auth_Token:+-H "X-AConf-Auth-Token: $AConf_Auth_Token"} \
+ ${AConf_Transaction_ID:+-H "X-AConf-Transaction-ID: $AConf_Transaction_ID"} \
"$@" $url)
local code=$?
@@ -29,32 +29,32 @@ function _acf_req {
return 1
}
-function _acf_start_req {
+function _aconf_start_req {
local url=$1
shift
local resp
- resp=$(_acf_req "$url" "$@" -D /proc/self/fd/1 -o /proc/self/fd/3)
+ resp=$(_aconf_req "$url" "$@" -D /proc/self/fd/1 -o /proc/self/fd/3)
[ $? -eq 0 ] || return
- local txn_id=$ACF_Transaction_ID
+ local txn_id=$AConf_Transaction_ID
while read line; do
eval export "$line"
done < <(echo "$resp" | \
- sed 's/^X-\(ACF-[-A-Za-z]\+\): /\1=/;ta;d;:a;y/-/_/')
+ sed 's/^X-\(AConf-[-A-Za-z]\+\): /\1=/;ta;d;:a;y/-/_/')
- bash --rcfile "$ACF_QD_CLI"
- [ $? -eq 254 ] || _acf_req $url -X DELETE
+ bash --rcfile "$ACONF_DEV_SHELL"
+ [ $? -eq 254 ] || _aconf_req $url -X DELETE
- ACF_Transaction_ID=$txn_id
+ AConf_Transaction_ID=$txn_id
}
-if [ "$ACF_Auth_Token" ]; then
+if [ "$AConf_Auth_Token" ]; then
- if [ "$ACF_Transaction_ID" ]; then
+ if [ "$AConf_Transaction_ID" ]; then
cat >&2 <<EOF
-Transaction $ACF_Transaction_ID started
+Transaction $AConf_Transaction_ID started
Type 'commit' to commit, 'exit' to abort
EOF
@@ -68,7 +68,7 @@ Available commands:
Fetch metadata: meta <path>
Start transaction: start
EOF
- if [ $ACF_Save_Required = 1 ]; then
+ if [ $AConf_Save_Required = 1 ]; then
echo " Save changes persistently: save" >&2
fi
cat >&2 <<EOF
@@ -78,55 +78,55 @@ Example: put /awall/zone/internet '{"iface": ["eth0"]}'
EOF
fi
- PS1="$ACF_USER@acf2-dev-shell${ACF_Transaction_ID:+($ACF_Transaction_ID)}> "
+ PS1="$ACONF_USER@aconf-dev-shell${AConf_Transaction_ID:+($AConf_Transaction_ID)}> "
- if [ $ACF_Save_Required = 1 ]; then
+ if [ $AConf_Save_Required = 1 ]; then
function save {
- if [ "$ACF_Transaction_ID" ]; then
+ if [ "$AConf_Transaction_ID" ]; then
echo "Transaction not committed" >&2
return 1
fi
- _acf_req /save -X POST
+ _aconf_req /save -X POST
}
fi
function start {
- _acf_start_req /transaction -X POST
+ _aconf_start_req /transaction -X POST
}
function meta {
- _acf_req "/meta$1"
+ _aconf_req "/meta$1"
}
- function _acf_obj_req {
+ function _aconf_obj_req {
local path=/config$1
shift
- _acf_req "$path" "$@"
+ _aconf_req "$path" "$@"
}
- function _acf_post_req {
- _acf_obj_req "$2" -d "$3" -X $1
+ function _aconf_post_req {
+ _aconf_obj_req "$2" -d "$3" -X $1
}
function get {
- _acf_obj_req "$1"
+ _aconf_obj_req "$1"
}
function put {
- _acf_post_req PUT "$@"
+ _aconf_post_req PUT "$@"
}
function post {
- _acf_post_req POST "$@"
+ _aconf_post_req POST "$@"
}
function delete {
- _acf_obj_req "$1" -X DELETE
+ _aconf_obj_req "$1" -X DELETE
}
function commit {
- if [ "$ACF_Transaction_ID" ]; then
- if _acf_req /transaction -X PUT; then
+ if [ "$AConf_Transaction_ID" ]; then
+ if _aconf_req /transaction -X PUT; then
echo Committed >&2
exit 254
fi
@@ -138,16 +138,16 @@ EOF
else
cat >&2 <<EOF
-Development shell for ACF2
-Copyright (c) 2012-2013 Kaarle Ritvanen
+Development shell for Alpine Configurator
+Copyright (c) 2012-2014 Kaarle Ritvanen
EOF
exec 3>&1
- export ACF_QD_CLI=$0
+ export ACONF_DEV_SHELL=$0
- export ACF_URL=http://localhost:8000
- export ACF_USER=`whoami`
+ export ACONF_URL=http://localhost:8000
+ export ACONF_USER=`whoami`
PASSWORD=
function usage {
@@ -166,7 +166,7 @@ EOF
;;
-H)
shift
- ACF_URL=$1
+ ACONF_URL=$1
;;
-p)
shift
@@ -174,7 +174,7 @@ EOF
;;
-u)
shift
- ACF_USER=$1
+ ACONF_USER=$1
;;
--)
break
@@ -188,8 +188,8 @@ EOF
echo >&2
fi
- ACF_Transaction_ID=
+ AConf_Transaction_ID=
- _acf_start_req /login \
- -d "{\"username\": \"$ACF_USER\", \"password\": \"$PASSWORD\"}"
+ _aconf_start_req /login \
+ -d "{\"username\": \"$ACONF_USER\", \"password\": \"$PASSWORD\"}"
fi
diff --git a/install-deps.sh b/install-deps.sh
index 020685a..01db51c 100755
--- a/install-deps.sh
+++ b/install-deps.sh
@@ -8,4 +8,4 @@ PACKAGES="lua5.2-augeas lua5.2-b64 lua5.2-cjson lua5.2-crypto lua5.2-file-magic
[ "$1" = -d ] && PACKAGES="$PACKAGES bash curl"
-exec apk add --virtual .acf2-deps $PACKAGES
+exec apk add --virtual .aconf-deps $PACKAGES
diff --git a/protocol.txt b/protocol.txt
index 85804b4..8853161 100644
--- a/protocol.txt
+++ b/protocol.txt
@@ -1,5 +1,5 @@
-ACF2 HTTP Protocol
-==================
+Alpine Configurator HTTP Protocol
+=================================
Load JavaScript client:
req: GET /
@@ -8,33 +8,33 @@ Log in:
req: POST /login
- body is a JSON object with username and password attributes
resp headers:
- - X-ACF-Auth-Token: authentication token, use in the header of
+ - X-AConf-Auth-Token: authentication token, use in the header of
subsequent requests
- - X-ACF-Save-Required: if set to 1, an explicit request is
+ - X-AConf-Save-Required: if set to 1, an explicit request is
required to save the changed files persistently
Log out:
req: DELETE /login
- X-ACF-Auth-Token: <token>
+ X-AConf-Auth-Token: <token>
Save configuration files persistently (lbu commit):
req: POST /save
Start transaction:
req: POST /transaction
-resp: txn ID (in header as X-ACF-Transaction-ID)
- - use X-ACF-Transaction-ID in the header of any subsequent
+resp: txn ID (in header as X-AConf-Transaction-ID)
+ - use X-AConf-Transaction-ID in the header of any subsequent
request to process it in the transaction's context
- nested transactions can be started by using it in a subsequent
start transaction request
Commit transaction:
req: PUT /transaction
- X-ACF-Transaction-ID: <txn_id>
+ X-AConf-Transaction-ID: <txn_id>
Abort transaction:
req: DELETE /transaction
- X-ACF-Transaction-ID: <txn_id>
+ X-AConf-Transaction-ID: <txn_id>
Get object:
req: GET /config/<obj_path>
diff --git a/run-server.sh b/run-server.sh
index efa51af..d7a1f68 100755
--- a/run-server.sh
+++ b/run-server.sh
@@ -10,8 +10,8 @@ if [ $(basename $0) = run-server.sh ]; then
cd $(dirname $0)
else
PORT=80
- OPTIONS="-d /var/log/acf2.log --pidfile /var/run/acf2.pid"
- cd /usr/share/acf2
+ OPTIONS="-d /var/log/aconf.log --pidfile /var/run/aconf.pid"
+ cd /usr/share/aconf
fi
exec uwsgi -M --http-socket :$PORT --close-on-exec2 \
diff --git a/server.lua b/server.lua
index 88e3556..c798852 100644
--- a/server.lua
+++ b/server.lua
@@ -3,10 +3,10 @@ Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]
-local acf = require('acf2')
-local mbin = acf.model.binary
-local mnode = acf.model.node
-local isinstance = acf.object.isinstance
+local aconf = require('aconf')
+local mbin = aconf.model.binary
+local mnode = aconf.model.node
+local isinstance = aconf.object.isinstance
local json = require('cjson')
local posix = require('posix')
@@ -45,7 +45,7 @@ return function(env)
function()
coroutine.yield(res)
posix.close(uwsgi.connection_fd())
- acf.commit()
+ aconf.commit()
end
)
end
@@ -73,13 +73,13 @@ return function(env)
local session, user, txn_id
function reset_session_expiry() session.expires = os.time() + 600 end
- local sid = tonumber(env.HTTP_X_ACF_AUTH_TOKEN)
+ local sid = tonumber(env.HTTP_X_ACONF_AUTH_TOKEN)
if sid then
session = sessions[sid]
if not session then return wrap(401) end
reset_session_expiry()
user = session.user
- txn_id = tonumber(env.HTTP_X_ACF_TRANSACTION_ID)
+ txn_id = tonumber(env.HTTP_X_ACONF_TRANSACTION_ID)
end
local parent_txn
@@ -91,7 +91,7 @@ return function(env)
end
local function new_txn(defer_validation)
- return acf.start_txn{
+ return aconf.start_txn{
allow_commit_defer=true,
defer_validation=defer_validation,
parent=parent_txn
@@ -126,8 +126,8 @@ return function(env)
return wrap(
204,
{
- ['X-ACF-Auth-Token']=sid,
- ['X-ACF-Save-Required']=save_req and 1 or 0
+ ['X-AConf-Auth-Token']=sid,
+ ['X-AConf-Save-Required']=save_req and 1 or 0
}
)
end
@@ -153,7 +153,7 @@ return function(env)
return wrap(500, nil, 'lbu commit failed')
end
- local success, code, hdr, res = acf.call(
+ local success, code, hdr, res = aconf.call(
function()
if stringy.startswith(path, '/meta/') then
if method ~= 'GET' then return 405 end
@@ -165,8 +165,8 @@ return function(env)
local parent, name, res
if path ~= '/' then
- parent = txn:fetch(acf.path.parent(path))
- name = acf.path.name(path)
+ parent = txn:fetch(aconf.path.parent(path))
+ name = aconf.path.name(path)
end
if method == 'GET' then
@@ -275,7 +275,7 @@ return function(env)
session.last_txn_id = session.last_txn_id + 1
local txn_id = session.last_txn_id
session.txns[txn_id] = new_txn()
- return 204, {['X-ACF-Transaction-ID']=txn_id}
+ return 204, {['X-AConf-Transaction-ID']=txn_id}
end
return 404
diff --git a/web/client.js b/web/client.js
index 9bbe75c..67d8e18 100644
--- a/web/client.js
+++ b/web/client.js
@@ -5,7 +5,7 @@
requirejs.config({
baseUrl: "lib",
- paths: {acf2: ".."},
+ paths: {aconf: ".."},
shim: {
underscore: {exports: "_"},
"jquery-bbq": {deps: ["jquery"]},
@@ -20,18 +20,18 @@ requirejs.config({
require(
[
- "acf2/dom",
- "acf2/error",
- "acf2/navigation",
- "acf2/path",
- "acf2/statusbar",
- "acf2/transaction",
- "acf2/type",
- "acf2/widget/inline",
+ "aconf/dom",
+ "aconf/error",
+ "aconf/navigation",
+ "aconf/path",
+ "aconf/statusbar",
+ "aconf/transaction",
+ "aconf/type",
+ "aconf/widget/inline",
"jquery",
"underscore",
- "acf2/layout/stacked",
- "acf2/layout/tabular",
+ "aconf/layout/stacked",
+ "aconf/layout/tabular",
"jquery-blockui"
],
function(
@@ -48,8 +48,8 @@ require(
}).done(function(data, status, xhr) {
txnMgr = txnMgr(
- xhr.getResponseHeader("X-ACF-Auth-Token"),
- xhr.getResponseHeader("X-ACF-Save-Required") == "1"
+ xhr.getResponseHeader("X-AConf-Auth-Token"),
+ xhr.getResponseHeader("X-AConf-Save-Required") == "1"
);
@@ -62,7 +62,7 @@ require(
var layout = data.meta.widget;
var name = pth.split(path).pop();
(layout ?
- require("acf2/layout/" + layout) :
+ require("aconf/layout/" + layout) :
Inline).extend({
createEl: function() {
return $("#content").empty();
diff --git a/web/dom.js b/web/dom.js
index 5c8fb8e..ee1931f 100644
--- a/web/dom.js
+++ b/web/dom.js
@@ -3,7 +3,7 @@
* See LICENSE file for license details
*/
-define(["acf2/navigation", "jquery", "underscore"], function(navi, $, _) {
+define(["aconf/navigation", "jquery", "underscore"], function(navi, $, _) {
function href() {
return $("<a>").attr({href: "javascript:void(0);"});
}
diff --git a/web/layout/stacked.js b/web/layout/stacked.js
index ecebbd8..acff8a6 100644
--- a/web/layout/stacked.js
+++ b/web/layout/stacked.js
@@ -3,7 +3,7 @@
* See LICENSE file for license details
*/
-define(["acf2/type", "acf2/widget/inline"], function(type, Base) {
+define(["aconf/type", "aconf/widget/inline"], function(type, Base) {
return Base.extend({
widget: function(meta) {
return type.isTreeNode(meta) ? Base : Base.widget.call(this, meta);
diff --git a/web/layout/tabular.js b/web/layout/tabular.js
index 084d85c..db849e8 100644
--- a/web/layout/tabular.js
+++ b/web/layout/tabular.js
@@ -5,10 +5,10 @@
define(
[
- "acf2/type",
- "acf2/widget/inline",
- "acf2/widget/table/header",
- "acf2/widget/table/row"
+ "aconf/type",
+ "aconf/widget/inline",
+ "aconf/widget/table/header",
+ "aconf/widget/table/row"
],
function(type, Base, TableHeader, TableRow) {
return Base.extend({
diff --git a/web/statusbar.js b/web/statusbar.js
index 28e5ba4..69ff6be 100644
--- a/web/statusbar.js
+++ b/web/statusbar.js
@@ -3,7 +3,7 @@
* See LICENSE file for license details
*/
-define(["acf2/dom", "jquery"], function(dom, $) {
+define(["aconf/dom", "jquery"], function(dom, $) {
function set(status, msg, mode) {
$("#status").prop("class", status);
dom.setText($("#status p"), msg);
diff --git a/web/transaction.js b/web/transaction.js
index a850488..c843b34 100644
--- a/web/transaction.js
+++ b/web/transaction.js
@@ -4,7 +4,7 @@
*/
define(
- ["acf2/path", "acf2/type", "jquery", "underscore", "jquery-blockui"],
+ ["aconf/path", "aconf/type", "jquery", "underscore", "jquery-blockui"],
function(pth, type, $, _) {
return function(token, saveRequired) {
var txnMgr = {};
@@ -22,8 +22,8 @@ define(
function request(url, options) {
options = options || {};
- options.headers = {"X-ACF-Auth-Token": token};
- if (txn) options.headers["X-ACF-Transaction-ID"] = txn;
+ options.headers = {"X-AConf-Auth-Token": token};
+ if (txn) options.headers["X-AConf-Transaction-ID"] = txn;
if (options.data != undefined)
options.data = JSON.stringify(options.data);
return $.ajax(encodeURI(url), options);
@@ -384,7 +384,7 @@ define(
else request("/transaction", {type: "POST"})
.done(function(data, status, xhr) {
- txn = xhr.getResponseHeader("X-ACF-Transaction-ID");
+ txn = xhr.getResponseHeader("X-AConf-Transaction-ID");
def.resolve();
})
.fail(function() { def.reject(); });
diff --git a/web/widget/abstract/base.js b/web/widget/abstract/base.js
index 7bbe711..58a1932 100644
--- a/web/widget/abstract/base.js
+++ b/web/widget/abstract/base.js
@@ -3,7 +3,7 @@
* See LICENSE file for license details
*/
-define(["acf2/dom", "jquery", "underscore"], function(dom, $, _) {
+define(["aconf/dom", "jquery", "underscore"], function(dom, $, _) {
return {
extend: function(spec) {
var res = Object.create(this);
diff --git a/web/widget/abstract/fields.js b/web/widget/abstract/fields.js
index 360364d..689f88a 100644
--- a/web/widget/abstract/fields.js
+++ b/web/widget/abstract/fields.js
@@ -5,17 +5,17 @@
define(
[
- "acf2/widget/abstract/node",
+ "aconf/widget/abstract/node",
"jquery",
"underscore",
- "acf2/widget/audio",
- "acf2/widget/checkbox",
- "acf2/widget/checkboxes",
- "acf2/widget/combobox",
- "acf2/widget/date",
- "acf2/widget/field",
- "acf2/widget/inline",
- "acf2/widget/reference"
+ "aconf/widget/audio",
+ "aconf/widget/checkbox",
+ "aconf/widget/checkboxes",
+ "aconf/widget/combobox",
+ "aconf/widget/date",
+ "aconf/widget/field",
+ "aconf/widget/inline",
+ "aconf/widget/reference"
],
function(Base, $, _) {
return Base.extend({
@@ -115,7 +115,7 @@ define(
},
widget: function(meta) {
- return require("acf2/widget/" + meta.widget);
+ return require("aconf/widget/" + meta.widget);
},
validate: function(data) {
diff --git a/web/widget/abstract/inline.js b/web/widget/abstract/inline.js
index dae1797..dedde36 100644
--- a/web/widget/abstract/inline.js
+++ b/web/widget/abstract/inline.js
@@ -4,7 +4,7 @@
*/
define(
- ["acf2/statusbar", "acf2/widget/link", "jquery", "underscore"],
+ ["aconf/statusbar", "aconf/widget/link", "jquery", "underscore"],
function(statusBar, Base, $, _) {
return Base.extend({
init: function(
diff --git a/web/widget/abstract/node.js b/web/widget/abstract/node.js
index 2ec95e2..22c35fa 100644
--- a/web/widget/abstract/node.js
+++ b/web/widget/abstract/node.js
@@ -4,7 +4,7 @@
*/
define(
- ["acf2/statusbar", "acf2/widget/abstract/inline", "jquery", "underscore"],
+ ["aconf/statusbar", "aconf/widget/abstract/inline", "jquery", "underscore"],
function(statusBar, Base, $, _) {
return Base.extend({
init: function(
diff --git a/web/widget/audio.js b/web/widget/audio.js
index 184fd5e..99e410d 100644
--- a/web/widget/audio.js
+++ b/web/widget/audio.js
@@ -4,7 +4,7 @@
*/
define(
- ["acf2/dom", "acf2/widget/abstract/inline", "jquery", "underscore"],
+ ["aconf/dom", "aconf/widget/abstract/inline", "jquery", "underscore"],
function(dom, Base, $, _) {
return Base.extend({
render: function(value, meta) {
diff --git a/web/widget/checkbox.js b/web/widget/checkbox.js
index 543433c..b31f29a 100644
--- a/web/widget/checkbox.js
+++ b/web/widget/checkbox.js
@@ -3,7 +3,7 @@
* See LICENSE file for license details
*/
-define(["acf2/widget/field", "jquery"], function(Base, $) {
+define(["aconf/widget/field", "jquery"], function(Base, $) {
return Base.extend({
staticRender: function(value, meta) {
return $("<td>").text(value ? "Yes" : "No");
diff --git a/web/widget/checkboxes.js b/web/widget/checkboxes.js
index 2252aa4..b8f062c 100644
--- a/web/widget/checkboxes.js
+++ b/web/widget/checkboxes.js
@@ -5,9 +5,9 @@
define(
[
- "acf2/dom",
- "acf2/statusbar",
- "acf2/widget/abstract/node",
+ "aconf/dom",
+ "aconf/statusbar",
+ "aconf/widget/abstract/node",
"jquery",
"underscore"
],
diff --git a/web/widget/combobox.js b/web/widget/combobox.js
index 6d9c16e..e093cdd 100644
--- a/web/widget/combobox.js
+++ b/web/widget/combobox.js
@@ -3,7 +3,7 @@
* See LICENSE file for license details
*/
-define(["acf2/widget/field", "jquery", "underscore"], function(Base, $, _) {
+define(["aconf/widget/field", "jquery", "underscore"], function(Base, $, _) {
return Base.extend({
createEl: function() { return $("<select>"); },
diff --git a/web/widget/date.js b/web/widget/date.js
index 0f97e08..23c8fe0 100644
--- a/web/widget/date.js
+++ b/web/widget/date.js
@@ -3,7 +3,7 @@
* See LICENSE file for license details
*/
-define(["acf2/widget/field", "jquery-ui/datepicker"], function(Base) {
+define(["aconf/widget/field", "jquery-ui/datepicker"], function(Base) {
return Base.extend({
createEl: function() {
return Base.createEl.call(this)
diff --git a/web/widget/field.js b/web/widget/field.js
index b0c6034..2c6f865 100644
--- a/web/widget/field.js
+++ b/web/widget/field.js
@@ -5,10 +5,10 @@
define(
[
- "acf2/dom",
- "acf2/error",
- "acf2/statusbar",
- "acf2/widget/abstract/base",
+ "aconf/dom",
+ "aconf/error",
+ "aconf/statusbar",
+ "aconf/widget/abstract/base",
"jquery",
"underscore"
],
diff --git a/web/widget/inline.js b/web/widget/inline.js
index d9259ec..01e36c0 100644
--- a/web/widget/inline.js
+++ b/web/widget/inline.js
@@ -5,10 +5,10 @@
define(
[
- "acf2/dom",
- "acf2/statusbar",
- "acf2/type",
- "acf2/widget/abstract/fields",
+ "aconf/dom",
+ "aconf/statusbar",
+ "aconf/type",
+ "aconf/widget/abstract/fields",
"jquery",
"underscore",
"jquery-ui/sortable"
diff --git a/web/widget/link.js b/web/widget/link.js
index f6539c6..f2094a8 100644
--- a/web/widget/link.js
+++ b/web/widget/link.js
@@ -4,7 +4,7 @@
*/
define(
- ["acf2/dom", "acf2/widget/abstract/base", "jquery"],
+ ["aconf/dom", "aconf/widget/abstract/base", "jquery"],
function(dom, Base, $) {
return Base.extend({
staticRender: function(value, meta) {
diff --git a/web/widget/reference.js b/web/widget/reference.js
index 7e0f79d..7c5a143 100644
--- a/web/widget/reference.js
+++ b/web/widget/reference.js
@@ -4,7 +4,7 @@
*/
define(
- ["acf2/dom", "acf2/widget/combobox", "jquery", "underscore"],
+ ["aconf/dom", "aconf/widget/combobox", "jquery", "underscore"],
function(dom, Base, $, _) {
return Base.extend({
init: function(
diff --git a/web/widget/table/header.js b/web/widget/table/header.js
index 5a0ac6f..e6683c1 100644
--- a/web/widget/table/header.js
+++ b/web/widget/table/header.js
@@ -3,7 +3,7 @@
* See LICENSE file for license details
*/
-define(["acf2/widget/table/row", "jquery"], function(Base, $) {
+define(["aconf/widget/table/row", "jquery"], function(Base, $) {
return Base.extend({
init: function(
data, name, meta, level, editable, removable
diff --git a/web/widget/table/row.js b/web/widget/table/row.js
index 49cf296..24e0e50 100644
--- a/web/widget/table/row.js
+++ b/web/widget/table/row.js
@@ -4,7 +4,7 @@
*/
define(
- ["acf2/dom", "acf2/widget/abstract/fields", "jquery", "underscore"],
+ ["aconf/dom", "aconf/widget/abstract/fields", "jquery", "underscore"],
function(dom, Base, $, _) {
return Base.extend({
createEl: function() {