From db7891ac78cab3b554eb95a6a6eee8dd2751df64 Mon Sep 17 00:00:00 2001 From: rmotitsuki Date: Wed, 6 Dec 2023 18:49:32 -0300 Subject: [PATCH 01/14] Add eventBus for Kytos events --- ui/k-info-panel/list_connections.kytos | 2 +- ui/k-info-panel/show_circuit.kytos | 14 +++++++------- ui/k-toolbar/main.kytos | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ui/k-info-panel/list_connections.kytos b/ui/k-info-panel/list_connections.kytos index 2177c992..333e91f0 100644 --- a/ui/k-info-panel/list_connections.kytos +++ b/ui/k-info-panel/list_connections.kytos @@ -126,7 +126,7 @@ module.exports = { "title": "Circuit Details", "subtitle": "by kytos/mef_eline" } - this.$kytos.$emit("showInfoPanel", content); + this.$kytos.eventBus.$emit("showInfoPanel", content); }, forceRerender: function() { /** diff --git a/ui/k-info-panel/show_circuit.kytos b/ui/k-info-panel/show_circuit.kytos index 95bdadda..7629e017 100644 --- a/ui/k-info-panel/show_circuit.kytos +++ b/ui/k-info-panel/show_circuit.kytos @@ -365,7 +365,7 @@ module.exports = { title: "View Connections", subtitle: "by kytos/mef_eline" } - this.$kytos.$emit("showInfoPanel", listConnections); + this.$kytos.eventBus.$emit("showInfoPanel", listConnections); }, showModalDeleteEvc: function() { /** @@ -416,7 +416,7 @@ module.exports = { title: 'Error loading EVC.', description: "Request failed: " + textStatus } - _this.$kytos.$emit("setNotification" , notification); + _this.$kytos.eventBus.$emit("setNotification" , notification); }); }, deleteEVC: function() { @@ -439,7 +439,7 @@ module.exports = { title: 'Error deleting EVC.', description: "Request failed: " + textStatus } - _this.$kytos.$emit("setNotification" , notification); + _this.$kytos.eventBus.$emit("setNotification" , notification); }); }, load_topology(){ @@ -640,7 +640,7 @@ module.exports = { title: 'Error loading EVC names.', description: "Request failed: " + textStatus } - _this.$kytos.$emit("setNotification" , notification); + _this.$kytos.eventBus.$emit("setNotification" , notification); }); }, @@ -888,7 +888,7 @@ module.exports = { title: 'EVC id: ' + data[id].id + ' | name: ' + data[id].name + ' updated.', description: '' } - _this.$kytos.$emit("setNotification" , notification); + _this.$kytos.eventBus.$emit("setNotification" , notification); _this.loadEVC(_this.content.id); }); request.fail(function(data) { @@ -896,7 +896,7 @@ module.exports = { title: 'Update EVC failed', description: 'Error updating EVC ' + id +'. ' + data.responseJSON.description + parse_error } - _this.$kytos.$emit("setNotification" , notification); + _this.$kytos.eventBus.$emit("setNotification" , notification); }); }, }, @@ -945,7 +945,7 @@ module.exports = { }); }, created() { - // Check if the UI component k-input-auto exists +// Check if the UI component k-input-auto exists compexists = this.$root.$options.components['k-input-auto'] != null; }, destroyed() { diff --git a/ui/k-toolbar/main.kytos b/ui/k-toolbar/main.kytos index 8c8704ea..121d4461 100644 --- a/ui/k-toolbar/main.kytos +++ b/ui/k-toolbar/main.kytos @@ -419,7 +419,7 @@ module.exports = { }, 50); }, hideInfoPanel() { - this.$kytos.$emit("hideInfoPanel"); + this.$kytos.eventBus.$emit("hideInfoPanel"); }, showInfoPanel() { let listConnections = { @@ -429,7 +429,7 @@ module.exports = { title: "View Connections", subtitle: "by kytos/mef_eline" }; - this.$kytos.$emit("showInfoPanel", listConnections); + this.$kytos.eventBus.$emit("showInfoPanel", listConnections); }, set_default_values() { this.circuit_name = ""; @@ -461,7 +461,7 @@ module.exports = { description: 'Circuit with id: ' + data.circuit_id + ' | name: ' + this.circuit_name + ' was created.' } - this.$kytos.$emit("setNotification" , notification); + this.$kytos.eventBus.$emit("setNotification" , notification); // Clear fields if the POST is a success this.set_default_values(); }, @@ -472,7 +472,7 @@ module.exports = { description: data.responseJSON.description } - this.$kytos.$emit("setNotification" , notification); + this.$kytos.eventBus.$emit("setNotification" , notification); }, request_circuit () { var _this = this; @@ -615,13 +615,13 @@ module.exports = { this.fetch_dpids(); this.load_topology(); this.init_path_constraints(); - compexists = this.$root.$options.components['k-input-auto'] != null; +compexists = this.$root.$options.components['k-input-auto'] != null; // Close constraint accordion-item this.$refs.accordion_checked.forEach((item) => { item.checked = false; }); }, - created() { +created() { compexists = this.$root.$options.components['k-input-auto'] != null; } } From 4f6e140309254b5df6df6919d6efd163dbfeeb2f Mon Sep 17 00:00:00 2001 From: rmotitsuki Date: Wed, 6 Dec 2023 18:50:27 -0300 Subject: [PATCH 02/14] replace on_click for @click --- ui/k-info-panel/show_circuit.kytos | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/ui/k-info-panel/show_circuit.kytos b/ui/k-info-panel/show_circuit.kytos index 7629e017..c46d4163 100644 --- a/ui/k-info-panel/show_circuit.kytos +++ b/ui/k-info-panel/show_circuit.kytos @@ -3,17 +3,17 @@
- +
- +
- +
@@ -242,12 +242,11 @@
- -
- - - - +
+ + + +
-
+
From 24fb77a09b3b9803d79f1b51fe16f4f5da837633 Mon Sep 17 00:00:00 2001 From: rmotitsuki Date: Mon, 10 Jun 2024 16:21:04 -0300 Subject: [PATCH 14/14] Update CHANGELOG --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e9e259be..ea804e4e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,7 @@ Changed - Updated python environment installation from 3.9 to 3.11 - Updated test dependencies - Optimized ``Path.status`` not to depend on a HTTP request +- Upgraded UI framework to Vue3 [2023.2.0] - 2024-02-16 ***********************