Giter Site home page Giter Site logo

naraesk / plasma-docker Goto Github PK

View Code? Open in Web Editor NEW
43.0 43.0 4.0 198 KB

Plasmoid for KDE Plasma to control docker containers

Home Page: https://store.kde.org/p/1198473/

License: GNU General Public License v3.0

CMake 3.90% QML 55.20% C++ 24.82% Shell 0.76% JavaScript 15.32%
container convenience docker docker-compose kde plasma podman

plasma-docker's People

Contributors

blquinn avatar naraesk 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

Watchers

 avatar  avatar  avatar

plasma-docker's Issues

Stacks are getting lost after plasma restart / relog

It may be an issue with the installation but after I add a stack, each time I restart plasma or relog /reboot, all the containers disappear from the widgets's list.

I tried installing the aur package and also building the package as documented. The behaivour is the same in both cases.

Failure on install

Hi, can you please provide all the components for a good install.

I've this error on the Cmake :

CMake Error at /usr/local/share/ECM/modules/ECMQueryQmake.cmake:30 (message):
No qmake Qt5 binary found. Can't check QT_INSTALL_PLUGINS as required
Call Stack (most recent call first):
/usr/local/share/ECM/kde-modules/KDEInstallDirs.cmake:473 (query_qmake)
CMakeLists.txt:11 (include)

Add support for new docker-compose

I have not found the exact version since when this behaviour started, but in the latest releases of docker-compose the command ps --services no longer returns all services, it is necessary to add --all to the command, e.g. with the patch:

--- plasma-docker-2.2.0.orig/process/process.cpp        2020-03-06 23:07:42.000000000 +0100
+++ plasma-docker-2.2.0/process/process.cpp     2023-01-02 10:56:54.637723966 +0100
@@ -55,7 +55,7 @@
 
 QStringList Process::getServices(const QString &file) {
     QStringList arguments;
-    arguments << "ps" << "--services";
+    arguments << "ps" << "--services" << "--all";
     runDockerCompose(file, arguments);
     waitForFinished();
     QString composeOutput(readAllStandardOutput());

Instaled but not visible

I install widget from plasma install, kubuntu 18.04
any error but its not visible in widget lists

obraz

obraz

Podman support

You may want to try Podman as an alternative to Docker and eventually support it. Podman is currently adding new API for compatibility with Docker and docker-compose: https://podman.io/blogs/2020/01/17/podman-new-api.html

If you didn't know Podman I suggest you to check it since it has many advantages compared to Docker while keeping much compatibility as possible.

It can not open file after clicking edit file

But the Edit file icon is invisible in the widget.
If you click this icon of Edit file, then it shows the error-dialog:

Malformed URL
/home/zesko/Documents/test.yml

Operating System: Manjaro Linux
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Kernel Version: 5.4.131-1-MANJARO (64-bit)
Graphics Platform: X11

Can't see docker images

Hi!!

I'm having trouble to see my docker images inside plasmoid although I already add a docker-compose file.

plasma-docker_1
plasma-docker_2

I don't know what else I'm missing.

This is my System Information:

  • Operating System: KDE neon 5.18
  • KDE Plasma Version: 5.18.3
  • KDE Frameworks Version: 5.68.0
  • Qt Version: 5.14.1
  • Kernel Version: 5.3.0-42-generic
  • OS Type: 64-bit
  • Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
  • Memory: 15.3 GiB of RAM

Please contact me if you need more info.

Thanks in advance!!

Use library / language bindings

Currently, the program uses the docker cli to talk to docker. This has some disadvantages, e.g., we have to run docker ps once for every container at startup. This is rather slow and causes a delay, which is noticeable when managing more than 10 containers. Instead, we should use some library or language bindings and directly talk to docker daemon .

Install errors

OS: Kubuntu 18.04

This is the cmake command from README.md.:

cmake -DCMAKE_INSTALL_PREFIX=`kf5-config --install-prefix` -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_LIBDIR=lib -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ../

It results in an empty string for the install prefix because --install-prefix is not a valid option for kf5-config. This is what happens as a result:

$ make install
[ 16%] Built target eu.naraesk.docker-control-plasmoids-metadata-json
[ 33%] Automatic MOC for target plasmoidplugin
[ 33%] Built target plasmoidplugin_autogen
[100%] Built target plasmoidplugin
Install the project...
-- Install configuration: "Release"
-- Installing: /share/plasma/plasmoids/eu.naraesk.docker-control
CMake Error at cmake_install.cmake:41 (file):
  file INSTALL cannot make directory
  "/share/plasma/plasmoids/eu.naraesk.docker-control": No such file or
  directory


Makefile:117: recipe for target 'install' failed
make: *** [install] Error 1

I couldn't figure out the option/argument for kf5-config to get the correct install prefix, so I hardcoded it:

$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_LIBDIR=lib -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ../

This caused the plasmoid to be installed in the correct location. However, it tries to install some stuff in a location that requires root access. Is this avoidable?

$ make install
[ 20%] Automatic MOC for target plasmoidplugin
[ 20%] Built target plasmoidplugin_autogen
[100%] Built target plasmoidplugin
Install the project...
-- Install configuration: "Release"
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/metadata.desktop
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/main.qml
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/config
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/config/Config.qml
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/StackRow.qml
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Header.qml
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/img
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/img/dockerlogo.png
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/config
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/config/config.qml
-- Installing: /home/name/.local/share/plasma/plasmoids/eu.naraesk.docker-control/contents/config/main.xml
-- Installing: /home/name/.local/share/metainfo/eu.naraesk.docker-control.appdata.xml
-- Installing: /home/name/.local/share/kservices5/plasma-applet-eu.naraesk.docker-control.desktop
CMake Error at process/cmake_install.cmake:55 (file):
  file cannot create directory:
  /usr/lib/x86_64-linux-gnu/qt5/qml/eu/naraesk/docker/process.  Maybe need
  administrative privileges.
Call Stack (most recent call first):
  cmake_install.cmake:54 (include)


Makefile:117: recipe for target 'install' failed
make: *** [install] Error 1

Support for remote hosts

You can access docker remotely as described here. This would allow the plasmoid to manage containers on a server or vm. Should be easy to add.

Can't find the widget after `sudo make install` and restarting plasma

I am running several plasmoids, including a the syncthing plasmoid that I compiled from source.

image

kf5-config --prefix

Output is: /usr

It looks like the problem for me is that running sudo make install moved most of the files into /share (literally at the root) rather than /usr/share.

I don't think I've ever seen that before...

See output of `sudo make install`
❯  sudo make install
[ 16%] Built target eu.naraesk.docker-control-plasmoids-metadata-json
[ 33%] Automatic MOC for target plasmoidplugin
[ 33%] Built target plasmoidplugin_autogen
[100%] Built target plasmoidplugin
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/metadata.desktop
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/images
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/images/icon
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/config
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/config/main.xml
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/config/config.qml
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/config
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/config/Config.qml
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/main.qml
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Service
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Service/ServiceDelegate.qml
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Service/service.js
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/FullRepresentation.qml
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Stack
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Stack/stack.js
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Stack/StackDelegate.qml
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/CompactRepresentation.qml
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/model.js
-- Up-to-date: /share/plasma/plasmoids/eu.naraesk.docker-control/metadata.json
-- Up-to-date: /share/metainfo/eu.naraesk.docker-control.appdata.xml
-- Up-to-date: /share/kservices5/plasma-applet-eu.naraesk.docker-control.desktop
-- Up-to-date: /usr/lib/qt5/qml/eu/naraesk/docker/process/libplasmoidplugin.so
-- Up-to-date: /usr/lib/qt5/qml/eu/naraesk/docker/process/qmldir
see output of `find /share`
❯ find /share         
/share
/share/kservices5
/share/kservices5/plasma-applet-eu.naraesk.docker-control.desktop
/share/metainfo
/share/metainfo/eu.naraesk.docker-control.appdata.xml
/share/plasma
/share/plasma/plasmoids
/share/plasma/plasmoids/eu.naraesk.docker-control
/share/plasma/plasmoids/eu.naraesk.docker-control/contents
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Service
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Service/ServiceDelegate.qml
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Service/service.js
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/FullRepresentation.qml
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/CompactRepresentation.qml
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/config
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/config/Config.qml
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/main.qml
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Stack
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Stack/stack.js
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/Stack/StackDelegate.qml
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/ui/model.js
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/config
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/config/config.qml
/share/plasma/plasmoids/eu.naraesk.docker-control/contents/config/main.xml
/share/plasma/plasmoids/eu.naraesk.docker-control/metadata.json
/share/plasma/plasmoids/eu.naraesk.docker-control/images
/share/plasma/plasmoids/eu.naraesk.docker-control/images/icon
/share/plasma/plasmoids/eu.naraesk.docker-control/metadata.desktop
output of `/etc/os-release`
❯ cat /etc/os-release  
NAME="Void"
ID="void"
PRETTY_NAME="Void Linux"
HOME_URL="https://voidlinux.org/"
DOCUMENTATION_URL="https://docs.voidlinux.org/"
LOGO="void-logo"
ANSI_COLOR="0;38;2;71;128;97"

DISTRIB_ID="void"

Meanwhile other plasmoids for me are in under /usr/share, like /usr/share/plasma/plasmoids/martchus.syncthingplasmoid

I don't see some place in CMakeLists.txt that appears to obviously be setting this incorrectly for me... Any ideas?

Icons missing

I tried every installation method, even building from latest source. Somehow my icons are always missing. The buttons are there and do work, but without any icon.

image

Any clue?

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.