Adds ability to show device manifest for vanilla images

Loads `openwrt-<target>-<sub-target>-default.manifest` in case of
Vanilla images and shows the list of default installed packages in
a retractable list.

Fixes #15

Signed-off-by: Sudhanshu Gautam <me@sudhanshug.com>
This commit is contained in:
Sudhanshu Gautam 2019-09-04 23:19:23 +05:30
parent dd6624c322
commit 740383d6be
2 changed files with 59 additions and 17 deletions

View file

@ -1,20 +1,19 @@
import axios from 'axios';
const base =
'https://cors-anywhere.herokuapp.com/https://aparcar.stephen304.com';
const base_downloads =
'https://cors-anywhere.herokuapp.com/https://aparcar.stephen304.com/download/json-demo/openwrt/';
const base_api =
'https://cors-anywhere.herokuapp.com/https://aparcar.stephen304.com/api/';
class DataService {
getVersions = () => axios.get(base_downloads + 'versions.json');
getVersions = versionsPath => axios.get(versionsPath);
getOverview = path => axios.get(base_downloads + path + '/overview.json');
getOverview = overviewPath => axios.get(overviewPath);
getDeviceData = device_path => axios.get(base_downloads + device_path);
getDeviceData = devicePath => axios.get(devicePath);
getDeviceManifest = manifest_path => axios.get(base + manifest_path);
getDeviceManifest = async manifest_path => {
const manifest = await axios.get(manifest_path);
return manifest.data.split('\n');
};
getDevicePackages = (version, target, profile) =>
axios.get(