mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Drop the service 'log' button ... those logs are not helpful, to be improved / recplaced by ljf's work
This commit is contained in:
parent
fb8b3071f9
commit
e187e4b61a
3 changed files with 0 additions and 65 deletions
|
@ -336,9 +336,6 @@
|
|||
}
|
||||
});
|
||||
|
||||
// Paste <pre> helper
|
||||
c.prePaste();
|
||||
|
||||
// Run callback
|
||||
callback();
|
||||
|
||||
|
@ -496,49 +493,6 @@
|
|||
},
|
||||
|
||||
|
||||
//
|
||||
// Misc helpers used in views etc..
|
||||
//
|
||||
|
||||
// Paste <pre>
|
||||
prePaste: function() {
|
||||
var pasteButtons = $('button[data-paste-content],a[data-paste-content]');
|
||||
pasteButtons.on('click', function(){
|
||||
// Get paste content element
|
||||
var preElement = $($(this).data('paste-content'));
|
||||
|
||||
c.showLoader();
|
||||
|
||||
// Send to paste.yunohost.org
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'https://paste.yunohost.org/documents',
|
||||
data: preElement.text(),
|
||||
})
|
||||
.success(function(data, textStatus, jqXHR) {
|
||||
window.open('https://paste.yunohost.org/' + data.key, '_blank');
|
||||
})
|
||||
.fail(function() {
|
||||
c.flash('fail', y18n.t('paste_error'));
|
||||
})
|
||||
.always(function(){
|
||||
c.hideLoader();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
force_redirect: function(to) {
|
||||
c = this;
|
||||
// This is a copy-pasta of some of the redirect/refresh code of
|
||||
// sammy.js because for some reason calling the origina
|
||||
// redirect/refresh function in some context does not work >.>
|
||||
// (e.g. if you're already on the page)
|
||||
c.trigger('redirect', {to: to});
|
||||
c.app.last_location = c.path;
|
||||
c.app.setLocation(to);
|
||||
c.app.trigger('location-changed');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
|
|
|
@ -72,9 +72,6 @@
|
|||
<span class="fa-play"></span> {{t 'start'}}
|
||||
</button>
|
||||
{{/if}}
|
||||
<a href="#/services/{{name}}/log" role="button" class="btn btn-default slide">
|
||||
<span class="fa-book"></span> {{t 'log'}}
|
||||
</a>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
<div class="btn-breadcrumb">
|
||||
<a href="#/" ><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a>
|
||||
<a href="#/services">{{t 'services'}}</a>
|
||||
<a href="#/services/{{name}}">{{name}}</a>
|
||||
<a href="#/services/{{name}}/log">{{t 'log'}}</a>
|
||||
</div>
|
||||
|
||||
<div class="separator"></div>
|
||||
|
||||
<div class="container">
|
||||
{{#logs}}
|
||||
<h2>{{filename}}</h2>
|
||||
<pre id="log" class="service-log">{{filecontent}}</pre>
|
||||
<button data-paste-content="#log"><i class="fa-cloud-upload"></i> {{t 'upload'}}</button>
|
||||
{{/logs}}
|
||||
</div>
|
Loading…
Add table
Reference in a new issue