CockpitQL icon indicating copy to clipboard operation
CockpitQL copied to clipboard

How to use Graphql in cockpit

Open praveenkumarsomu opened this issue 5 years ago • 4 comments

I've gone through the link https://github.com/agentejo/CockpitQL I'm not sure where to place the GraphQL folder and what to modify in my cockpit project.

praveenkumarsomu avatar Apr 10 '19 02:04 praveenkumarsomu

Hello Praveen! Since Cockpit 0.9.1, there is an undocumented - I guess highly experimental - CLI command called install/addon which you can use as follows:

./cp install/addon --name CockpitQL

In case you're working with an older version of Cockpit you can still add it manually. Download the repository and add it as a subfolder to your /addons directory. Either way, your final tree should look as follows:

fedeTibaldo@my-pc:/var/www/cockpit.com/public_html$ tree -d -L 2 -n
.
├── addons
│   └── CockpitQL
...

fedetibaldo avatar Jul 17 '19 19:07 fedetibaldo

I used the CLI command, following the install instructions.

However, the package cannot be downloaded:

Installing addon <CockpitQL>...
Couldn't download https://github.com/agentejo/CockpitQL/archive/master.zip!

yakou32 avatar Sep 12 '19 09:09 yakou32

That's strange.

I was able to reproduce it only by switching off my internet connection. If the problem were user privilege, it would fail way earlier, yielding a Couldn't create tmp folder /path/to/cockpit/folder/storage/tmp/CockpitQL error. No other reasons come to my mind at the moment.

I'd advise you to follow the manual installation then.

fedetibaldo avatar Sep 12 '19 19:09 fedetibaldo

Thanks!

Maybe is there an incompatibility of the requirements of this CLI command with my shared hosting features.

Indeed I downloaded the archive manually and extracted it to the addons folder, so that the path to CockpitQL is /addons/CockpitQL/.

It's working fine that way

yakou32 avatar Sep 14 '19 06:09 yakou32