{% extends "settings_page.html" %} {% block header_script_files %} {% endblock %} {% block settings_pane %}
{% endblock %} {% block script %} Vue.component('plugin',{ props:['plugin'], template: ` [[ plugin.plugin_name ]] [[ plugin.plugin_description ]] [[ plugin.plugin_version ]] [[ plugin.plugin_author ]] [[ plugin.plugin_url ]] [[ plugin.plugin_license ]] [[ plugin.plugin_state ]] `, computed: { pluginClass() { let classname = 'btn-danger'; if(this.plugin.plugin_state == 'disabled') { classname = 'btn-success'; }; return classname; }, pluginAction() { let text = 'Disable'; if(this.plugin.plugin_state == 'disabled') { text = 'Enable'; }; return text; } }, delimiters: ["[[","]]"] }) Vue.component('plugins',{ props: ['plugins'], template: `

Plugins


Name Description Version Author URL License State Action
`, delimiters: ["[[","]]"] }) var app = new Vue({ el: '#app', data: { plugins: [], }, created() { this.getPlugins() }, methods: { getPlugins() { axios.get('{{ url_for('api.api_get_plugins') }}') .then(res => { this.plugins = res.data.results }) } }, delimiters: ["[[","]]"] }) {% endblock %}