GithubHelp home page GithubHelp logo

alsiola / pm2-explorer Goto Github PK

View Code? Open in Web Editor NEW
80.0 4.0 4.0 359 KB

Manage PM2 from within VSCode

Home Page: https://marketplace.visualstudio.com/items?itemName=alex-young.pm2-explorer

License: MIT License

TypeScript 100.00%
vscode vscode-extension pm2

pm2-explorer's Introduction

Build Status

PM2 Explorer README

View and interact with currently running PM2 processes within VSCode. This extension can be installed from within VSCode by searching for pm2 in the extensions view, or via the Visual Studio Marketplace

Features

Adds a PM2 Explorer view that lists current PM2 processes and important details about them. The list is updated at a configurable interval (default 1000ms).

Allows interaction with individual running processes:

  • Start
  • Stop
  • Restart
  • View Logs (in integrated terminal)

And with all running processes:

  • Reload all
  • View all logs
  • Start all processes
  • Stop all processes

Requirements

PM2 should be installed globally on your machine.

Extension Settings

The following configuration settings are provided by PM2 explorer:

// How frequently (in milliseconds) should the process list update
"pm2Explorer.refreshIntervalMs": 1000

Known Issues

No known issues

Release Notes

0.0.7

  • Fix commands when tasks have whitespace
  • Dependency vulnerability updates

0.0.6

  • Restore accidentally removed container icon

0.0.5

  • Re-publish broken CI deployment

0.0.4

  • Improved process icons
  • Configurable refresh interval
  • Added start all and stop all commands
  • Refactor and re-organisation

0.0.3

  • Visual representation of process state

0.0.2

  • Fix errors in readme
  • Add logo

0.0.1

  • Initial release of PM2 Explorer

pm2-explorer's People

Contributors

alsiola avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pm2-explorer's Issues

Fixing process uptime

convert from ms to h:m:s
by get time now - process uptime
and then use this for convert to h:m:s

function msToTime(s) {
    
    function pad(n, z) {
        z = z || 2;
        return ('00' + n).slice(-z);
    }

    var ms = s % 1000;
    s = (s - ms) / 1000;
    var secs = s % 60;
    s = (s - secs) / 60;
    var mins = s % 60;
    var hrs = (s - mins) / 60;

    return pad(hrs) + ':' + pad(mins) + ':' + pad(secs);
}

from this
image
to this
image

*i fix it on my computer but i don't know the code ts sory :<
my fix file
pm2-explorer.zip

CI/Automation

Setup builds for develop and master branches.

  • develop - dry run test/build, no publish
  • master - test/build/publish

Test/build PRs

Configurable display

Configurable display of data points (id, status, uptime, instances, memory, cpu, mode, unstable restarts etc.) - Let the users choose what they want to see but provide defaults.

Improve testing

Add some unit tests around key parts of the extension, with some integration/e2e tests where possible.

Create Contributing Guidelines

This should include instructions on how to run the extension locally in development, the branching strategy used by the project, how to raise issues etc.

It can included a basic code of conduct.

Add logs options

Add options to delete, flush logs for a process and same for global actions

Make uptime human readable

Uptime should be shown in a human readable form rather than in milliseconds, e.g.

10 seconds
5 minutes
3 days

Refactoring and testing

Currently the code is functional but there poorly structured. The PM2 classes are responsible for both interacting with PM2 and displaying views - poor separation of concerns. There are several easy wins here, but it is also worth looking at other VSCode extensions and following any established conventions around program structure to make future collaboration easier.

There are currently no unit tests. These should probably focus on ensuring we correctly handle error conditions when PM2 is inaccessible or responds unexpectedly.

Get some nicer icons

There are currently icons that reflect the process state - online, stopped, errored and starting. They are not visually appealing, and do not follow a common theme.

Internationalisation

Ensure that all static strings are extracted, with a mechanism to change the currently displayed language.

Consider what languages should initially be supported, and how to get translations (ask for help, machine translations)

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.