Skip to content

Commit

Permalink
Links configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Weber committed Nov 20, 2018
1 parent 4171dcb commit 4b421c8
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 172 deletions.
58 changes: 3 additions & 55 deletions api/login/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function buildDock($context,$session) {
"uuid" => "about",
"image"=> "/assets/flatjoy-circle-deviantart/Apple.png",
"title"=> "Présentation",
"text"=> "Bienvenue, sur l\'interface de gestion de Bureau virtuel. N\'oubliez pas de changer les url d\'iframe et de configurer vos propres icones",
"text"=> "Welcome on OMV WebDesk, Please remember to configure your own 'Links' on the plugin page.",
"opened"=> false,
"selected"=> false,
"ref"=> null
Expand All @@ -147,60 +147,8 @@ function buildDock($context,$session) {
"iframe"=> "/elfinder/elfinder.html",
"title"=> "Finder"
]
],
$session->getUsername() => $prep
], JSON_PRETTY_PRINT );

/*return '{
"username": [
{
"id": "about",
"image": "/assets/flatjoy-circle-deviantart/Apple.png",
"title": "Présentation",
"text": " TEST with your username",
"opened": false,
"selected": false,
"ref": null
}
],
"default" : [
{
"id": "about",
"image": "/assets/flatjoy-circle-deviantart/Apple.png",
"title": "Présentation",
"text": "Bienvenue, sur l\'interface de gestion de Bureau virtuel. N\'oubliez pas de changer les url d\'iframe et de configurer vos propres icones",
"opened": false,
"selected": false,
"ref": null
},
{
"id": "elfinder",
"image": "/assets/flatjoy-circle-deviantart/Folder%20Files.png",
"iframe": "/elfinder/elfinder.html",
"title": "Finder"
},
{
"id": "omv",
"image": "/assets/flatjoy-circle-deviantart/Chip.png",
"iframe": "http://your-omv-ip/",
"title": "OpenMediaVault",
"opened": false,
"selected": false,
"ref": null
},
{
"id": "network",
"image": "/assets/flatjoy-circle-deviantart/Devices.png",
"iframe": "http://your-router",
"title": "Réseau"
},
{
"id": "sickrage",
"image": "/assets/flatjoy-circle-deviantart/Cone.png",
"iframe": "http://your-sickrage-install/",
"title": "SickRage"
}
]
}';*/
$session->getUsername() => $prep
], JSON_PRETTY_PRINT );
};

12 changes: 0 additions & 12 deletions elfinder-dist/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion openmediavault-webdesk/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openmediavault-webdesk (0.2.0) UNRELEASED; urgency=low

* Add Links support, and background personnalization

-- Antoine Weber <[email protected]> Mon, 15 Nov 2018 14:40:10 -0500
-- Antoine Weber <[email protected]> Thu, 15 Nov 2018 14:40:10 -0500

openmediavault-webdesk (0.1.0) UNRELEASED; urgency=low

Expand Down
5 changes: 3 additions & 2 deletions openmediavault-webdesk/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ XB-Plugin-Section: multimedia
Priority: optional
Maintainer: Antoine Weber <[email protected]>
Build-Depends: debhelper (>= 9.0.0 )
Standards-Version: 3.9.6
Standards-Version: 4.1.4

Package: openmediavault-webdesk
Architecture: all
Depends: nginx,
openmediavault (>= 4.0.4),
php-fpm,
${misc:Depends}
Description: OMV Web Desk, is a project to add a public "front" part to an OpenMediaVault server. It will consist of a web app using OMV's config, to show some easy functionnality to your users. It will be based on user and folder sharing defined in the OMV administration UI.
Description: add front part to an OpenMediaVault server.
The project consist of a web app using OMV's config, to show some easy functionnality to your users. It is based on user and folder sharing defined in the OMV administration UI.
1 change: 0 additions & 1 deletion openmediavault-webdesk/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ License: GPL-3
Files: /var/www/openmediavault/images/desk-lamp.png
/var/www/openmediavault/images/desk-lamp.svg
Copyright: FlatIcon <https://www.flaticon.com/>
FlatIcon <https://www.flaticon.com/>
12 changes: 2 additions & 10 deletions openmediavault-webdesk/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,13 @@ case "$1" in
usermod -a -G openmediavault-webgui $USERNAME
fi

# Initialize and migrate configuration database.
echo "Updating configuration database ..."
omv-confdbadm create "conf.service.webdesk"
if [ -n "$2" ]; then
omv-confdbadm migrate "conf.service.webdesk" "${2}"
fi

# make config file
#omv-mkconf webdesk


# Activate package triggers. These triggers are only set during the
# package installation.
dpkg-trigger update-fixperms
dpkg-trigger update-locale
dpkg-trigger --by-package openmediavault-webdesk update-fixperms
dpkg-trigger --by-package openmediavault-webdesk update-locale
;;

abort-upgrade|abort-remove|abort-deconfigure)
Expand Down
13 changes: 9 additions & 4 deletions openmediavault-webdesk/refresh-with-package.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/bash

docker-compose stop
docker-compose rm -f
docker-compose -f docker-compose-empty.yml up -d
echo "Suppression des anciens containers..."

docker-compose -f docker-compose-empty.yml stop
docker-compose -f docker-compose-empty.yml rm -f

docker exec -t "omv" bash -c "dpkg -i openmediavault-webdesk_*_all.deb"
echo "Démarrage de OMV..."

docker-compose -f docker-compose-empty.yml up -d

echo "Attente du container OMV..."
until nc -z $(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' omv) 80
Expand All @@ -14,6 +16,9 @@ do
done
echo "OK"

echo "Installation du package .deb"
docker exec -t "omv" bash -c "dpkg -i /var/www/test/openmediavault-webdesk_*_all.deb"

PORT=`docker inspect -f '{{json .NetworkSettings.Ports}}' omv | sed -e 's/.*"80\/tcp[^}]*HostPort":"//g' | sed -e 's/".*//g'`

echo -e "\033[32m"
Expand Down
10 changes: 8 additions & 2 deletions openmediavault-webdesk/refresh.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/bash

echo "Suppression des anciens containers..."

docker-compose stop
docker-compose rm -f
docker-compose up -d

docker exec -t "omv" bash -c "/bin/sh postinst configure"
echo "Démarrage de OMV..."

docker-compose up -d

echo "Attente du container OMV..."
until nc -z $(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' omv) 80
Expand All @@ -14,6 +16,10 @@ do
done
echo "OK"

echo "Configuration de OMV..."

docker exec -t "omv" bash -c "/bin/sh postinst configure"

PORT=`docker inspect -f '{{json .NetworkSettings.Ports}}' omv | sed -e 's/.*"80\/tcp[^}]*HostPort":"//g' | sed -e 's/".*//g'`

echo -e "\033[32m"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"type": "config",
"id": "conf.service.webdesk",
"title": "WebDesk",
"queryinfo": {
"xpath": "//services/webdesk",
"iterable": false
},
"properties": {
"enable": {
"type": "boolean",
"default": 0
},
"name": {
"type": "string",
"default": "WebDesk for OpenMediaVault"
},
"port": {
"type": "integer",
"minimum": 1,
"maximum": 65535,
"default": 8200
"type": "config",
"id": "conf.service.webdesk",
"title": "WebDesk",
"queryinfo": {
"xpath": "//services/webdesk",
"iterable": false
},
"properties": {
"enable": {
"type": "boolean",
"default": 0
},
"name": {
"type": "string",
"default": "WebDesk for OpenMediaVault"
},
"port": {
"type": "integer",
"minimum": 1,
"maximum": 65535,
"default": 8200
},
"desktop_background": {
"type": "string",
"default": "/assets/img/bg.jpg"
},
"type": "string",
"default": "/assets/img/bg.jpg"
},
"login_background": {
"type": "string",
"default": "http://i.imgur.com/W8IdvVk.jpg"
Expand All @@ -33,33 +33,33 @@
"type": "string",
"default": "https://pbs.twimg.com/profile_images/1453596088/dessin_antoine_400x400.png"
},
"links": {
"type": "object",
"properties": {
"link": {
"type": "array",
"items": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"link": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string"
},
"type": "string"
},
"image": {
"type": "string"
},
"type": "string"
},
"title": {
"type": "string"
},
"type": "string"
},
"text": {
"type": "string"
},
"type": "string"
},
"iframe": {
"type": "string"
}
}
}
}
}
}
}
"type": "string"
}
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"type": "config",
"id": "conf.service.webdesk.link",
"title": "WebDesk Links",
"queryinfo": {
"xpath": "//services/webdesk/links/link",
"iterable": true,
"idproperty": "uuid"
},
"properties": {
"type": "config",
"id": "conf.service.webdesk.link",
"title": "WebDesk Links",
"queryinfo": {
"xpath": "//services/webdesk/links/link",
"iterable": true,
"idproperty": "uuid"
},
"properties": {
"uuid": {
"type": "string"
},
Expand Down
Loading

0 comments on commit 4b421c8

Please sign in to comment.