diff --git a/quasar.conf.js b/quasar.conf.js
index 4ba32c4..28316ed 100644
--- a/quasar.conf.js
+++ b/quasar.conf.js
@@ -16,7 +16,7 @@ module.exports = function () {
// https://github.com/quasarframework/quasar/tree/dev/extras
extras: [
// 'ionicons-v4',
- // 'mdi-v5',
+ 'mdi-v5',
'fontawesome-v5',
// 'eva-icons',
// 'themify',
@@ -32,6 +32,7 @@ module.exports = function () {
env: { DEV_API: process.env.DEV_URL, PROD_API: process.env.PROD_URL, DOCKER_BUILD: process.env.DOCKER_BUILD },
vueRouterMode: 'history', // available values: 'hash', 'history'
distDir: "dist/",
+ devtool: process.env.NODE_ENV === "production" ? "cheap-module-eval-source-map" : "source-map",
// Add dependencies for transpiling with Babel (Array of regexes)
// (from node_modules, which are by default not transpiled).
diff --git a/src/components/ScriptManager.vue b/src/components/ScriptManager.vue
index 6484d8d..e89245d 100644
--- a/src/components/ScriptManager.vue
+++ b/src/components/ScriptManager.vue
@@ -75,7 +75,133 @@
@click="downloadScript(selectedScript)"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Powershell
+
+
+ Python
+
+
+ Batch
+
+
+ {{ props.node.name }}
+ {{ props.node.description }}
+
+
+
+
+
+
+
+
+
+ Edit
+
+
+
+
+
+
+ Delete
+
+
+
+
+
+
+ {{ favoriteText(props.node.favorite) }}
+
+
+
+
+
+
+
+
+ View Code
+
+
+
+
+
+
+ Download Script
+
+
+
+
+
+ Close
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+ Shell
+
+
+
+ Powershell
+
+
+ Python
+
+
+ Batch
+
+
{{ props.row.name }}
{{ props.row.category }}
- {{ props.row.shell }}
{{ truncateText(props.row.description) }}
{{
@@ -233,6 +350,9 @@ export default {
selectedScript: {},
showScriptUploadModal: false,
search: "",
+ tableView: true,
+ expanded: [],
+ selected: null,
pagination: {
rowsPerPage: 0,
sortBy: "favorite",
@@ -246,6 +366,13 @@ export default {
align: "left",
sortable: true,
},
+ {
+ name: "shell",
+ label: "Shell",
+ field: "shell",
+ align: "left",
+ sortable: true,
+ },
{
name: "name",
label: "Name",
@@ -260,13 +387,6 @@ export default {
align: "left",
sortable: true,
},
- {
- name: "shell",
- label: "Shell",
- field: "shell",
- align: "left",
- sortable: true,
- },
{
name: "desc",
label: "Description",
@@ -388,6 +508,19 @@ export default {
this.getScripts();
});
},
+ setTableView(view) {
+ this.tableView = view;
+ this.selectedScript = {};
+ this.selected = null;
+ this.expanded = [];
+ },
+ nodeSelected(nodeid) {
+ if (nodeid) {
+ this.selectedScript = this.$refs.folderTree.getNodeByKey(nodeid);
+ } else {
+ this.selectedScript = {};
+ }
+ },
},
computed: {
...mapState(["showCommunityScripts"]),
@@ -408,6 +541,67 @@ export default {
isRowSelected() {
return this.selectedScript.id !== null && this.selectedScript.id !== undefined;
},
+ tree() {
+ if (this.tableView) {
+ return [];
+ } else {
+ let nodes = [];
+ let unassigned = [];
+ let community = [];
+
+ let scriptsTemp = Object.assign([], this.visibleScripts);
+
+ this.categories.forEach(category => {
+ let temp = {
+ icon: "folder",
+ iconColor: "yellow-9",
+ label: category,
+ selectable: false,
+ id: category,
+ children: [],
+ };
+ for (var i = scriptsTemp.length - 1; i >= 0; i--) {
+ if (scriptsTemp[i].category === category) {
+ temp.children.push({ label: scriptsTemp[i].name, header: "script", ...scriptsTemp[i] });
+ scriptsTemp.splice(i, 1);
+ } else if (scriptsTemp[i].category === "Community") {
+ community.push({ label: scriptsTemp[i].name, header: "script", ...scriptsTemp[i] });
+ scriptsTemp.splice(i, 1);
+ } else if (!scriptsTemp[i].category) {
+ unassigned.push({ label: scriptsTemp[i].name, header: "script", ...scriptsTemp[i] });
+ scriptsTemp.splice(i, 1);
+ }
+ }
+
+ nodes.push(temp);
+ });
+
+ if (unassigned.length > 0) {
+ let temp = {
+ icon: "folder",
+ iconColor: "yellow-9",
+ label: "Unassigned",
+ id: "Unassigned",
+ selectable: false,
+ children: unassigned,
+ };
+ nodes.push(temp);
+ }
+
+ if (community.length > 0) {
+ let temp = {
+ icon: "folder",
+ iconColor: "yellow-9",
+ label: "Community",
+ id: "Community",
+ selectable: false,
+ children: community,
+ };
+ nodes.push(temp);
+ }
+ return nodes;
+ }
+ },
},
mounted() {
this.getScripts();