Skip to content

Commit

Permalink
[fix] precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafabarmshory committed Oct 2, 2024
1 parent 6e3fbaa commit 57fbbb0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/* @odoo-module */
/* global vis */

import {_t} from "@web/core/l10n/translation";
import {Component, onWillStart, onMounted, useRef, useState} from "@odoo/owl";
import {Component, onMounted, onWillStart, useRef, useState} from "@odoo/owl";
import {loadCSS, loadJS} from "@web/core/assets";

import {_t} from "@web/core/l10n/translation";
import {registry} from "@web/core/registry";
import {standardFieldProps} from "@web/views/fields/standard_field_props";
import {useService} from "@web/core/utils/hooks";
import {useRecordObserver} from "@web/model/relational_model/utils";
import {useService} from "@web/core/utils/hooks";

export class JobDirectGraph extends Component {
setup() {
Expand All @@ -18,7 +19,6 @@ export class JobDirectGraph extends Component {
this.network = null;
this.state = useState({});


onWillStart(async () => {
await loadJS("/queue_job/static/lib/vis/vis-network.min.js");
loadCSS("/queue_job/static/lib/vis/vis-network.min.css");
Expand Down Expand Up @@ -59,13 +59,13 @@ export class JobDirectGraph extends Component {
this.$el.empty();
}

let nodes = (this.state.value.nodes || []).map((node) => {
const nodes = (this.state.value.nodes || []).map((node) => {
node.title = this.htmlTitle(node.title || "");
node.label = _t("Job %(id)s", {'id': node.id});
node.label = _t("Job %(id)s", {id: node.id});
return node;
});

let edges = (this.state.value.edges || []).map((edge) => {
const edges = (this.state.value.edges || []).map((edge) => {
const edgeFrom = edge[0];
const edgeTo = edge[1];
return {
Expand Down Expand Up @@ -98,9 +98,9 @@ export class JobDirectGraph extends Component {
// job selected
network.selectNodes([this.resId]);
});
network.on("click", (params) => {
network.on("click", (params) => {
if (params.nodes.length > 0) {
let resId = params.nodes[0];
const resId = params.nodes[0];
if (resId !== this.resId) {
this.openDependencyJob(resId);
}
Expand Down
2 changes: 1 addition & 1 deletion queue_job/views/queue_job_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</group>
<group>
<group>
<field name="id" invisible="True"/>
<field name="id" invisible="True" />
<field name="priority" />
<field name="eta" />
<field
Expand Down

0 comments on commit 57fbbb0

Please sign in to comment.