diff --git a/.gitignore b/.gitignore index 722d5e7..97f2204 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,13 @@ +# IDE .vscode + +# deb packaging +debian/cockpit-navigator +debian/cockpit-navigator.substvars +debian/cockpit-navigator.postrm.debhelper +debian/debhelper-build-stamp +debian/files +debian/.debhelper + +# build output +dist \ No newline at end of file diff --git a/README.md b/README.md index 0bef81f..cc9054d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,59 @@ # Cockpit Navigator -A File System Browser for Cockpit. +A File System Browser for Cockpit. + +## Features +With no command line use needed, you can: +* Navigate the entire filesystem, +* Create, delete, and rename files, +* Edit file contents, +* Edit file ownership and permissions, +* Create symbolic links to files and directories. + +### Browsing Filesystem +![User Interface](doc/ui_root.png) +### Editing Properties +![Edit Preferences](doc/ui_prefs.png) +### Editing Content +![Edit Contents](doc/ui_editor.png) + +# Installation +## From Github Release +### Ubuntu +1. `$ wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.1.0/cockpit-navigator_0.1.0-1focal_all.deb` +1. `# apt install ./cockpit-navigator_0.1.0-1focal_all.deb` +### EL7 +1. `# yum install https://github.com/45Drives/cockpit-navigator/releases/download/v0.1.0/cockpit-navigator-0.1.0.el7.noarch.rpm` +### EL8 +1. `# dnf install https://github.com/45Drives/cockpit-navigator/releases/download/v0.1.0/cockpit-navigator-0.1.0.el8.noarch.rpm` +## From Source +1. `$ git clone https://github.com/45Drives/cockpit-navigator.git` +1. `$ cd cockpit-navigator` +1. `$ git checkout ` (v0.1.0 is latest) +1. `# make install` +## From 45Drives Repositories +### Ubuntu +1. Import GPG Key +```sh +wget -qO - http://images.45drives.com/repo/keys/aptpubkey.asc | sudo apt-key add - +``` +2. Add 45drives.list +```sh +cd /etc/apt/sources.list.d +sudo wget http://images.45drives.com/repo/debian/45drives.list +sudo apt update +``` +3. Install Package +```sh +sudo apt install cockpit-navigator +``` +### EL7 +1. Add Repository +```sh +cd /etc/yum.repos.d +sudo wget http://images.45drives.com/repo/centos/45drives-centos.repo +sudo yum clean all +``` +2. Install Package +```sh +sudo yum install cockpit-navigator +``` diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..0ea640b --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +cockpit-navigator (0.1.0-1focal) focal; urgency=medium + + * Initial packaging of cockpit-navigator for Ubuntu Focal. + + -- Josh Boudreau Fri, 28 May 2021 3:58:00 -0300 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..068b2a7 --- /dev/null +++ b/debian/control @@ -0,0 +1,13 @@ +Source: cockpit-navigator +Section: utils +Priority: optional +Maintainer: Josh Boudreau +Build-Depends: debhelper-compat (= 12) +Standards-Version: 4.4.1 +Homepage: https://github.com/45Drives/cockpit-navigator + +Package: cockpit-navigator +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, + cockpit, python3 +Description: A File System Browser for Cockpit. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..bf6b808 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,35 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: cockpit-navigator +Upstream-Contact: Josh Boudreau +Source: https://github.com/45Drives/cockpit-navigator + +Files: * +Copyright: 2021 Josh Boudreau +License: GPL-3.0+ + +Files: navigator/navigator.* +Copyright: 2021 Sam Silver +License: GPL-3.0+ + +Files: navigator/navigator.js +Copyright: 2021 Dawson Della Valle +License: GPL-3.0+ + +Files: debian/* +Copyright: 2021 Josh Boudreau +License: GPL-3.0+ + +License: GPL-3.0+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with the Onboard package. If not, please have a look at + /usr/share/common-licenses or . diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..e73eae0 --- /dev/null +++ b/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +%: + dh $@ + + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/doc/ui_editor.png b/doc/ui_editor.png new file mode 100644 index 0000000..191e411 Binary files /dev/null and b/doc/ui_editor.png differ diff --git a/doc/ui_prefs.png b/doc/ui_prefs.png new file mode 100644 index 0000000..724e321 Binary files /dev/null and b/doc/ui_prefs.png differ diff --git a/doc/ui_root.png b/doc/ui_root.png new file mode 100644 index 0000000..508eb7e Binary files /dev/null and b/doc/ui_root.png differ diff --git a/docker/el7 b/docker/el7 new file mode 100644 index 0000000..7076f22 --- /dev/null +++ b/docker/el7 @@ -0,0 +1,17 @@ +FROM centos:7 + +LABEL description="Container in which to build el7 applications" + +ENV TZ=America/Glace_Bay +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +RUN yum install -y gcc rpm-build rpm-devel rpmlint make python python3 bash coreutils diffutils patch rpmdevtools + +RUN mkdir -p /home/rpm/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS,tmp} + +RUN echo %_topdir /home/rpm/rpmbuild > /etc/rpm/macros +RUN echo %_tmppath %{_topdir}/tmp >> /etc/rpm/macros + +RUN chmod -R 777 /home/rpm + +RUN ln -fs /usr/bin/python3 /usr/bin/python diff --git a/docker/el8 b/docker/el8 new file mode 100644 index 0000000..e62dab7 --- /dev/null +++ b/docker/el8 @@ -0,0 +1,15 @@ +FROM centos:8 + +LABEL description="Container in which to build el8 applications" + +ENV TZ=America/Glace_Bay +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +RUN dnf install -y gcc rpm-build rpm-devel rpmlint make python3 bash diffutils patch rpmdevtools + +RUN mkdir -p /home/rpm/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS,tmp} + +RUN echo %_topdir /home/rpm/rpmbuild > /etc/rpm/macros +RUN echo %_tmppath %{_topdir}/tmp >> /etc/rpm/macros + +RUN chmod -R 777 /home/rpm diff --git a/docker/ubuntu b/docker/ubuntu new file mode 100644 index 0000000..4c11f1c --- /dev/null +++ b/docker/ubuntu @@ -0,0 +1,8 @@ +FROM ubuntu:focal + +LABEL description="Container in which to build ubuntu applications" + +ENV TZ=America/Glace_Bay +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +RUN apt update && apt install -y make build-essential fakeroot devscripts debhelper python3 diff --git a/el/cockpit-navigator.spec b/el/cockpit-navigator.spec new file mode 100644 index 0000000..23521a1 --- /dev/null +++ b/el/cockpit-navigator.spec @@ -0,0 +1,36 @@ +Name: cockpit-navigator +Version: 0.1.0 +Release: 1%{?dist} +Summary: A File System Browser for Cockpit. +License: GPL-3.0+ +URL: github.com/45drives/cockpit-navigator/blob/main/README.md +Source0: %{name}-%{version}.tar.gz +BuildArch: noarch +Requires: cockpit python3 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +%description +Cockpit Navigator +A File System Browser for Cockpit. + +%prep +%setup -q + +%build +# empty + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot} +cp -a * %{buildroot} + +%clean +rm -rf %{buildroot} + +%files +/usr/share/cockpit/navigator/* + +%changelog +* Fri May 28 2021 Josh Boudreau 0.1.0-1 +- First Build diff --git a/makefile b/makefile index f94c268..50cefd4 100644 --- a/makefile +++ b/makefile @@ -21,6 +21,9 @@ all: default install: mkdir -p $(DESTDIR)/usr/share/cockpit/ cp -rpf navigator $(DESTDIR)/usr/share/cockpit +ifeq ($(EL7),1) + sed -i "s/pf-c-button/btn/g;s/pf-m-primary/btn-primary/g;s/pf-m-secondary/btn-default/g;s/pf-m-danger/btn-danger/g" $(DESTDIR)/usr/share/cockpit/navigator/navigator.html +endif uninstall: rm -rf $(DESTDIR)/usr/share/cockpit/navigator diff --git a/navigator/navigator.css b/navigator/navigator.css index de2cf0e..e828bcf 100644 --- a/navigator/navigator.css +++ b/navigator/navigator.css @@ -53,6 +53,14 @@ --symlink-symbol-color: var(--navigation); } +html { + height: 100%; +} + +body { + height: 100%; +} + .pf-c-button:disabled[data-theme="dark"] { background-color: var(--border); } @@ -249,10 +257,18 @@ input[type="text"] { border-radius: var(--nav-border-radius); } +.min-width-0 { + min-width: 0; +} + .nav-info-column-filename { + flex: 1; margin: 0 12px 0 12px; font-weight: bolder; font-size: 150%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .nav-property-pair { @@ -332,6 +348,7 @@ input[type="text"] { padding: 5px; color: var(--font); background-color: var(--textarea-bg); + font-family: 'Courier New', Courier, monospace; } .nav-footer { @@ -419,3 +436,14 @@ input:checked + .slider:before { .slider.round:before { border-radius: 50%; } + +.nav-icon-decorated { + position: relative; +} + +.nav-icon-decoration { + position: absolute; + font-size: 60%; + top: -10%; + left: -30%; +} diff --git a/navigator/navigator.html b/navigator/navigator.html index da81635..6af6628 100644 --- a/navigator/navigator.html +++ b/navigator/navigator.html @@ -24,6 +24,7 @@ + @@ -38,24 +39,28 @@
- +
- -
- +
@@ -63,23 +68,23 @@
- @@ -142,7 +147,7 @@ - Directories, - Files
- + 45Drives
@@ -150,7 +155,7 @@