Cleanup static data
Signed-off-by: Naman Jiandani <naman1255@hotmail.com>
This commit is contained in:
parent
5d0e73e097
commit
96ac128082
@ -38,76 +38,7 @@ function Explore ({ host, username, password, keywords, data, updateData }) {
|
||||
const [filteredData, setFilteredData] = useState([]);
|
||||
const classes = useStyles();
|
||||
|
||||
// static data
|
||||
// useEffect(() => {
|
||||
// const apiData = [
|
||||
// {
|
||||
// name: 'test-package',
|
||||
// latestVersion: 'v2.1.0',
|
||||
// tags: 'ACI',
|
||||
// description: 'lorem ipsum lorem ipsum loren ipsum',
|
||||
// licenses: '',
|
||||
// size: '55660',
|
||||
// vendor: 'Omnia',
|
||||
// path: 'test-package-04',
|
||||
// },
|
||||
// {
|
||||
// name: 'test-package/1/2/3/4',
|
||||
// latestVersion: 'v2.4.0',
|
||||
// tags: 'ACI',
|
||||
// description: 'lorem ipsum lorem ipsum loren ipsum',
|
||||
// licenses: '',
|
||||
// size: '55660',
|
||||
// vendor: 'Onyx',
|
||||
// path: 'test-package-04',
|
||||
// },
|
||||
// {
|
||||
// name: 'test-package-04',
|
||||
// latestVersion: '0.4.1',
|
||||
// tags: 'ACI',
|
||||
// description: 'lorem ipsum lorem ipsum loren ipsum',
|
||||
// licenses: '',
|
||||
// size: '55660',
|
||||
// vendor: 'Oural',
|
||||
// path: 'test-package-04',
|
||||
// },
|
||||
// {
|
||||
// name: 'test-package',
|
||||
// latestVersion: 'v2.1.0',
|
||||
// tags: 'ACI',
|
||||
// description: 'lorem ipsum lorem ipsum loren ipsum',
|
||||
// licenses: '',
|
||||
// size: '55660',
|
||||
// vendor: 'Omnia',
|
||||
// path: 'test-package-04',
|
||||
// },
|
||||
// {
|
||||
// name: 'test-package/1/2/3/4',
|
||||
// latestVersion: 'v2.4.0',
|
||||
// tags: 'ACI',
|
||||
// description: 'lorem ipsum lorem ipsum loren ipsum',
|
||||
// licenses: '',
|
||||
// size: '55660',
|
||||
// vendor: 'Onyx',
|
||||
// path: 'test-package-04',
|
||||
// },
|
||||
// {
|
||||
// name: 'test-package-04',
|
||||
// latestVersion: '0.4.1',
|
||||
// tags: 'ACI',
|
||||
// description: 'lorem ipsum lorem ipsum loren ipsum',
|
||||
// licenses: '',
|
||||
// size: '55660',
|
||||
// vendor: 'Oural',
|
||||
// path: 'test-package-04',
|
||||
// },
|
||||
// ];
|
||||
//
|
||||
// updateData(apiData);
|
||||
// }, []);
|
||||
|
||||
useEffect(() => {
|
||||
// const token = btoa("test:test123");
|
||||
const token = btoa(username + ':' + password);
|
||||
const cfg = {
|
||||
headers: {
|
||||
|
@ -52,7 +52,6 @@ function ImageDetails (props) {
|
||||
useEffect(() => {
|
||||
const {name, version} = myData;
|
||||
|
||||
// const token = btoa("test:test123");
|
||||
const token = btoa(username + ':' + password);
|
||||
const cfg = {
|
||||
headers: {
|
||||
|
@ -75,8 +75,6 @@ export default function SignIn({ host, updateHost, username, updateUsername, pas
|
||||
event.preventDefault();
|
||||
setRequestProcessing(true);
|
||||
|
||||
// todo: get credentials from global state
|
||||
// const token = btoa("test:test123");
|
||||
const token = btoa(username + ':' + password);
|
||||
|
||||
const cfg = {
|
||||
@ -88,21 +86,6 @@ export default function SignIn({ host, updateHost, username, updateUsername, pas
|
||||
axios.get(`${host}/query?query={ImageListWithLatestTag(){Name%20Latest%20Description%20Vendor%20Licenses%20Labels%20Size%20LastUpdated}}`, cfg)
|
||||
.then(response => {
|
||||
if (response.data && response.data.data) {
|
||||
// let imageList = response.data.data.ImageListWithLatestTag;
|
||||
// let imagesData = imageList.map((image) => {
|
||||
// return {
|
||||
// name: image.Name,
|
||||
// latestVersion: image.Latest,
|
||||
// tags: image.Labels,
|
||||
// description: image.Descri ption,
|
||||
// licenses: image.Licenses,
|
||||
// size: image.Size,
|
||||
// vendor: image.Vendor
|
||||
// };
|
||||
// });
|
||||
// setData(imagesData);
|
||||
// setIsLoading(false);
|
||||
|
||||
localStorage.setItem('host', host);
|
||||
localStorage.setItem('username', username);
|
||||
localStorage.setItem('password', password);
|
||||
@ -121,19 +104,6 @@ export default function SignIn({ host, updateHost, username, updateUsername, pas
|
||||
})
|
||||
}
|
||||
|
||||
// static data
|
||||
// const handleClick = (event) => {
|
||||
// event.preventDefault();
|
||||
// setRequestProcessing(true);
|
||||
//
|
||||
// localStorage.setItem('host', host);
|
||||
// window.location.reload(true);
|
||||
//
|
||||
// setRequestProcessing(false);
|
||||
// setRequestError(false);
|
||||
// navigate("/home");
|
||||
// }
|
||||
|
||||
const handleChange = (event, type) => {
|
||||
event.preventDefault();
|
||||
setRequestError(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user