Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated latest dist css/js

  • Loading branch information...
commit c1a12144d759fd965a7bc4e4b3c4d5f25960d673 1 parent b274c28
@r8k r8k authored
View
3  .gitignore
@@ -1,5 +1,4 @@
-oldStuff
node_modules
*.rdb
*.log
-TODO.txt
+TODO.txt
View
4 LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2011, Francois-Guillaume Ribreau <node@fgribreau.com>
+Copyright (c) 2013, Francois-Guillaume Ribreau <node@fgribreau.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -24,4 +24,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
2  public/dist/foreverui.min.css
@@ -1,4 +1,4 @@
-/*! forever-webui - v0.1.6 - 2013-03-02
+/*! forever-webui - v0.1.6 - 2013-03-03
* Copyright (c) 2013 ; */
html,body{margin:0;padding:0;}
h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;}
View
2  public/dist/foreverui.min.js
@@ -1,3 +1,3 @@
-/*! forever-webui - v0.1.6 - 2013-03-02
+/*! forever-webui - v0.1.6 - 2013-03-03
* Copyright (c) 2013 ; */
App.Process=Backbone.Model.extend({defaults:{uid:"",ctime:0,command:"",pid:0,foreverPid:0,logFile:"",options:[],file:"",pidFile:"",outFile:"",errFile:"",sourceDir:""},initialize:function(e){this.attributes.time=prettyDate(e.ctime),_.each(["info","stop","restart"],this._makeMethod,this)},_makeMethod:function(e){this[e]=function(t){$.ajax("/"+e+"/"+this.get("uid")).complete(function(e){t(JSON.parse(e.responseText))})}}}),App.ProcessList=Backbone.Collection.extend({model:App.Process,url:"/processes",comparator:function(e){return e.get("file")},getByPID:function(e){return this.detect(function(t){return t.get("pid")==e})}}),App.ProcessView=Backbone.View.extend({tagName:"div",className:"row",tmpl:$("#process-tmpl").html(),tmplInfo:$("#tplInfo"),events:{"click .info":"info","click .restart":"restart","click .stop":"stop"},initialize:function(){this.model.bind("destroy",this.remove,this)},render:function(){return $(this.el).html(Mustache.to_html(this.tmpl,this.model.toJSON())),this},info:function(e){e&&e.preventDefault();var t=$(this.el);t.addClass("load"),this.model.info(function(e){this._showInfo(t,e),t.removeClass("load")}.bind(this))},restart:function(e){e&&e.preventDefault();var t=$(this.el);t.addClass("load"),this.model.restart(function(){t.removeClass("load"),_.delay(this.model.collection.fetch.bind(this.model.collection),1e3)}.bind(this))},stop:function(e){e&&e.preventDefault();var t=$(this.el);t.addClass("load"),this.model.stop(function(){t.removeClass("load"),_.delay(this.model.collection.fetch.bind(this.model.collection),1e3)}.bind(this))},remove:function(){$(this.el).remove()},_formatInfo:function(e){if("error"==e.status)return $("<strong>"+e.details+"</strong>");var t=$("<div/>");return e.details.forEach(function(e){var s="";t.append(e[0]);for(var o=0,i=e[1].length;i>o;o++)s+="<span class='ansi-"+e[1][o].foreground+"'>"+e[1][o].text+"</span>";t.append('<pre class="prettyprint">'+s+"</pre>")}),t},_showInfo:function(e,t){var s=e.next();(0==s.length||s.is(".row"))&&(s=this.tmplInfo.clone().removeClass("hidden").insertAfter(e).alert()),"error"==t.status&&s.removeClass("info").addClass("error"),s.find(".alert-message-content").html(this._formatInfo(t)).find("pre").each(function(){this.scrollTop=9e5})}}),App.AppView=Backbone.View.extend({el:$(".container"),events:{"click .refresh":"refresh"},initialize:function(e){this.Processes=new App.ProcessList,this.Processes.bind("all",this.updateAll,this),this.Processes.reset(e),this.$("#app-version").text(App.version),document.title+=App.version},addOne:function(e){var t=new App.ProcessView({model:e});this.$("#process-list").append(t.render().el)},updateAll:function(){this.$("#process-list").empty(),this.Processes.each(this.addOne,this),this.render()},refresh:function(){this.Processes.fetch()},render:function(){this.$("#process-count").text(this.Processes.length)}}),App.ModalView=Backbone.View.extend({tmpl:$("#modal-template").html(),events:{"click .closeProcess":"close","click .addProcess":"addProcess"},initialize:function(){this.model=new Backbone.Model,this.model.bind("destroy",this.remove,this)},render:function(){return $(this.el).html(Mustache.to_html(this.tmpl,this.model.toJSON())),this},show:function(){$(document.body).append(this.render().el),$("#process-args-input").focus()},close:function(){this.remove()},addProcess:function(){if($("#process-args-input").val()){var e=$.ajax({url:"/addProcess",type:"post",data:{args:encodeURIComponent($("#process-args-input").val())}});e.success(function(){var e=setTimeout(function(){$(".refresh").trigger("click"),clearTimeout(e)},3e3)}),e.error(function(e,t,s){console.error("The following error occured: "+t,s)})}this.remove()}}),App.AddProcess=Backbone.View.extend({el:$("body"),events:{"click #addProcess-modal":"showmodal","click .closeProcess":"closemodal","click .addProcess":"addProcess"},initialize:function(){this.addProcessModal=new App.ModalView},showmodal:function(){this.addProcessModal.show()},closemodal:function(){this.addProcessModal.close()},addProcess:function(){this.addProcessModal.addProcess()}});
Please sign in to comment.
Something went wrong with that request. Please try again.