wild card UI done
This commit is contained in:
@@ -26,10 +26,17 @@ app.host = (function(app){
|
||||
function remove(args, callack){
|
||||
app.api.delete('host/'+ args.host, function(error, data){
|
||||
callack(error, data);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function getCert(args, callack){
|
||||
app.api.get('cert/'+args.host, function(error, data){
|
||||
callack(error, data);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
getCert,
|
||||
list: list,
|
||||
get: get,
|
||||
add: add,
|
||||
|
||||
@@ -311,7 +311,23 @@ app.util = (function(app){
|
||||
return obj;
|
||||
};
|
||||
|
||||
function downloadFile(filename, text){
|
||||
// https://stackoverflow.com/a/18197341
|
||||
|
||||
var element = document.createElement('a');
|
||||
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
|
||||
element.setAttribute('download', filename);
|
||||
|
||||
element.style.display = 'none';
|
||||
document.body.appendChild(element);
|
||||
|
||||
element.click();
|
||||
|
||||
document.body.removeChild(element);
|
||||
}
|
||||
|
||||
return {
|
||||
downloadFile: downloadFile,
|
||||
getUrlParameter: getUrlParameter,
|
||||
actionMessage: actionMessage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user