#foswiki 2014-09-09,Tue

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
RiskRewardHi socfocus. I'm the newbie on this, so take what I say with a grain of salt...
On my Main.RiskReward user page I have a search set up that tells me "topics I've been involved in recently"...
It looks like this:%SEARCH{
"%TOPIC%"
web="QMS"
scope="text"
nonoise="on"
order="modified"
reverse="on"
[00:26]
gac410socfocus: For the WebStatistics topics, you need to run a cron job [00:27]
RiskRewardlimit="5"
}%
[00:27]
gac410See http://foswiki.org/System/SiteTools#WebStatistics and http://foswiki.org/System/SiteToolStatistics [00:29]
......... (idle for 42mn)
RiskRewardAfter reading your comment I just tried WebStatistics for the first time - very cool1 [01:11]
GithubBot[distro] gac410 pushed 1 new commit to master: http://git.io/fmyyzw
distro/master c62a009 George Clark: Item11267: Add .gitignore files for default extensions
[01:11]
***GithubBot has left [01:11]
...... (idle for 29mn)
RiskRewardHi, I'm trying to do bold, colored text in a table. This seems to work "<b>%GREEN%OB+%ENDCOLOR%</b>", but I'm not sure it's the best way. What do you think? [01:40]
gac410Hi RiskReward What I settled on some years ago was using a "Set " in the topic to shorten the needed in-table markup. Set HI = <b>%GREEN% set EHI = %ENDCOLOR%</b> And then in a cell I could write %HI%OB+%EHI%
There are probably other more elegant tricks.
[01:44]
RiskRewardLooks good to me, thanks. Was using that approach to simplify some long (repeated) entries in the table, so might as well use it for highlighting too. [01:45]
gac410RiskReward: you could also consider http://foswiki.org/System/PreferenceSettings#Parameters [01:54]
RiskRewardThat's a nice feaure. Might find another use for it.
Gee, my topics are starting to look a bit little mini programs.
[01:56]
gac410* Set STATE = <b>%GREEN%%DEFAULT%%ENDCOLOR%</b> then write : | %STATE{"OK"}% [01:57]
RiskRewardNice one. [01:58]
gac410Or to get more complicated, there is the http://foswiki.org/Extensions/EasyMacroPlugin [01:59]
RiskRewardThat looks cool. My mind is reeling thinking of all the clever ways to use it :) [02:02]
.... (idle for 19mn)
In case you're interested, this works quite well for highlighting too: * Set STATE = <span style='background : #FFCCFF;'>%PURPLE%%DEFAULT%%ENDCOLOR%</span> [02:21]
................ (idle for 1h15mn)
***ChanServ sets mode: +o Babar
ChanServ sets mode: +o Babar
[03:36]
...... (idle for 29mn)
GithubBot[TestBootstrapPlugin] none pushed 3 new commits to master: http://git.io/OP_XuQ
TestBootstrapPlugin/master c378d68 George Clark: Item13023: Restrict to administrators...
TestBootstrapPlugin/master 83afca9 George Clark: Item13023: Sync up with real bootstrap...
TestBootstrapPlugin/master ea13703 George Clark: Item13023: Cleanup manifest and unused files
[04:06]
***GithubBot has left [04:06]
GithubBot[distro] gac410 pushed 1 new commit to master: http://git.io/xRc6JQ
distro/master f086cd4 George Clark: Item11267: Initial script to update github hooks...
[04:20]
***GithubBot has left [04:20]
.... (idle for 18mn)
gac410 has left [04:38]
................. (idle for 1h20mn)
ChanServ sets mode: +o MichaelDaum [05:58]
GithubBot[distro] MichaelDaum pushed 1 new commit to master: http://git.io/RBqG5A
distro/master e0248d1 MichaelDaum: Item12246: docu fixes
[06:11]
***GithubBot has left [06:11]
............... (idle for 1h14mn)
MichaelDaumangular.js seems to be the new jquery
in terms of standard
[07:25]
.... (idle for 17mn)
jastI've used angular.js for an internal application
my personal conclusion: two-way binding isn't nearly as useful as it seemed at first
[07:42]
MichaelDaumwhy? [07:45]
.... (idle for 15mn)
jastwell, take an editor for a data object. normally you open some kind of editor dialog/pane with a save/cancel type deal...
with two-way binding you'd have all changes made in the dialog immediately reflected in the corresponding data object
so, in order for this to make any sense you have to use a viewmodel type thing and implement logic to populate the viewmodel and then commit its changes back to the store
[08:00]
MichaelDaumyou don't have to use two-way bindings in an editor. [08:02]
jastwhile that's not really impractical, IMO it doesn't add as many benefits as people usually say, unless your view is extremely complex [08:02]
MichaelDaum... with an explicit "save" button
the main advantage is client side rendering
[08:02]
jastwell, that's about the only thing I can see two-way bindings having any practical advantage over one-way bindings in the first place
if all you want to do is render data, a one-way binding is completely sufficient
[08:03]
MichaelDaumeven when using one-way binding only, angularjs seems to be the obvious choice.
if you need templating only, well then jsrender might suffice.
[08:03]
jastthere are at least three interesting alternatives to angular.js [08:04]
MichaelDaumat least, yep
which alternative would you consider, jast ?
[08:04]
jastand, well, angularjs has a lot of dependency injection and IoC type stuff that I found makes debugging and finding errors rather difficult [08:05]
MichaelDaumare you preferring any? [08:05]
jastthe one that seemed cleanest to me was knockoutjs [08:05]
MichaelDaum... which is data binding only
not quite fair to compare angular.js with knockout.js
[08:05]
jastwell, it provides two-way binding just like angularjs
but it makes many things much cleaner IMO, e.g. synthesized binding values (the newest version even offers writable synthesized values)
plus you spend less time writing factories and services and providers :}
[08:06]
MichaelDaumI like angluar's concepts [08:09]
jastangular has many pitfalls [08:09]
MichaelDaumpeople tend to create one big mess, like our current configure [08:09]
jaste.g. the somewhat counterintuitive scope inheritance mechanism
e.g. parts of the code can't run digest, parts can, and it's hard to remember where you can and where you can't and where you shouldn't
[08:09]
MichaelDaum...based on prototyping ... versus knockout's use of $parent
really it is configure that made me dig deeper into spa frameworks
[08:09]
jastfor a rather different approach to rendering UI, React is interesting, too
I don't like it, but it's interesting :)
[08:11]
MichaelDaummy current thinking is: (1) jsrender is fine for templating-only; (2) its cusin jsviews isn't on par with alternatives such as angular and knockout, besides being alpha state software; (3) if you require templating, data binding (either two or one-way does not matter), testing, building I'd go with angular, grunt, bower ... not sure on persistence [08:14]
jastI'm a huge fan of component/widget-based approaches to rendering UI
at this point all of the big players support that
but I have this gut feeling it could be done even better. should I ever figure out how, I'll make my own framework/library. ;)
[08:15]
MichaelDaumYAOMS (yet another one-man-show)
http://www.bitnative.com/2014/04/14/angularjs-the-de-facto-standard-for-spa-development/
one year ago, I really wouldn't know which spa framework to use ping-ponging between knockout and angular most of the time....or go with some low profile approach like jsrender
2014 trends are clear, imho
if there is one thing that I hate the most in web development then it is moving standards or even components being used in projects that silently die.
jquery.tmpl, jquery.mobile, jquery.ui ... younameit.js ... I mean wtf
my gut feeling says: stay away from knockoutjs
granted it is not on par wrt angular.js; you'll need additional stuff like durandal to be fair; however its maintainer just moved to google now working on angular; durandal will be merged into angular.
changes all over
anyway
coming back to our "spa" called configure...what can we do?
(1) keep it like it is using poor-mans DOM plumbing, pretty much uncustomizable without recoding the jQuery sphagetti (2) use jquery.tmpl (3) use jsrender (4) use angularjs (5) use knockoutjs ... ?
(6) use server side rendering
[08:22]
jastI'm not familiar with the current version CDot has been working on... but my main beef with the UI has been that there's nothing that keeps track of which options have been changed and which haven't
incidentally none of the frameworks help with that
IMO that's a definite prerequisite for anything that would improve the performance of the UI and submitting/auditing in particular
[08:34]
MichaelDaumthe current configure.js is OBMJQ (one big mess of jQuery)
keeping track of changes? sounds comparably simple.
developers tend to add little flags to changed items
[08:37]
***ChanServ sets mode: +o pharvey [08:43]
..... (idle for 23mn)
ChanServ sets mode: +o pharvey [09:06]
.... (idle for 18mn)
ChanServ sets mode: +o Lynnwood [09:24]
........................................ (idle for 3h19mn)
VerboEse has left [12:43]
.... (idle for 18mn)
ChanServ sets mode: +o pharvey
ChanServ sets mode: +o gac410
[13:01]
............. (idle for 1h1mn)
LynnwoodMorning all. I’m trying to track down source of odd behavior when logging in on a new installation.
For some reason, the foswiki_origin as defined in the login form is slightly wrong. it contains an extra path level.
But I can’t for the life of me figure out where this value could be coming from.
it’s adding a directly level that’s not specified anywhere that i can fine. Not in my apache config file, or configure settings, or SitePreferences.
Looking at the the login template, the error appears to come in the rendering of %PATH_INFO% - which i can not find very much info on.
[14:04]
gac410PATH_INFO comes from the apache evironment [14:09]
tsnfooI'm seeing a ton of this in my error logs again:
Can't locate object method "topicObject" via package "Foswiki::Prefs::HASH" at /var/www/foswiki/lib/Foswiki/Prefs.pm line 311
Anybody know whats up with that? Item11546 indicates that it hs to do with illegal web names, but mine are all good, and none have changed.
[14:10]
Lynnwoodthanks gac410 - that’s a lead [14:11]
tsnfooMy fastcgi processes are dying all over the place. Some people can hardly use the wiki. [14:12]
gac410tsnfoo: I've never run into that. What changed? :) [14:12]
tsnfoogac410: Good question. I googled it, and just found myself asking this on IRC three years ago :-) [14:13]
gac410Don't you just hate when that happens. :D [14:14]
tsnfooYeah. I think I have an unfair share of stupid questions in the #foswiki IRC logs. History may not remember me fondly.
Man, I see a ton on "Premature end of script headers: foswiki.fcgi" in error_log
[14:15]
TarboxThat's a crash and burn. [14:16]
tsnfooI'm using the wiki fine, but I see a ton of our students logging in, and like half the topics they try to load 500.
Is there any way to get a full stack trace when fasctcgi requests die?
[14:16]
gac410It should show up in the apache error log. [14:17]
TarboxWell this is just personal preference but I would find that line number in the code and hack in some 'print STDERR "useful info"' lines.
Maybe I like getting my hands dirty too much.
[14:17]
tsnfooHah! [14:18]
gac410tsnfoo iirc you rename the users web for each new student body? (Or something like that)
Did somehow that process go awry
[14:18]
tsnfooI remember trying that, but never getting it to work. [14:18]
gac410oh. hm... [14:19]
tsnfooSo everybody just goes in Main now.
Line 311 of Prefs.pm is the popTopicContext sub def.
$stack->backAtLevel(-3)->topicObject->web()
[14:19]
gac410tsnfoo: The prefs stack is one of the areas I completely stay away from. It's really complex code. [14:21]
tsnfooBlarg.
Maybe 'Can't locate object method "topicObject"' means that the stack is invalid at that point.
[14:21]
gac410I'm guessing it's something else and prefs is a victim. Were those users ever logged in / running successfully? [14:22]
tsnfootsnfoo is looking up a couple users to find out... [14:23]
gac410topicObject is basically an instance of Foswiki::Meta it points to a topic, user, subweb, web, or root of the install, and is used in following the inheritance path for preferences. [14:23]
GithubBot[distro] gac410 pushed 1 new commit to master: http://git.io/gTwkCw
distro/master eebb116 George Clark: Item11267: Document new configure
[14:25]
***GithubBot has left [14:25]
tsnfoo.away
d'oh
Way to IRC there, foo.
[14:26]
LynnwoodLynnwood is stumped about how ‘wiki/‘ is getting added to foswiki_origin string.
it’s not used in any of the path or rewrites.
If i put %ENV{“PATH_INFO”}%, it comes up correct.
e.g. that returns something like “/System/WebHome” but foswiki_origin comes up as /wiki/SystemWebHome
[14:31]
gac410It appears to come from %FOSWIKI_ORIGIN% which is built in TemplateLogin.pm
And that all is recovered from the session data stashed prior to a redirect.
[14:35]
....... (idle for 31mn)
GithubBot[distro] gac410 pushed 1 new commit to master: http://git.io/davV-Q
distro/master 6f2d2b0 George Clark: Item12952: Document the configure access controls
[15:08]
***GithubBot has left [15:08]
socfocusgac410, so for WebStatistics topics I need to run a cronjob and it will pull the stats for each web [15:08]
gac410yes [15:08]
socfocusit will update them daily i guess
and be viewable for each web
to get a total I guess this would be something I would need to script? to get a grand total of contributions
[15:08]
gac410Depending on how frequently you run it, the rcs,v files can get huge. Each statistics topic update checks in a new revision.
yes, there is no grand summary. The Statistics tools are rather limited. Someday someone will write a new one :)
[15:09]
socfocusmaybe I can write a plugin that will do a grand total page or something
it would just crawl the other pages
ok so on each web I need to manually activate this
just curious the best way to set this up
[15:12]
gac410There are options to let the script auto-create the WebStatistics topic if it's missing. (I think, I might be confusing 1.2 features)
Yes See http://foswiki.org/System/SiteToolStatistics and settings under the bin/configure Logging and Statistics tab.
socfocus: "best way" depends a lot on how your wiki will be used.
On foswiki.org we run statistics every hour. But that is probably excessive, and results in HUGE rcs ",v" histories
We manually move WebStatistics into WebStatisticsYYYY topics at the beginnning of each year and start over. That keeps the histories somewhat manageable,.
[15:14]
socfocusmy mgr just wants daily stats updates
no i think monthly would be best
for us
then probably refresh every month
[15:23]
gac410The other approach is to get general web statistics from the apache logs. Using something like awstats ... but that doesn't capture stuff like top editors, etc. [15:24]
socfocusgac410, ya i want the more wiki way
I will play around with this
[15:24]
***xixs has left [15:31]
Lynnwooddrats, this is frustrating trying to find where this extra directory in foswiki_origin is coming from... [15:40]
gac410: thanks for your suggestion of looking at TemplateLogin.pm, but I can’t find anything there that give me hint where it’s getting this value from... [15:46]
i found it finally!
jeez
a locally customized login form from some one...
[15:55]
jastwhere was it?
oh, yay :)
[15:55]
Lynnwoodi should have guessed something like that based on the background of this site.
(i inherited it)
well, at least it was easy to fix.
I finally found it by testing the %LOGIN% macro which produced correct link, so that lead me to suspect something was weird about the site’s login link.
[15:56]
...................... (idle for 1h46mn)
***wdenk has quit IRC (Quit: Leaving.) [17:44]
.............................. (idle for 2h25mn)
socfocusgac410, I figured out the statistics and get what you mean on resetting them periodically by moving the page etc [20:09]
if you call /bin/statistics is the args the webs separated by comma at the command line? [20:19]
i guess it would help if i just run it and try myself [20:28]
............................... (idle for 2h32mn)
***ChanServ sets mode: +o pharvey [23:00]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)