Skip to content

Commit 4b7cbbc

Browse files
committed
V1.1.5
- Fix critical bug when emitting global event bus - Add Exit DenoMan button - Enhanced terminal tab
1 parent 54aec4a commit 4b7cbbc

File tree

10 files changed

+182
-76
lines changed

10 files changed

+182
-76
lines changed

q-manui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "q-manui",
3-
"version": "1.1.4",
4-
"description": "DenoMan 1.1.4",
3+
"version": "1.1.5",
4+
"description": "DenoMan 1.1.5",
55
"productName": "DenoMan",
66
"author": "Sameh Fakoua <s.fakoua@gmail.com>",
77
"private": true,

q-manui/src/components/ServerComponent.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,22 +199,21 @@ export default defineComponent({
199199
},
200200
},
201201
202-
setup() {
202+
setup(props) {
203203
const doubleClickedService = ref<ServiceModel | undefined>(undefined);
204204
const selectedService = ref<ServiceModel | undefined>(undefined);
205205
const isDialogOpen = ref(false);
206206
const serviceWindow = ref<HTMLDialogElement | null>(null);
207207
208208
onMounted(async () => {
209-
bus.on('controlService', async () => {
209+
bus.on(`${props.host.hostname}:controlService`, async () => {
210210
if (isDialogOpen.value) {
211-
//(serviceWindow.value as HTMLDialogElement).close();
212211
if (serviceWindow.value) {
213212
serviceWindow.value.close();
214213
}
215214
}
216215
});
217-
bus.on('serviceChanged', (service) => {
216+
bus.on(`${props.host.hostname}:serviceChanged`, (service) => {
218217
selectedService.value = service;
219218
if (isDialogOpen.value) {
220219
doubleClickedService.value = service;

q-manui/src/components/performance/PerfmonComponent.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272

7373
<script lang="ts">
7474
import { PropType, defineComponent, onMounted, onUnmounted, ref } from 'vue';
75+
import { bus } from 'boot/bus';
76+
7577
import CpuComponent from './CpuComponent.vue';
7678
import MemoryComponent from './MemoryComponent.vue';
7779
import DiskComponent from './DiskComponent.vue';
@@ -139,6 +141,12 @@ export default defineComponent({
139141
onMounted(async () => {
140142
systemInfo.value = await loadSystem();
141143
await updateData();
144+
bus.on('app:shutdown', () => {
145+
if (timeoutId !== -1) {
146+
runTimer = false;
147+
window.clearTimeout(timeoutId);
148+
}
149+
});
142150
});
143151
144152
onUnmounted(() => {

q-manui/src/components/service-window/GeneralTabComponent.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ div.footer {
115115
import { PropType, defineComponent } from 'vue';
116116
import { bus } from 'boot/bus';
117117
118-
import { ControlAction, ServiceModel } from '../models';
118+
import { ControlAction, ServiceModel, WinRMPayload } from '../models';
119119
120120
export default defineComponent({
121121
name: 'GeneralTabComponent',
@@ -125,11 +125,15 @@ export default defineComponent({
125125
type: Object as PropType<ServiceModel>,
126126
required: false,
127127
},
128+
host: {
129+
type: Object as PropType<WinRMPayload>,
130+
required: true,
131+
},
128132
},
129133
130134
methods: {
131135
async controlService(action: ControlAction) {
132-
bus.emit('controlService', {
136+
bus.emit(`${this.host.hostname}:controlService`, {
133137
action: action,
134138
name: this.service?.name,
135139
});

q-manui/src/components/service-window/ServiceDetailsComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export default defineComponent({
190190
this.$emit('onOpenService', this.service);
191191
},
192192
async controlService(action: ControlAction) {
193-
bus.emit('controlService', {
193+
bus.emit(`${this.host.hostname}:controlService`, {
194194
action: action,
195195
name: this.service?.name,
196196
});

q-manui/src/components/service-window/ServiceWindowComponent.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<q-tab-panel name="general">
2323
<general-tab-component
2424
:service="service"
25+
:host="host"
2526
v-on:on-hide-dialog="$emit('onHideDialog')"
2627
v-on:on-show-dialog="
2728
(svr) => {

q-manui/src/components/service-window/ServicesListComponent.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ export default defineComponent({
438438
},
439439
controlService(action: ControlAction) {
440440
if (this.selected && this.selected.length > 0) {
441-
bus.emit('controlService', {
441+
bus.emit(`${this.host.hostname}:controlService`, {
442442
action: action,
443443
name: (this.selected[0] as ServiceModel).name,
444444
});
@@ -544,15 +544,15 @@ export default defineComponent({
544544
isLoading.value = false;
545545
546546
// eslint-disable-next-line @typescript-eslint/no-explicit-any
547-
bus.on('controlService', async (action: any) => {
547+
bus.on(`${props.host.hostname}:controlService`, async (action: any) => {
548548
$q.loading.show();
549549
const res = await serviceApi.controlService(
550550
props.host,
551551
action.action,
552552
action.name,
553553
);
554554
await loadServices();
555-
bus.emit('serviceChanged', res);
555+
bus.emit(`${props.host.hostname}:serviceChanged`, res);
556556
if (res) {
557557
setDisabledControls(res);
558558
}

0 commit comments

Comments
 (0)