Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4E6FB200C16 for ; Thu, 9 Feb 2017 15:18:31 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4D06C160B50; Thu, 9 Feb 2017 14:18:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9462F160B4C for ; Thu, 9 Feb 2017 15:18:30 +0100 (CET) Received: (qmail 53996 invoked by uid 500); 9 Feb 2017 14:18:29 -0000 Mailing-List: contact dev-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list dev@nifi.apache.org Received: (qmail 53984 invoked by uid 99); 9 Feb 2017 14:18:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2017 14:18:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id CDC92C14BD for ; Thu, 9 Feb 2017 14:18:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.38 X-Spam-Level: X-Spam-Status: No, score=0.38 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id QBDweqhFl3Oh for ; Thu, 9 Feb 2017 14:18:26 +0000 (UTC) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 2FCC05FC67 for ; Thu, 9 Feb 2017 14:18:26 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id 196so58206326wmm.1 for ; Thu, 09 Feb 2017 06:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=cALeojRXDK8jNVho2bN4C7kuFMPH06rDdrtLNbtVtos=; b=LKp2Hhaf6QVN5c2tV5b7Z2fyB3WYSLOWr5eWPbTD7Du+NuyBPTYKasvXPMzbOYStZl XYtERYfC43ptJAOxYBiFpnhSVd0sN+7pxYqsvSqbQkjnmAuRJZ4N74z+YY2e1fihriPu CaQSrMGWyLAeVNaUINqOy9kBeaLh3mszc+3CA6odGJnvwb9K6M7l+rzJDNrJo7D+F7pQ OxjryJVa5RLJHiybeulYZuziphMV8iwQKh1dtp1Vs+egMC32gMhOFFTw9PWpGdvqQtPA w/cv5xbmDJk5LumeXQQdRROtRuMpXx9qE4/Xz4LdmNBemIG9dsiG2r14Ks1EQfie6Uop MzWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=cALeojRXDK8jNVho2bN4C7kuFMPH06rDdrtLNbtVtos=; b=ifTTUedeolJqeJxH4C7o6IKuVN2h8zP/u9ClkG+wT67z25gAlNhnqlFk8PHjPtoeZj 6jfZ4VGspGbJegtGoDQtbOssF+ma9G4ewDq9NwTKxekuNV5+ITEGMhynoI4LStiWlFhZ LpC+W+nWlTfDY/8m6OkyzG7Z0r+BzKnX5qDa99TYkUGzP2eKb9X0oQSr2zVh5P+qWUju Thtr9hTiSgVTis94Wh7o6U1+2MgHhBpFTONHmRT8zGTExED7CPbttymoLqJQCsp+XuaA 8Nma7N2SrsEdAoyvqiNZUYXx6RUDWbnyrFKfQAnMc59TWPOQMZZxH/pmNmEujJvl1f1j YgDg== X-Gm-Message-State: AMke39lLtJ2YzJTSug3TdYHgAFcEIka41lRlyb7cDWY24amEpMEpe/7/cDOTrTlZaE1keFbz+7KT8rPOER05wA== X-Received: by 10.223.145.227 with SMTP id 90mr3239487wri.156.1486649895119; Thu, 09 Feb 2017 06:18:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.164.201 with HTTP; Thu, 9 Feb 2017 06:18:14 -0800 (PST) In-Reply-To: References: From: Koji Kawamura Date: Thu, 9 Feb 2017 23:18:14 +0900 Message-ID: Subject: Re: Custom color for processors. To: dev@nifi.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Thu, 09 Feb 2017 14:18:31 -0000 Hello Alessio, I am not an expert of NiFi UI, but tried to find where to customize to apply a default color. Here is the Javascript function that creates new Processor instance by sending a REST request to NiFi Web API: https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-processor-component.js#L201 The processEntity object in the JS will be mapped to this DTO class in NiFi server: https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ProcessorDTO.java#L35 Current JS code doesn't specify any style, but if you add following style property in the object, I think you can get what you'd like to: 'component': { 'type': processorType, 'name': name, 'position': { 'x': pt.x, 'y': pt.y }, 'style': {background-color: "#853333"} } And you can embed color mapping to processorType, perhaps. Hope this helps, Koji On Mon, Feb 6, 2017 at 5:01 PM, Alessio Palma wrote: > Hello all, > It's fact that each processor can be coloured; there is a way to set a custom default color? > What we need is to add a map into nifi configuration so that when a processor is moved into the workbench it already has its own colour. > > So the question is how much complex is add this feature to nifi and where I should look to make the changes. > > Thanks in advance. > > AP > >