fluentd-ui 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fluentd-ui might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ChangeLog +6 -0
- data/Gemfile.lock +66 -67
- data/app/controllers/concerns/setting_concern.rb +15 -0
- data/app/controllers/fluentd/settings/in_syslog_controller.rb +0 -7
- data/app/controllers/fluentd/settings/out_elasticsearch_controller.rb +0 -12
- data/app/controllers/fluentd/settings/out_forward_controller.rb +0 -10
- data/app/controllers/fluentd/settings/out_mongo_controller.rb +0 -9
- data/app/controllers/fluentd/settings/out_s3_controller.rb +4 -26
- data/app/models/fluentd/setting/in_syslog.rb +17 -0
- data/app/models/fluentd/setting/out_elasticsearch.rb +26 -0
- data/app/models/fluentd/setting/out_forward.rb +23 -0
- data/app/models/fluentd/setting/out_mongo.rb +23 -0
- data/app/models/fluentd/setting/out_s3.rb +25 -0
- data/app/models/fluentd/setting/out_td.rb +21 -0
- data/app/views/shared/settings/_form.html.haml +17 -0
- data/app/views/shared/settings/show.html.haml +6 -0
- data/fluentd-ui.gemspec +2 -2
- data/lib/fluentd-ui/version.rb +1 -1
- data/lib/tasks/dep.rake +59 -0
- data/vendor/assets/javascripts/bower/vue/.bower.json +4 -4
- data/vendor/assets/javascripts/bower/vue/dist/vue.js +102 -43
- data/vendor/assets/javascripts/bower/vue/dist/vue.min.js +3 -3
- data/vendor/assets/javascripts/bower/vue/src/directives/on.js +3 -1
- data/vendor/assets/javascripts/bower/vue/src/directives/style.js +12 -6
- data/vendor/assets/javascripts/bower/vue/src/filters.js +1 -0
- data/vendor/assets/javascripts/bower/vue/src/fragment.js +4 -21
- data/vendor/assets/javascripts/bower/vue/src/main.js +11 -9
- data/vendor/assets/javascripts/bower/vue/src/template-parser.js +46 -0
- data/vendor/assets/javascripts/bower/vue/src/utils.js +7 -2
- data/vendor/assets/javascripts/bower/vue/src/viewmodel.js +14 -4
- metadata +12 -21
- data/app/views/fluentd/settings/in_syslog/_form.html.haml +0 -9
- data/app/views/fluentd/settings/in_syslog/show.html.haml +0 -6
- data/app/views/fluentd/settings/out_elasticsearch/_form.html.haml +0 -23
- data/app/views/fluentd/settings/out_elasticsearch/show.html.haml +0 -6
- data/app/views/fluentd/settings/out_forward/_form.html.haml +0 -22
- data/app/views/fluentd/settings/out_forward/show.html.haml +0 -6
- data/app/views/fluentd/settings/out_mongo/_form.html.haml +0 -30
- data/app/views/fluentd/settings/out_mongo/finish.html.haml +0 -4
- data/app/views/fluentd/settings/out_mongo/show.html.haml +0 -6
- data/app/views/fluentd/settings/out_s3/_form.html.haml +0 -39
- data/app/views/fluentd/settings/out_s3/show.html.haml +0 -6
- data/app/views/fluentd/settings/out_td/_form.html.haml +0 -18
- data/app/views/fluentd/settings/out_td/show.html.haml +0 -6
@@ -65,6 +65,29 @@ class Fluentd
|
|
65
65
|
result
|
66
66
|
end
|
67
67
|
end
|
68
|
+
|
69
|
+
def self.initial_params
|
70
|
+
{
|
71
|
+
secondary: {
|
72
|
+
"0" => {
|
73
|
+
type: "file",
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
def common_options
|
80
|
+
[
|
81
|
+
:match, :server, :secondary,
|
82
|
+
]
|
83
|
+
end
|
84
|
+
|
85
|
+
def advanced_options
|
86
|
+
[
|
87
|
+
:send_timeout, :recover_wait, :heartbeat_type, :heartbeat_interval,
|
88
|
+
:phi_threshold, :hard_timeout,
|
89
|
+
]
|
90
|
+
end
|
68
91
|
end
|
69
92
|
end
|
70
93
|
end
|
@@ -30,6 +30,29 @@ class Fluentd
|
|
30
30
|
errors.add(:collection, :blank)
|
31
31
|
end
|
32
32
|
end
|
33
|
+
|
34
|
+
def self.initial_params
|
35
|
+
{
|
36
|
+
host: "127.0.0.1",
|
37
|
+
port: 27017,
|
38
|
+
capped: true,
|
39
|
+
capped_size: "100m",
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
def common_options
|
44
|
+
[
|
45
|
+
:match, :host, :port, :database, :collection,
|
46
|
+
:tag_mapped, :user, :password,
|
47
|
+
]
|
48
|
+
end
|
49
|
+
|
50
|
+
def advanced_options
|
51
|
+
[
|
52
|
+
:capped, :capped_size, :capped_max, :buffer_type, :buffer_queue_limit, :buffer_chunk_limit,
|
53
|
+
:flush_interval, :retry_wait, :retry_limit, :max_retry_wait, :num_threads,
|
54
|
+
]
|
55
|
+
end
|
33
56
|
end
|
34
57
|
end
|
35
58
|
end
|
@@ -24,6 +24,31 @@ class Fluentd
|
|
24
24
|
|
25
25
|
validates :match, presence: true
|
26
26
|
validates :s3_bucket, presence: true
|
27
|
+
|
28
|
+
def self.initial_params
|
29
|
+
{
|
30
|
+
s3_endpoint: "s3-us-west-1.amazonaws.com",
|
31
|
+
output_tag: true,
|
32
|
+
output_time: true,
|
33
|
+
use_ssl: true,
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
def common_options
|
38
|
+
[
|
39
|
+
:match, :aws_key_id, :aws_sec_key,
|
40
|
+
:s3_endpoint, :s3_bucket, :use_ssl, :path,
|
41
|
+
]
|
42
|
+
end
|
43
|
+
|
44
|
+
def advanced_options
|
45
|
+
[
|
46
|
+
:format, :output_tag, :output_time, :include_time_key, :time_key, :delimiter, :label_delimiter,
|
47
|
+
:utc, :time_slice_format, :time_slice_wait, :store_as, :proxy_uri,
|
48
|
+
:buffer_type, :buffer_queue_limit, :buffer_chunk_limit, :flush_interval,
|
49
|
+
:retry_wait, :retry_limit, :max_retry_wait, :num_threads,
|
50
|
+
]
|
51
|
+
end
|
27
52
|
end
|
28
53
|
end
|
29
54
|
end
|
@@ -21,6 +21,27 @@ class Fluentd
|
|
21
21
|
def plugin_name
|
22
22
|
"tdlog"
|
23
23
|
end
|
24
|
+
|
25
|
+
def self.initial_params
|
26
|
+
{
|
27
|
+
buffer_type: "file",
|
28
|
+
buffer_path: "/var/log/td-agent/buffer/td",
|
29
|
+
auto_create_table: true,
|
30
|
+
match: "td.*.*",
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
def common_options
|
35
|
+
[
|
36
|
+
:match, :apikey, :auto_create_table, :database, :table,
|
37
|
+
]
|
38
|
+
end
|
39
|
+
|
40
|
+
def advanced_options
|
41
|
+
[
|
42
|
+
:flush_interval, :buffer_type, :buffer_path,
|
43
|
+
]
|
44
|
+
end
|
24
45
|
end
|
25
46
|
end
|
26
47
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
= render "shared/setting_errors"
|
2
|
+
|
3
|
+
- # NOTE: plugin_setting_form_action_url is defined at SettingConcern
|
4
|
+
= form_for(@setting, url: plugin_setting_form_action_url(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
|
5
|
+
- @setting.common_options.each do |key|
|
6
|
+
= field(f, key)
|
7
|
+
|
8
|
+
- if @setting.advanced_options.present?
|
9
|
+
.well.well-sm
|
10
|
+
%h4{"data-toggle" => "collapse", "href" => "#advanced-setting"}
|
11
|
+
= icon('fa-caret-down')
|
12
|
+
= t('terms.advanced_setting')
|
13
|
+
#advanced-setting.collapse
|
14
|
+
- @setting.advanced_options.each do |key|
|
15
|
+
= field(f, key)
|
16
|
+
= f.submit t('fluentd.common.finish'), class: "btn btn-lg btn-primary pull-right"
|
17
|
+
|
data/fluentd-ui.gemspec
CHANGED
@@ -24,8 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
|
27
|
-
spec.add_dependency "fluentd", "~> 0.10.
|
28
|
-
spec.add_dependency 'rails', '4.1.
|
27
|
+
spec.add_dependency "fluentd", "~> 0.10.56"
|
28
|
+
spec.add_dependency 'rails', '~> 4.1.7'
|
29
29
|
spec.add_dependency 'sucker_punch', "~> 1.0.5"
|
30
30
|
spec.add_dependency 'addressable'
|
31
31
|
spec.add_dependency "font-awesome-rails"
|
data/lib/fluentd-ui/version.rb
CHANGED
data/lib/tasks/dep.rake
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
namespace :dep do
|
2
|
+
desc "list dependency gems order by less referenced"
|
3
|
+
task :list do
|
4
|
+
require "set"
|
5
|
+
deps = Set.new
|
6
|
+
context = false
|
7
|
+
current_parent = false
|
8
|
+
versions = {
|
9
|
+
"bundler" => "1.7.4" # bundler version does not appear in Gemfile.lock
|
10
|
+
}
|
11
|
+
skip_gems = %w(fluentd)
|
12
|
+
lock_file = "Gemfile.production.lock"
|
13
|
+
unless ENV["SKIP_BUNDLE_INSTALL"]
|
14
|
+
system("bundle install --gemfile Gemfile.production", out: STDERR) # ensure lock file is up to date
|
15
|
+
end
|
16
|
+
|
17
|
+
File.open(lock_file).each_line do |line|
|
18
|
+
# GEM
|
19
|
+
# remote: https://rubygems.org/
|
20
|
+
# specs:
|
21
|
+
# foo_gem (0.1.2)
|
22
|
+
# foo_dep1 (>= 1.0.0)
|
23
|
+
# foo_dep2
|
24
|
+
# bar_gem (1.2.1)
|
25
|
+
# bar_dep1
|
26
|
+
# ...
|
27
|
+
# ...
|
28
|
+
if line == " specs:\n"
|
29
|
+
context = true
|
30
|
+
next
|
31
|
+
end
|
32
|
+
gem_name = line[/[^ \n]+/, 0] # " foo_gem (0.1.2)\n" => "foo_gem"
|
33
|
+
if line.match(/^ {4}[^ ]/) # " foo_gem (0.1.2)"
|
34
|
+
if skip_gems.include?(gem_name)
|
35
|
+
current_parent = nil
|
36
|
+
next
|
37
|
+
end
|
38
|
+
current_parent = gem_name
|
39
|
+
versions[current_parent] = line[/\((.*?)\)/, 1] # foobar (1.2.3) => 1.2.3
|
40
|
+
next
|
41
|
+
elsif line.match(/^ {6}[^ ]/) # " foo_dep1 (>= 1.0.0)"
|
42
|
+
next if skip_gems.include?(gem_name)
|
43
|
+
next if current_parent.blank?
|
44
|
+
deps.add([current_parent, gem_name])
|
45
|
+
else
|
46
|
+
context = false
|
47
|
+
end
|
48
|
+
end
|
49
|
+
rank = {}
|
50
|
+
deps.to_a.each do |(parent, child)|
|
51
|
+
rank[parent] ||= 0
|
52
|
+
rank[child] ||= 0
|
53
|
+
rank[parent] += 1
|
54
|
+
end
|
55
|
+
rank.to_a.sort_by {|(name, score)| score }.each do |(name, score)|
|
56
|
+
puts %Q|download "#{name}", "#{versions[name]}"|
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vue",
|
3
|
-
"version": "0.10.
|
3
|
+
"version": "0.10.6",
|
4
4
|
"main": "dist/vue.js",
|
5
5
|
"description": "Simple, Fast & Composable MVVM for building interative interfaces",
|
6
6
|
"authors": [
|
@@ -17,11 +17,11 @@
|
|
17
17
|
"*.md"
|
18
18
|
],
|
19
19
|
"homepage": "https://github.com/yyx990803/vue",
|
20
|
-
"_release": "0.10.
|
20
|
+
"_release": "0.10.6",
|
21
21
|
"_resolution": {
|
22
22
|
"type": "version",
|
23
|
-
"tag": "v0.10.
|
24
|
-
"commit": "
|
23
|
+
"tag": "v0.10.6",
|
24
|
+
"commit": "cf37f7efd6d63c0aa46b50c624816e645ddd7edd"
|
25
25
|
},
|
26
26
|
"_source": "git://github.com/yyx990803/vue.git",
|
27
27
|
"_target": "~0.10.0",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
Vue.js v0.10.
|
2
|
+
Vue.js v0.10.6
|
3
3
|
(c) 2014 Evan You
|
4
4
|
License: MIT
|
5
5
|
*/
|
@@ -213,12 +213,14 @@ var config = require('./config'),
|
|
213
213
|
ViewModel = require('./viewmodel'),
|
214
214
|
utils = require('./utils'),
|
215
215
|
makeHash = utils.hash,
|
216
|
-
assetTypes = ['directive', 'filter', 'partial', 'effect', 'component']
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
require('./transition')
|
216
|
+
assetTypes = ['directive', 'filter', 'partial', 'effect', 'component'],
|
217
|
+
// Internal modules that are exposed for plugins
|
218
|
+
pluginAPI = {
|
219
|
+
utils: utils,
|
220
|
+
config: config,
|
221
|
+
transition: require('./transition'),
|
222
|
+
observer: require('./observer')
|
223
|
+
}
|
222
224
|
|
223
225
|
ViewModel.options = config.globalAssets = {
|
224
226
|
directives : require('./directives'),
|
@@ -239,7 +241,7 @@ assetTypes.forEach(function (type) {
|
|
239
241
|
}
|
240
242
|
if (!value) return hash[id]
|
241
243
|
if (type === 'partial') {
|
242
|
-
value = utils.
|
244
|
+
value = utils.parseTemplateOption(value)
|
243
245
|
} else if (type === 'component') {
|
244
246
|
value = utils.toConstructor(value)
|
245
247
|
} else if (type === 'filter') {
|
@@ -294,8 +296,8 @@ ViewModel.use = function (plugin) {
|
|
294
296
|
/**
|
295
297
|
* Expose internal modules for plugins
|
296
298
|
*/
|
297
|
-
ViewModel.require = function (
|
298
|
-
return
|
299
|
+
ViewModel.require = function (module) {
|
300
|
+
return pluginAPI[module]
|
299
301
|
}
|
300
302
|
|
301
303
|
ViewModel.extend = extend
|
@@ -551,6 +553,11 @@ var utils = module.exports = {
|
|
551
553
|
*/
|
552
554
|
toFragment: require('./fragment'),
|
553
555
|
|
556
|
+
/**
|
557
|
+
* Parse the various types of template options
|
558
|
+
*/
|
559
|
+
parseTemplateOption: require('./template-parser.js'),
|
560
|
+
|
554
561
|
/**
|
555
562
|
* get a value from an object keypath
|
556
563
|
*/
|
@@ -745,7 +752,7 @@ var utils = module.exports = {
|
|
745
752
|
}
|
746
753
|
if (partials) {
|
747
754
|
for (key in partials) {
|
748
|
-
partials[key] = utils.
|
755
|
+
partials[key] = utils.parseTemplateOption(partials[key])
|
749
756
|
}
|
750
757
|
}
|
751
758
|
if (filters) {
|
@@ -754,7 +761,7 @@ var utils = module.exports = {
|
|
754
761
|
}
|
755
762
|
}
|
756
763
|
if (template) {
|
757
|
-
options.template = utils.
|
764
|
+
options.template = utils.parseTemplateOption(template)
|
758
765
|
}
|
759
766
|
},
|
760
767
|
|
@@ -872,29 +879,12 @@ map.rect = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">','</svg>'
|
|
872
879
|
|
873
880
|
var TAG_RE = /<([\w:]+)/
|
874
881
|
|
875
|
-
module.exports = function (
|
876
|
-
|
877
|
-
if (typeof template !== 'string') {
|
878
|
-
return template
|
879
|
-
}
|
880
|
-
|
881
|
-
// template by ID
|
882
|
-
if (template.charAt(0) === '#') {
|
883
|
-
var templateNode = document.getElementById(template.slice(1))
|
884
|
-
if (!templateNode) return
|
885
|
-
// if its a template tag and the browser supports it,
|
886
|
-
// its content is already a document fragment!
|
887
|
-
if (templateNode.tagName === 'TEMPLATE' && templateNode.content) {
|
888
|
-
return templateNode.content
|
889
|
-
}
|
890
|
-
template = templateNode.innerHTML
|
891
|
-
}
|
892
|
-
|
882
|
+
module.exports = function (templateString) {
|
893
883
|
var frag = document.createDocumentFragment(),
|
894
|
-
m = TAG_RE.exec(
|
884
|
+
m = TAG_RE.exec(templateString)
|
895
885
|
// text only
|
896
886
|
if (!m) {
|
897
|
-
frag.appendChild(document.createTextNode(
|
887
|
+
frag.appendChild(document.createTextNode(templateString))
|
898
888
|
return frag
|
899
889
|
}
|
900
890
|
|
@@ -905,7 +895,7 @@ module.exports = function (template) {
|
|
905
895
|
suffix = wrap[2],
|
906
896
|
node = document.createElement('div')
|
907
897
|
|
908
|
-
node.innerHTML = prefix +
|
898
|
+
node.innerHTML = prefix + templateString.trim() + suffix
|
909
899
|
while (depth--) node = node.lastChild
|
910
900
|
|
911
901
|
// one element
|
@@ -1983,7 +1973,8 @@ var Compiler = require('./compiler'),
|
|
1983
1973
|
* and a few reserved methods
|
1984
1974
|
*/
|
1985
1975
|
function ViewModel (options) {
|
1986
|
-
//
|
1976
|
+
// compile if options passed, if false return. options are passed directly to compiler
|
1977
|
+
if (options === false) return
|
1987
1978
|
new Compiler(this, options)
|
1988
1979
|
}
|
1989
1980
|
|
@@ -1991,6 +1982,15 @@ function ViewModel (options) {
|
|
1991
1982
|
// so it can be stringified/looped through as raw data
|
1992
1983
|
var VMProto = ViewModel.prototype
|
1993
1984
|
|
1985
|
+
/**
|
1986
|
+
* init allows config compilation after instantiation:
|
1987
|
+
* var a = new Vue(false)
|
1988
|
+
* a.init(config)
|
1989
|
+
*/
|
1990
|
+
def(VMProto, '$init', function (options) {
|
1991
|
+
new Compiler(this, options)
|
1992
|
+
})
|
1993
|
+
|
1994
1994
|
/**
|
1995
1995
|
* Convenience function to get a value from
|
1996
1996
|
* a keypath
|
@@ -2048,8 +2048,8 @@ def(VMProto, '$unwatch', function (key, callback) {
|
|
2048
2048
|
/**
|
2049
2049
|
* unbind everything, remove everything
|
2050
2050
|
*/
|
2051
|
-
def(VMProto, '$destroy', function () {
|
2052
|
-
this.$compiler.destroy()
|
2051
|
+
def(VMProto, '$destroy', function (noRemove) {
|
2052
|
+
this.$compiler.destroy(noRemove)
|
2053
2053
|
})
|
2054
2054
|
|
2055
2055
|
/**
|
@@ -2145,6 +2145,7 @@ function query (el) {
|
|
2145
2145
|
}
|
2146
2146
|
|
2147
2147
|
module.exports = ViewModel
|
2148
|
+
|
2148
2149
|
});
|
2149
2150
|
require.register("vue/src/binding.js", function(exports, require, module){
|
2150
2151
|
var Batcher = require('./batcher'),
|
@@ -3150,6 +3151,55 @@ exports.eval = function (exp, compiler, data) {
|
|
3150
3151
|
}
|
3151
3152
|
return res
|
3152
3153
|
}
|
3154
|
+
});
|
3155
|
+
require.register("vue/src/template-parser.js", function(exports, require, module){
|
3156
|
+
var toFragment = require('./fragment');
|
3157
|
+
|
3158
|
+
/**
|
3159
|
+
* Parses a template string or node and normalizes it into a
|
3160
|
+
* a node that can be used as a partial of a template option
|
3161
|
+
*
|
3162
|
+
* Possible values include
|
3163
|
+
* id selector: '#some-template-id'
|
3164
|
+
* template string: '<div><span>my template</span></div>'
|
3165
|
+
* DocumentFragment object
|
3166
|
+
* Node object of type Template
|
3167
|
+
*/
|
3168
|
+
module.exports = function(template) {
|
3169
|
+
var templateNode;
|
3170
|
+
|
3171
|
+
if (template instanceof window.DocumentFragment) {
|
3172
|
+
// if the template is already a document fragment -- do nothing
|
3173
|
+
return template
|
3174
|
+
}
|
3175
|
+
|
3176
|
+
if (typeof template === 'string') {
|
3177
|
+
// template by ID
|
3178
|
+
if (template.charAt(0) === '#') {
|
3179
|
+
templateNode = document.getElementById(template.slice(1))
|
3180
|
+
if (!templateNode) return
|
3181
|
+
} else {
|
3182
|
+
return toFragment(template)
|
3183
|
+
}
|
3184
|
+
} else if (template.nodeType) {
|
3185
|
+
templateNode = template
|
3186
|
+
} else {
|
3187
|
+
return
|
3188
|
+
}
|
3189
|
+
|
3190
|
+
// if its a template tag and the browser supports it,
|
3191
|
+
// its content is already a document fragment!
|
3192
|
+
if (templateNode.tagName === 'TEMPLATE' && templateNode.content) {
|
3193
|
+
return templateNode.content
|
3194
|
+
}
|
3195
|
+
|
3196
|
+
if (templateNode.tagName === 'SCRIPT') {
|
3197
|
+
return toFragment(templateNode.innerHTML)
|
3198
|
+
}
|
3199
|
+
|
3200
|
+
return toFragment(templateNode.outerHTML);
|
3201
|
+
}
|
3202
|
+
|
3153
3203
|
});
|
3154
3204
|
require.register("vue/src/text-parser.js", function(exports, require, module){
|
3155
3205
|
var openChar = '{',
|
@@ -3354,6 +3404,7 @@ filters.lowercase = function (value) {
|
|
3354
3404
|
* 12345 => $12,345.00
|
3355
3405
|
*/
|
3356
3406
|
filters.currency = function (value, sign) {
|
3407
|
+
value = parseFloat(value)
|
3357
3408
|
if (!value && value !== 0) return ''
|
3358
3409
|
sign = sign || '$'
|
3359
3410
|
var s = Math.floor(value).toString(),
|
@@ -4271,7 +4322,9 @@ module.exports = {
|
|
4271
4322
|
var el = this.iframeBind
|
4272
4323
|
? this.el.contentWindow
|
4273
4324
|
: this.el
|
4274
|
-
|
4325
|
+
if (this.handler) {
|
4326
|
+
el.removeEventListener(this.arg, this.handler)
|
4327
|
+
}
|
4275
4328
|
},
|
4276
4329
|
|
4277
4330
|
unbind: function () {
|
@@ -4571,13 +4624,19 @@ module.exports = {
|
|
4571
4624
|
},
|
4572
4625
|
|
4573
4626
|
update: function (value) {
|
4574
|
-
var prop = this.prop
|
4627
|
+
var prop = this.prop,
|
4628
|
+
isImportant
|
4629
|
+
/* jshint eqeqeq: true */
|
4630
|
+
// cast possible numbers/booleans into strings
|
4631
|
+
if (value != null) value += ''
|
4575
4632
|
if (prop) {
|
4576
|
-
|
4577
|
-
|
4578
|
-
|
4579
|
-
|
4580
|
-
|
4633
|
+
if (value) {
|
4634
|
+
isImportant = value.slice(-10) === '!important'
|
4635
|
+
? 'important'
|
4636
|
+
: ''
|
4637
|
+
if (isImportant) {
|
4638
|
+
value = value.slice(0, -10).trim()
|
4639
|
+
}
|
4581
4640
|
}
|
4582
4641
|
this.el.style.setProperty(prop, value, isImportant)
|
4583
4642
|
if (this.prefixed) {
|