You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/09/07 11:29:11 UTC
[whimsy] 03/05: switch to computed values
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch roster_on_vue
in repository https://gitbox.apache.org/repos/asf/whimsy.git
commit d3fa933b2a351d4af9e7ced2bee6f2dfc83193dd
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Thu Sep 7 07:09:27 2017 -0400
switch to computed values
---
www/roster/views/pmc/committers.js.rb | 10 +++++-----
www/roster/views/pmc/pmc.js.rb | 19 +++++--------------
2 files changed, 10 insertions(+), 19 deletions(-)
diff --git a/www/roster/views/pmc/committers.js.rb b/www/roster/views/pmc/committers.js.rb
index 61b1548..90d4c35 100644
--- a/www/roster/views/pmc/committers.js.rb
+++ b/www/roster/views/pmc/committers.js.rb
@@ -25,7 +25,7 @@ class PMCCommitters < Vue
end
_tbody do
- @committers.each do |person|
+ committers.each do |person|
next if @@committee.members.include? person.id
next if @@committee.ldap.include? person.id
_PMCCommitter auth: @@auth, person: person, committee: @@committee
@@ -36,16 +36,16 @@ class PMCCommitters < Vue
end
# compute list of committers
- def created()
- committers = []
+ def committers
+ result = []
@@committee.committers.each do |id|
person = @@committee.roster[id]
person.id = id
- committers << person
+ result << person
end
- @committers = committers.sort_by {|person| person.name}
+ result.sort_by {|person| person.name}
end
end
diff --git a/www/roster/views/pmc/pmc.js.rb b/www/roster/views/pmc/pmc.js.rb
index 19da852..240fb2e 100644
--- a/www/roster/views/pmc/pmc.js.rb
+++ b/www/roster/views/pmc/pmc.js.rb
@@ -20,34 +20,25 @@ class PMCMembers < Vue
end
_tbody do
- @roster.each do |person|
+ roster.each do |person|
_PMCMember auth: @@auth, person: person, committee: @@committee
end
end
end
end
- def created()
- self.computeRoster()
- end
-
- def beforeUpdate()
- self.computeRoster()
- end
-
- # compute roster
- def computeRoster()
- roster = []
+ def roster
+ result = []
for id in @@committee.roster
if @@committee.members.include?(id) or @@committee.ldap.include?(id)
person = @@committee.roster[id]
person.id = id
- roster << person
+ result << person
end
end
- @roster = roster.sort_by {|person| person.name}
+ result.sort_by {|person| person.name}
end
end
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.