Code Monkey home page Code Monkey logo

Comments (9)

holgerbrandl avatar holgerbrandl commented on July 18, 2024 2

Same problem with v7.0

from kibana-time-plugin.

RobinELM avatar RobinELM commented on July 18, 2024

Hello,

I encountered the same issue, apparently this is linked to the move from LESS to SASS implemented in 6.7 ( elastic/kibana#23413 ).
The ui/style/mixin.less has been replaced by _mixins.scss , I am not familiar with LESS / SASS and their processing. I tried to import the .scss instead of the .less file but the plugin is missing the right component to integrate it. It might require to move the whole plugin style to SASS as I am not sure if we can mix both =/

from kibana-time-plugin.

conmurray avatar conmurray commented on July 18, 2024

Thanks @RobinELM for that info. I had checked recently as well and encountered the same issue.
Is moving to SASS a big job?

from kibana-time-plugin.

andresbrandworkz avatar andresbrandworkz commented on July 18, 2024

Hello,

I also found the same issue with Kibana 7.0.0.
Any plans on adapting this plugin for the latest version?

 FATAL  Error: Optimizations failure.
   5643 modules
    
    ERROR in ./plugins/kibana-time-plugin/public/time.less
    Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
    ModuleBuildError: Module build failed (from ./node_modules/less-loader/dist/cjs.js):
    
    
    @import (reference) "~ui/styles/mixins.less";
    ^
    Can't resolve 'ui/styles/mixins.less' in '/home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/plugins/kibana-time-plugin/public'
          in /home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/plugins/kibana-time-plugin/public/time.less (line 1, column 0)
        at runLoaders (/home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/node_modules/webpack/lib/NormalModule.js:286:20)
        at /home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/node_modules/loader-runner/lib/LoaderRunner.js:364:11
        at /home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/node_modules/loader-runner/lib/LoaderRunner.js:230:18
        at context.callback (/home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
        at process._tickCallback (internal/process/next_tick.js:68:7)
    
    ERROR in ./plugins/kibana-time-plugin/public/timeController.js
    Module not found: Error: Can't resolve 'ui/timepicker/time_units' in '/home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/plugins/kibana-time-plugin/public'

Thanks.

from kibana-time-plugin.

andresbrandworkz avatar andresbrandworkz commented on July 18, 2024

Hello everybody,

I got the plugin working on Kibana v7.0.1 with some small modifications.

Screenshot from 2019-05-02 16-40-03

time.less
I changed the path to the mixins.less file. It seems they've placed a legacy folder aside with old files.

@import (reference) "../../../src/legacy/ui/public/styles/bootstrap/mixins.less";

Also, I removed two occurrences of .flex-parent(); because it was making the plugin not compile.
(Not sure why those were needed before, though).

timeController.js
time_units is no longer available. So I removed the import and assigned the constant directly.

// ...
  $scope.units = {
    s: 'second',
    m: 'minute',
    h: 'hour',
    d: 'day',
    w: 'week',
    M: 'month',
    y: 'year'
  };
// ...

It seems to be working, and even synchronising with the new super date picker Kibana is using now.
But can anyone advise about how dodgy this workaround is, please?

Thanks.

from kibana-time-plugin.

nreese avatar nreese commented on July 18, 2024

Looks good. Would you mind putting together a PR?

from kibana-time-plugin.

andresbrandworkz avatar andresbrandworkz commented on July 18, 2024

Hello,
I have just done it.
#55

from kibana-time-plugin.

SiwyDym avatar SiwyDym commented on July 18, 2024

Fix in PR

from kibana-time-plugin.

nreese avatar nreese commented on July 18, 2024

closed by #56

from kibana-time-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.