Commit a4d7ce80 authored by Recteur LP's avatar Recteur LP

improve plugin administration

parent 7abd8452
Pipeline #1357 passed with stages
in 16 minutes and 28 seconds
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*! PyRmin.js 0.4.0 */
function callback_store_list(s){$("#plugins_choice").html("<option></option>"),$("#plugins_choice").css("display","block"),$.each(s.plugins,function(a){$("#plugins_choice").append($("<option></option>").attr("value",s.plugins[a].url+"/repository/archive.tar.gz").text(s.plugins[a].name+" "+s.plugins[a].tags[0].name)),$("ul#plugins_list li").each(function(t){if($(this).attr("data-namespace").toLowerCase()===s.plugins[a].name.toLowerCase()){var e=s.plugins[a].tags[0].name.split(".").map(return2digit),n=$(this).attr("data-version").split(".").map(return2digit),l=parseInt(e,10)>parseInt(n,10)?"label-danger":"label-success";return $("#row_"+$(this).attr("data-namespace")+" .label-plugin-version").removeClass("label-info").addClass(l),!1}})})}function return2digit(t){return 1==t.length?"0"+t:t}$(document).ready(function(){pyrmin().add_vendor(["swal","select2","nunjucks","fileinput","chartjs","icheck"]),$("#settings_modal").on("show.bs.modal",function(t){var e=$(t.relatedTarget),n=e.data("namespace"),l=e.data("name")+" ("+n+")",a=$(this);a.find(".modal-title").text(l),a.find(".modal-body").empty(),config=pyrmin().get("/rest/settings/config/"+n).config,nunjucks.render("plugins/"+n+"/templates/settings.inc.html",{config:config},function(t,e){null===t?$("#settings_modal").find(".modal-body").html(e):$("#settings_modal").find(".modal-body").text(t)})}),$("#tar").fileinput({allowedFileExtensions:["tar.gz"]}),$("select").select2(),$("#install_btn").click(function(){var t=new FormData($("#install_form")[0]);if(mode=$("input[name='method']:checked").val(),"upload"===mode){if(0===$("#tar").get(0).files.length)return void $("#upload_form").addClass("has-error")}else if("url"===mode){if(""===$("#url").val())return void $("#url_form").addClass("has-error")}else if("store"===mode){if(""===$("#plugins_choice").val())return void $("#store_form_control").addClass("has-error");if($("#private_store_toggle").prop("checked")&&""===$("#store_token").val())return void $(".private_store_token").addClass("has-error")}$.ajax({url:"/rest/settings/install",type:"POST",data:t,cache:!1,contentType:!1,processData:!1,success:function(t,e){0===t.status?($("#install").modal("hide"),pyrmin().notify("success","OK","Plugin installed ! \n Please Reboot the Application")):pyrmin().notify("error","An error occur",t.error)},error:function(t,e){console.log(e),$("#install").modal("hide"),pyrmin().notify("error","An error occur","Response status code : "+e)}},"json")}),$("input[name='method']").on("ifChecked",function(t){$("#plugins_choice").css("display","none"),$("#upload_form").css("display","upload"===$(this).val()?"block":"none"),$("#url_form").css("display","url"===$(this).val()?"block":"none"),$("#store_form").css("display","store"===$(this).val()?"block":"none"),$("#install_btn").css("display","inline-block")}),$("#uninstall_btn").click(function(){plugin=$("#settings_modal .modal-title").html().split("(")[1].replace(")",""),swal({title:"Are you sure?",text:"Do you want to uninstall "+plugin+" plugins and all its files ?",type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"Yes, delete it!",cancelButtonText:"Cancel",closeOnConfirm:!0,closeOnCancel:!0},function(t){t&&(data=pyrmin().get("/rest/settings/uninstall/"+plugin.toLowerCase()),console.log(data),0===data.status&&pyrmin().notify("success","Uninstall !",name+" plugin has been uninstalled."))})}),$("#reinstall_btn").click(function(){plugin=$("#settings_modal .modal-title").html().split("(")[1].replace(")",""),data=pyrmin().get("/rest/settings/reinstall/"+plugin.toLowerCase()),0===data.status?pyrmin().notify("success","Reinstall !",name+" plugin has been reinstalled."):pyrmin().notify("error","Cancelled","No action taken: "+data.error)}),$("#private_store_toggle").change(function(){$(".private_store").toggle(this.checked)}).change(),$(".icheck").iCheck({radioClass:"iradio_flat-blue"}),$("#login_btn").click(function(){var t=$("#store_token").val();""!==t?get_data(pyrmin().url+"/rest/download/plugins/?token="+t,callback_store_list):$(".private_store_token").addClass("has-error")}),get_data(pyrmin().url+"/rest/download/plugins/",callback_store_list)});
function callback_store_list(i){$("#plugins_choice").html("<option></option>"),$("#plugins_choice").css("display","block"),$.each(i.plugins,function(a){$("#plugins_choice").append($("<option></option>").attr("value",i.plugins[a].url+"/repository/archive.tar.gz").text(i.plugins[a].name+" "+i.plugins[a].tags[0].name)),$("ul#plugins_list li").each(function(t){if($(this).attr("data-namespace").toLowerCase()===i.plugins[a].name.toLowerCase()){var e=i.plugins[a].tags[0].name.split(".").map(return2digit),n=$(this).attr("data-version").split(".").map(return2digit),s=parseInt(e,10)>parseInt(n,10)?"badge-danger":"badge-success";return $("#row_"+$(this).attr("data-namespace")+" .badge-plugin-version").removeClass("badge-info").addClass(s),!1}})})}function return2digit(t){return 1==t.length?"0"+t:t}$(document).ready(function(){pyrmin().add_vendor(["swal","select2","nunjucks","bsfileinput","chartjs","icheck"]),$("#settings_modal").on("show.bs.modal",function(t){var e=$(t.relatedTarget),n=e.data("namespace"),s=e.data("name")+" ("+n+")",a=$(this);a.find(".modal-title").text(s),a.find(".modal-body").empty(),config=pyrmin().get("/rest/settings/config/"+n).config,nunjucks.render("plugins/"+n+"/templates/settings.inc.html",{config:config},function(t,e){null===t?$("#settings_modal").find(".modal-body").html(e):$("#settings_modal").find(".modal-body").text(t)})}),bsCustomFileInput.init(),$("select").select2(),$("#install_btn").click(function(){var t=new FormData($("#install_form")[0]);if(mode=$("input[name='method']:checked").val(),"upload"===mode){if(0===$("#tar").get(0).files.length)return void $("#upload_form").addClass("has-error")}else if("url"===mode){if(""===$("#url").val())return void $("#url_form").addClass("has-error")}else if("store"===mode){if(""===$("#plugins_choice").val())return void $("#store_form_control").addClass("has-error");if($("#private_store_toggle").prop("checked")&&""===$("#store_token").val())return void $(".private_store_token").addClass("has-error")}$.ajax({url:"/rest/settings/install",type:"POST",data:t,cache:!1,contentType:!1,processData:!1,success:function(t,e){0===t.status?($("#install").modal("hide"),pyrmin().notify("success","OK","Plugin installed ! \n Please Reboot the Application")):pyrmin().notify("error","An error occur",t.error)},error:function(t,e){console.log(e),$("#install").modal("hide"),pyrmin().notify("error","An error occur","Response status code : "+e)}},"json")}),$("input[name='method']").on("ifChecked",function(t){$("#plugins_choice").css("display","none"),$("#upload_form").css("display","upload"===$(this).val()?"block":"none"),$("#url_form").css("display","url"===$(this).val()?"block":"none"),$("#store_form").css("display","store"===$(this).val()?"block":"none"),$("#install_btn").css("display","inline-block")}),$("#uninstall_btn").click(function(){plugin=$("#settings_modal .modal-title").html().split("(")[1].replace(")",""),swal({title:"Are you sure?",text:"Do you want to uninstall "+plugin+" plugins and all its files ?",type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"Yes, delete it!",cancelButtonText:"Cancel",closeOnConfirm:!0,closeOnCancel:!0},function(t){t&&(data=pyrmin().get("/rest/settings/uninstall/"+plugin.toLowerCase()),console.log(data),0===data.status&&pyrmin().notify("success","Uninstall !",name+" plugin has been uninstalled."))})}),$("#reinstall_btn").click(function(){plugin=$("#settings_modal .modal-title").html().split("(")[1].replace(")",""),data=pyrmin().get("/rest/settings/reinstall/"+plugin.toLowerCase()),0===data.status?pyrmin().notify("success","Reinstall !",name+" plugin has been reinstalled."):pyrmin().notify("error","Cancelled","No action taken: "+data.error)}),$("#private_store_toggle").change(function(){$(".private_store").toggle(this.checked)}).change(),$(".icheck").iCheck({radioClass:"iradio_flat-blue"}),$("#login_btn").click(function(){var t=$("#store_token").val();""!==t?get_data(pyrmin().url+"/rest/download/plugins/?token="+t,callback_store_list):$(".private_store_token").addClass("has-error")}),get_data(pyrmin().url+"/rest/download/plugins/",callback_store_list)});
//# sourceMappingURL=settings.min.js.map
\ No newline at end of file
{"version":3,"sources":["../../../src/js/settings.js"],"names":["callback_store_list","data","$","html","css","each","plugins","plugin","append","attr","url","text","name","tags","i","this","toLowerCase","latest","split","map","return2digit","installed","labelclass","parseInt","removeClass","addClass","x","length","document","ready","pyrmin","add_vendor","on","event","button","relatedTarget","namespace","modal","find","empty","config","get","nunjucks","render","err","res","fileinput","allowedFileExtensions","select2","click","formData","FormData","mode","val","files","prop","ajax","type","cache","contentType","processData","success","status","notify","error","console","log","replace","swal","title","showCancelButton","confirmButtonColor","confirmButtonText","cancelButtonText","clos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AASrD,SAASpB,IAAM,iCAAmCwE,EAAOlF,qBAJlEE,EAAE,wBAAwBuB,SAAS,eAU3C0D,SAASrD,SAASpB,IAAM,0BAA2BV","file":"settings.min.js"}
\ No newline at end of file
{"version":3,"sources":["../../../src/js/settings.js"],"names":["callback_store_list","data","$","html","css","each","plugins","plugin","append","attr","url","text","name","tags","i","this","toLowerCase","latest","split","map","return2digit","installed","labelclass","parseInt","removeClass","addClass","x","length","document","ready","pyrmin","add_vendor","on","event","button","relatedTarget","namespace","modal","find","empty","config","get","nunjucks","render","err","res","bsCustomFileInput","init","select2","click","formData","FormData","mode","val","files","prop","ajax","type","cache","contentType","processData","success","status","notify","error","console","log","replace","swal","title","showCancelButton","confirmButtonColor","confirmButtonText","cancelButtonText","closeOnConfirm","closeOnCancel","isConfirm","change","toggle","checked","iCheck","radioClass","token","get_data"],"mappings":";AA+IA,SAASA,oBAAoBC,GACzBC,EAAE,mBAAmBC,KAAK,qBAC1BD,EAAE,mBAAmBE,IAAI,UAAW,SACpCF,EAAEG,KAAKJ,EAAKK,QAAS,SAASC,GAC1BL,EAAE,mBACGM,OAAON,EAAE,qBACTO,KAAK,QAAQR,EAAKK,QAAQC,GAAQG,IAAM,8BACxCC,KAAKV,EAAKK,QAAQC,GAAQK,KAAO,IAAMX,EAAKK,QAAQC,GAAQM,KAAK,GAAGD,OAEzEV,EAAE,sBAAsBG,KAAK,SAASS,GAClC,GAAGZ,EAAEa,MAAMN,KAAK,kBAAkBO,gBAAkBf,EAAKK,QAAQC,GAAQK,KAAKI,cAAe,CACzF,IAAIC,EAAShB,EAAKK,QAAQC,GAAQM,KAAK,GAAGD,KAAKM,MAAM,KAAKC,IAAIC,cAC1DC,EAAYnB,EAAEa,MAAMN,KAAK,gBAAgBS,MAAM,KAAKC,IAAIC,cACxDE,EAAcC,SAASN,EAAQ,IAAMM,SAASF,EAAW,IAAO,eAAiB,gBAErF,OADAnB,EAAE,QAAUA,EAAEa,MAAMN,KAAK,kBAAoB,0BAA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EAAE,gCAAgCC,OAAOe,MAAM,KAAK,GAAGiD,QAAQ,IAAK,IAC7ElE,KAAO6B,SAASW,IAAI,4BAA8BlC,OAAOS,eACtC,IAAhBf,KAAK6D,OAAchC,SAASiC,OAAO,UAAW,cAAenD,KAAO,iCAClEkB,SAASiC,OAAO,QAAS,YAAa,oBAAsB9D,KAAK+D,SAG1E9D,EAAE,yBAAyB2E,OAAO,WAChC3E,EAAE,kBAAkB4E,OAAO/D,KAAKgE,WAC/BF,SAEH3E,EAAE,WAAW8E,OAAO,CAClBC,WAAY,qBAId/E,EAAE,cAAc+C,MAAM,WAClB,IAAIiC,EAAQhF,EAAE,gBAAgBmD,MACjB,KAAV6B,EAKCC,SAASrD,SAASpB,IAAM,iCAAmCwE,EAAOlF,qBAJlEE,EAAE,wBAAwBuB,SAAS,eAU3C0D,SAASrD,SAASpB,IAAM,0BAA2BV","file":"settings.min.js"}
\ No newline at end of file
......@@ -75,8 +75,6 @@
</div>
<div class="info">
<p>{{ core.user.displayname }}</p>
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
</div>
</div>
{%- endif %}
......
......@@ -28,8 +28,8 @@
</div>
<div class="product-info">
<a href="#" class="product-title">{{ plugin.name }}</a>
<div class="pull-right">
<span class="label label-info label-plugin-version">{{ plugin.version }}</span>
<div class="float-right">
<span class="badge badge-info badge-plugin-version">{{ plugin.version }}</span>
</div>
<span class="product-description">
{{ plugin.description }}
......@@ -185,7 +185,7 @@
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-default float-left" data-dismiss="modal">Cancel</button>
<button type="button" id="login_btn" class="btn btn-primary private_store">Login</button>
<button type="button" id="install_btn" class="btn btn-primary" style="display: none;">Install</button>
</div>
......
......@@ -75,6 +75,7 @@
}
.content-wrapper {
background: #384246 !important;
color: #bcbcbc;
}
em {
font-style: italic;
......
......@@ -85,6 +85,7 @@ pyrmin_vendors = {
"nunjucks": ["/vendor/nunjucks/nunjucks.min.js"],
"momentjs": ["/vendor/moment/moment.min.js"],
"odometer": ["/vendor/odometer/odometer.min.js", "/vendor/odometer/odometer-theme-default.css"],
"bsfileinput": ["/vendor/bs-custom-file-input/bs-custom-file-input.min.js"],
"fileinput": ["/vendor/boostrap-fileinput/css/fileinput.min.css", "/vendor/boostrap-fileinput/js/fileinput.min.js", "/vendor/boostrap-fileinput/js/theme.min.js"],
"chartjs": ["/vendor/chart.js/Chart.min.js", "/vendor/chart.js/Chart.min.css"],
"steps": ["/vendor/jquery.steps/jquery.steps.min.js", "/vendor/jquery.validate/jquery.validate.min.js","/vendor/jquery.steps/jquery.steps.css"],
......
......@@ -2,7 +2,7 @@
$(document).ready(function() {
pyrmin().add_vendor(['swal', 'select2', 'nunjucks', 'fileinput', 'chartjs', 'icheck']);
pyrmin().add_vendor(['swal', 'select2', 'nunjucks', 'bsfileinput', 'chartjs', 'icheck']);
// Display Plugins Config in Modal
$('#settings_modal').on('show.bs.modal', function (event) {
......@@ -24,7 +24,7 @@ $(document).ready(function() {
});
//Init File Input
$("#tar").fileinput({allowedFileExtensions: ["tar.gz"]});
bsCustomFileInput.init();
// Init Select Style
$('select').select2();
......@@ -154,8 +154,8 @@ function callback_store_list(data) {
if($(this).attr('data-namespace').toLowerCase() === data.plugins[plugin].name.toLowerCase()) {
var latest = data.plugins[plugin].tags[0].name.split('.').map(return2digit);
var installed = $(this).attr('data-version').split('.').map(return2digit);
var labelclass = (parseInt(latest, 10) > parseInt(installed, 10)) ? 'label-danger' : 'label-success';
$('#row_' + $(this).attr('data-namespace') + ' .label-plugin-version').removeClass("label-info").addClass(labelclass);
var labelclass = (parseInt(latest, 10) > parseInt(installed, 10)) ? 'badge-danger' : 'badge-success';
$('#row_' + $(this).attr('data-namespace') + ' .badge-plugin-version').removeClass("badge-info").addClass(labelclass);
return false;
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment