├── .watchmanconfig
├── .gitattributes
├── app.json
├── src
├── assets
│ ├── pod.png
│ ├── google.png
│ ├── shipm8.png
│ ├── trash.png
│ ├── aws_logo.png
│ ├── googleCloud.png
│ ├── shipm8_logo.png
│ └── shipm8_logo_unused.png
├── data
│ ├── CloudProviders.js
│ ├── Regions.js
│ └── FakeData.js
├── utils
│ ├── LoadingUtils.js
│ ├── StatusUtils.js
│ └── AlertUtils.js
├── components
│ ├── common
│ │ ├── Loading.js
│ │ ├── EntityStatus.js
│ │ ├── Welcome.js
│ │ ├── CloudLogin.js
│ │ └── SwipeableList.js
│ ├── Clusters
│ │ ├── ClustersIndex.js
│ │ └── AddCluster.js
│ └── Pods
│ │ ├── PodInfo.js
│ │ └── PodsDisplay.js
├── store
│ └── configureStore.js
├── reducers
│ ├── index.js
│ ├── AwsSlice.js
│ ├── PodsSlice.js
│ ├── ClustersSlice.js
│ └── GoogleCloudSlice.js
├── navigation
│ └── Routes.js
└── api
│ ├── AwsApi.js
│ ├── K8sApi.js
│ └── GoogleCloudApi.js
├── android
├── app
│ ├── debug.keystore
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── shipm8
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── MainApplication.java
│ │ │ └── AndroidManifest.xml
│ │ └── debug
│ │ │ └── AndroidManifest.xml
│ ├── proguard-rules.pro
│ ├── build_defs.bzl
│ ├── _BUCK
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── settings.gradle
├── gradle.properties
├── build.gradle
├── gradlew.bat
└── gradlew
├── babel.config.js
├── ios
├── shipm8
│ ├── Images.xcassets
│ │ ├── Contents.json
│ │ ├── shipm8.imageset
│ │ │ ├── shipm8.png
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ ├── SHIPM8_LogoNew.png
│ │ │ ├── SHIPM8_LogoNew 120x120.png
│ │ │ ├── SHIPM8_LogoNew 180x180.png
│ │ │ ├── SHIPM8_LogoNew 40x40.png
│ │ │ ├── SHIPM8_LogoNew 58x58.png
│ │ │ ├── SHIPM8_LogoNew 60x60.png
│ │ │ ├── SHIPM8_LogoNew 80x80.png
│ │ │ ├── SHIPM8_LogoNew 87x87.png
│ │ │ ├── SHIPM8_LogoNew 120x120-1.png
│ │ │ └── Contents.json
│ │ └── shipm8_logo.imageset
│ │ │ ├── shipm8_logo.png
│ │ │ └── Contents.json
│ ├── AppDelegate.h
│ ├── main.m
│ ├── AppDelegate.m
│ ├── Info.plist
│ └── Base.lproj
│ │ └── LaunchScreen.xib
├── shipm8.xcworkspace
│ └── contents.xcworkspacedata
├── ShipM8Tests
│ ├── Info.plist
│ └── shipm8Tests.m
├── shipm8-tvOSTests
│ └── Info.plist
├── shipm8-tvOS
│ └── Info.plist
├── Podfile
└── Podfile.lock
├── .buckconfig
├── .prettierrc.js
├── __tests__
├── __snapshots__
│ ├── SignOut.test.js.snap
│ ├── Image.test.js.snap
│ ├── Text.test.js.snap
│ ├── TouchableOpacity.test.js.snap
│ ├── Button.test.js.snap
│ └── Launch.test.js.snap
├── Image.test.js
├── Launch.test.js
├── SignOut.test.js
├── Text.test.js
├── Button.test.js
└── TouchableOpacity.test.js
├── index.js
├── .eslintrc
├── metro.config.js
├── App.js
├── .gitignore
├── README.md
├── package.json
└── .flowconfig
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ShipM8",
3 | "displayName": "ShipM8"
4 | }
--------------------------------------------------------------------------------
/src/assets/pod.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/src/assets/pod.png
--------------------------------------------------------------------------------
/src/assets/google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/src/assets/google.png
--------------------------------------------------------------------------------
/src/assets/shipm8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/src/assets/shipm8.png
--------------------------------------------------------------------------------
/src/assets/trash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/src/assets/trash.png
--------------------------------------------------------------------------------
/src/assets/aws_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/src/assets/aws_logo.png
--------------------------------------------------------------------------------
/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/android/app/debug.keystore
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/src/assets/googleCloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/src/assets/googleCloud.png
--------------------------------------------------------------------------------
/src/assets/shipm8_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/src/assets/shipm8_logo.png
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/src/assets/shipm8_logo_unused.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/src/assets/shipm8_logo_unused.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | shipm8
3 |
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | bracketSpacing: true,
3 | jsxBracketSameLine: true,
4 | singleQuote: true,
5 | trailingComma: 'all',
6 | };
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/__tests__/__snapshots__/SignOut.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`SignOut Component renders correctly 1`] = `null`;
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/shipm8.imageset/shipm8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/ios/shipm8/Images.xcassets/shipm8.imageset/shipm8.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew.png
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/shipm8_logo.imageset/shipm8_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/ios/shipm8/Images.xcassets/shipm8_logo.imageset/shipm8_logo.png
--------------------------------------------------------------------------------
/__tests__/__snapshots__/Image.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Image renders correctly 1`] = `
4 |
5 |
6 |
7 | `;
8 |
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 120x120.png
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 180x180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 180x180.png
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 40x40.png
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 58x58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 58x58.png
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 60x60.png
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 80x80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 80x80.png
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 87x87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 87x87.png
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 120x120-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oslabs-beta/shipm8/HEAD/ios/shipm8/Images.xcassets/AppIcon.appiconset/SHIPM8_LogoNew 120x120-1.png
--------------------------------------------------------------------------------
/src/data/CloudProviders.js:
--------------------------------------------------------------------------------
1 | const CloudProviders = [
2 | { value: 'aws', label: 'Amazon Web Services (EKS)' },
3 | { value: 'gcp', label: 'Google Cloud (GKE)' },
4 | ];
5 |
6 | export default CloudProviders;
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'ShipM8'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/src/utils/LoadingUtils.js:
--------------------------------------------------------------------------------
1 | export const startLoading = state => {
2 | state.isLoading = true;
3 | };
4 |
5 | export const loadingFailed = (state, action) => {
6 | state.isLoading = false;
7 | state.error = action.payload;
8 | };
9 |
--------------------------------------------------------------------------------
/__tests__/__snapshots__/Text.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Text renders correctly 1`] = `
4 |
7 |
8 | React-Native Text Test
9 |
10 |
11 | `;
12 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import { AppRegistry } from 'react-native';
6 | import App from './App';
7 | import { name as appName } from './app.json';
8 |
9 | console.disableYellowBox = true;
10 |
11 | AppRegistry.registerComponent(appName, () => App);
12 |
--------------------------------------------------------------------------------
/src/components/common/Loading.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { ActivityIndicator } from 'react-native';
3 |
4 | const Loading = () => {
5 | return (
6 |
7 | );
8 | }
9 |
10 | export default Loading;
11 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "extends": "@react-native-community",
4 | "rules": {
5 | "prettier/prettier": 0,
6 | "react-hooks/rules-of-hooks": "error",
7 | "react-hooks/exhaustive-deps": "warn"
8 | },
9 | "plugins": [
10 | "react",
11 | "react-hooks"
12 | ]
13 | }
--------------------------------------------------------------------------------
/ios/shipm8.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | module.exports = {
9 | transformer: {
10 | getTransformOptions: async () => ({
11 | transform: {
12 | experimentalImportSupport: false,
13 | inlineRequires: false,
14 | },
15 | }),
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/src/store/configureStore.js:
--------------------------------------------------------------------------------
1 | import thunk from 'redux-thunk';
2 | import { configureStore } from '@reduxjs/toolkit';
3 | import { persistStore } from 'redux-persist';
4 |
5 | import persistReducer from '../reducers/index';
6 |
7 | export const store = configureStore({
8 | reducer: persistReducer,
9 | middleware: [thunk],
10 | });
11 |
12 | export const persistor = persistStore(store);
13 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/__tests__/Image.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { View, Image } from 'react-native';
3 | import renderer from 'react-test-renderer';
4 |
5 | describe('Image', () => {
6 | it('renders correctly', () => {
7 | const image = renderer
8 | .create(
9 |
10 |
11 | ,
12 | )
13 | .toJSON();
14 | expect(image).toMatchSnapshot();
15 | });
16 | });
17 |
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/shipm8.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "shipm8.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/android/app/src/main/java/com/shipm8/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.shipm8;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript. This is used to schedule
9 | * rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "shipm8";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/shipm8_logo.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "shipm8_logo.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/__tests__/Launch.test.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import Launch from '../js/components/Launch';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | describe('Launch Component', () => {
9 | it('renders correctly', () => {
10 | const launchTest = renderer.create().toJSON();
11 | expect(launchTest).toMatchSnapshot();
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/__tests__/SignOut.test.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import SignOut from '../js/components/SignOut';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | describe('SignOut Component', () => {
9 | it('renders correctly', () => {
10 | const signOut = renderer.create().toJSON();
11 | expect(signOut).toMatchSnapshot();
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/ios/shipm8/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (nonatomic, strong) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ios/shipm8/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 |
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/__tests__/Text.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { View, Text } from 'react-native';
3 | import renderer from 'react-test-renderer';
4 |
5 | describe('Text', () => {
6 | it('renders correctly', () => {
7 | const instance = renderer
8 | .create(
9 |
10 | React-Native Text Test
11 | ,
12 | )
13 | .toJSON();
14 |
15 | expect(instance).toMatchSnapshot();
16 | });
17 | });
18 |
--------------------------------------------------------------------------------
/__tests__/Button.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Button } from 'react-native';
3 |
4 | // Note: test renderer must be required after react-native.
5 | import renderer from 'react-test-renderer';
6 |
7 | describe('Button', () => {
8 | it('renders correctly', () => {
9 | const buttonTest = renderer
10 | .create()
11 | .toJSON();
12 | expect(buttonTest).toMatchSnapshot();
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/src/utils/StatusUtils.js:
--------------------------------------------------------------------------------
1 |
2 | class StatusUtils {
3 |
4 | static statusForBadge = status => {
5 | switch (status) {
6 | case 'RUNNING' || 'ACTIVE':
7 | case 'READY':
8 | case 'READY_UNSCHEDULABLE':
9 | return 'success';
10 | case 'DOWN':
11 | case 'NOTREADY':
12 | case 'UNAUTHORIZED':
13 | return 'error';
14 | default:
15 | return 'warning';
16 | }
17 | }
18 | }
19 |
20 | export default StatusUtils;
21 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/__tests__/TouchableOpacity.test.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import renderer from 'react-test-renderer';
4 | import { Text, TouchableOpacity } from 'react-native';
5 |
6 | describe('TouchableOpacity', () => {
7 | it('renders correctly', () => {
8 | const instance = renderer
9 | .create(
10 |
11 | This should be a button
12 | ,
13 | )
14 | .toJSON();
15 |
16 | expect(instance).toMatchSnapshot();
17 | });
18 | });
19 |
--------------------------------------------------------------------------------
/__tests__/__snapshots__/TouchableOpacity.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`TouchableOpacity renders correctly 1`] = `
4 |
21 |
22 | This should be a button
23 |
24 |
25 | `;
26 |
--------------------------------------------------------------------------------
/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/ios/ShipM8Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ios/shipm8-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/App.js:
--------------------------------------------------------------------------------
1 | import 'react-native-gesture-handler';
2 | import React from 'react';
3 | import { StatusBar } from 'react-native';
4 | import { Provider } from 'react-redux';
5 | import { store, persistor } from './src/store/configureStore';
6 | import { PersistGate } from 'redux-persist/integration/react';
7 | import { NavigationContainer } from '@react-navigation/native';
8 |
9 | import Loading from './src/components/common/Loading';
10 | import Routes from './src/navigation/Routes';
11 |
12 | const App = () => {
13 | return (
14 |
15 |
16 | } persistor={persistor}>
17 |
18 |
19 |
20 |
21 |
22 | );
23 | };
24 |
25 | export default App;
26 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useAndroidX=true
21 | android.enableJetifier=true
22 |
--------------------------------------------------------------------------------
/__tests__/__snapshots__/Button.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Button renders correctly 1`] = `
4 |
23 |
30 |
42 | this must be a string
43 |
44 |
45 |
46 | `;
47 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | *.xcscmblueprint
8 | build/
9 | *.pbxuser
10 | !default.pbxuser
11 | *.mode1v3
12 | !default.mode1v3
13 | *.mode2v3
14 | !default.mode2v3
15 | *.perspectivev3
16 | !default.perspectivev3
17 | xcuserdata
18 | *.xccheckout
19 | *.moved-aside
20 | DerivedData
21 | *.hmap
22 | *.ipa
23 | *.xcuserstate
24 | project.xcworkspace
25 | xcshareddata/
26 |
27 | # Android/IntelliJ
28 | #
29 | build/
30 | .idea
31 | .gradle
32 | local.properties
33 | *.iml
34 |
35 | # node.js
36 | #
37 | node_modules/
38 | npm-debug.log
39 | yarn-error.log
40 |
41 | # BUCK
42 | buck-out/
43 | \.buckd/
44 | *.keystore
45 | !debug.keystore
46 |
47 | # fastlane
48 | #
49 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
50 | # screenshots whenever they are needed.
51 | # For more information about the recommended setup visit:
52 | # https://docs.fastlane.tools/best-practices/source-control/
53 |
54 | */fastlane/report.xml
55 | */fastlane/Preview.html
56 | */fastlane/screenshots
57 |
58 | # Bundle artifact
59 | *.jsbundle
60 |
61 | # CocoaPods
62 | /ios/Pods/
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "28.0.3"
6 | minSdkVersion = 16
7 | compileSdkVersion = 28
8 | targetSdkVersion = 28
9 | }
10 | repositories {
11 | google()
12 | jcenter()
13 | }
14 | dependencies {
15 | classpath("com.android.tools.build:gradle:3.4.2")
16 |
17 | // NOTE: Do not place your application dependencies here; they belong
18 | // in the individual module build.gradle files
19 | }
20 | }
21 |
22 | allprojects {
23 | repositories {
24 | mavenLocal()
25 | maven {
26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27 | url("$rootDir/../node_modules/react-native/android")
28 | }
29 | maven {
30 | // Android JSC is installed from npm
31 | url("$rootDir/../node_modules/jsc-android/dist")
32 | }
33 |
34 | google()
35 | jcenter()
36 | maven { url 'https://jitpack.io' }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/components/common/EntityStatus.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { View, Text } from 'react-native';
3 | import { Badge } from 'react-native-elements';
4 | import EStyleSheet from 'react-native-extended-stylesheet';
5 |
6 | import StatusUtils from '../../utils/StatusUtils';
7 |
8 | const EntityStatus = ({ status }) => {
9 | if (typeof status !== 'string') { return false; }
10 | const badgeStatusText = status.toUpperCase();
11 | const statusText = status[0].toUpperCase() + status.slice(1).toLowerCase();
12 |
13 | return (
14 |
15 | {statusText}
16 |
20 |
21 | );
22 | };
23 |
24 | export default React.memo(EntityStatus);
25 |
26 | const styles = EStyleSheet.create({
27 | status: {
28 | flexDirection: 'row',
29 | alignItems: 'center',
30 | },
31 | badge: {
32 | marginLeft: '.6rem',
33 | marginTop: '.1rem',
34 | marginRight: '.2rem',
35 | },
36 | statusText: {
37 | fontSize: 14,
38 | color: '#929292',
39 | },
40 | });
41 |
--------------------------------------------------------------------------------
/src/data/Regions.js:
--------------------------------------------------------------------------------
1 | const Regions = [
2 | { value: 'us-east-1', label: 'US East (N. Virginia)' },
3 | { value: 'us-east-2', label: 'US East (Ohio)' },
4 | { value: 'us-west-2', label: 'US West (Oregon)' },
5 | { value: 'ap-south-1', label: 'Asia Pacific (Mumbai)' },
6 | { value: 'ap-northeast-2', label: 'Asia Pacific (Seoul)' },
7 | { value: 'ap-southeast-1', label: 'Asia Pacific (Singapore)' },
8 | { value: 'ap-southeast-2', label: 'Asia Pacific (Sydney)' },
9 | { value: 'ap-northeast-1', label: 'Asia Pacific (Tokyo)' },
10 | { value: 'ca-central-1', label: 'Canada (Central)' },
11 | { value: 'eu-west-1', label: 'Europe (Ireland)' },
12 | { value: 'eu-west-2', label: 'Europe (London)' },
13 | { value: 'eu-west-3', label: 'Europe (Paris)' },
14 | { value: 'eu-north-1', label: 'Europe (Stockholm)' },
15 | { value: 'sa-east-1', label: 'South America (São Paulo)' },
16 | ];
17 |
18 | export default Regions;
19 |
20 | /* Unsupported Regions */
21 |
22 | // { value: 'me-south-1', label: 'Middle East(Bahrain)' }
23 | // { value: 'us-west-1', label: 'US West (N.California)' }
24 | // { value: 'ap-east-1', label: 'Asia Pacific (Hong Kong)' }
25 | // { value: 'eu - central - 1', label: 'Europe(Frankfurt)' }
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ShipM8, the mobile app for monitoring Kubernetes
2 |
3 | ShipM8 is a mobile application for Kubernetes with support for AWS EKS deployments.
4 |
5 | ShipM8 is made with [React Native](https://facebook.github.io/react-native/). For [development](#run-locally-using-simulators) purposes you can run the application using both iOS and Android simulators.
6 |
7 | ## To get started with development (iOS)
8 |
9 | To develop and test the application you need to setup your local environment, then run the simulator.
10 | You'll need the React Native CLI, Xcode, and Cocoapods. Be sure you have Xcode installed (at least version 11.3.1).
11 |
12 | Once you have Xcode properly installed
13 |
14 | Install `react-native-cli`
15 |
16 | ```npm install -g react-native-cli```
17 |
18 | With `react-native-cli` installed
19 |
20 | ```npm install```
21 |
22 | Next, install `cocoapods` if you have not already
23 |
24 | ```sudo gem install cocoapods```
25 |
26 | Install iOS dependencies
27 |
28 | ```cd iOS/ && pod install```
29 |
30 | Finally, cd back to main project directory and run the app on iOS
31 |
32 | ```npm run ios```
33 |
34 | # Limitations
35 |
36 | These regions are not currently supported:
37 | [Northern California, Hong Kong, Frankfurt, Bahrain]
--------------------------------------------------------------------------------
/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from '@reduxjs/toolkit';
2 | import { persistReducer } from 'redux-persist';
3 | import AsyncStorage from '@react-native-community/async-storage';
4 | import autoMergeLevel2 from 'redux-persist/lib/stateReconciler/autoMergeLevel2';
5 |
6 | import awsReducer from './AwsSlice';
7 | import gcpReducer from './GoogleCloudSlice';
8 | import podsReducer from './PodsSlice';
9 | import clustersReducer from './ClustersSlice';
10 |
11 | const awsPersistConfig = {
12 | key: 'aws',
13 | storage: AsyncStorage,
14 | whitelist: ['credentials'],
15 | stateReconciler: autoMergeLevel2,
16 | };
17 |
18 | const gcpPersistConfig = {
19 | key: 'gcp',
20 | storage: AsyncStorage,
21 | whitelist: ['user'],
22 | stateReconciler: autoMergeLevel2,
23 | };
24 |
25 | const clustersPersistConfig = {
26 | key: 'clusters',
27 | storage: AsyncStorage,
28 | blacklist: ['isLoading', 'error'],
29 | stateReconciler: autoMergeLevel2,
30 | };
31 |
32 | const rootReducer = combineReducers({
33 | clusters: persistReducer(clustersPersistConfig, clustersReducer),
34 | aws: persistReducer(awsPersistConfig, awsReducer),
35 | gcp: persistReducer(gcpPersistConfig, gcpReducer),
36 | pods: podsReducer,
37 | });
38 |
39 | export default rootReducer;
40 |
--------------------------------------------------------------------------------
/src/utils/AlertUtils.js:
--------------------------------------------------------------------------------
1 | import { Alert } from 'react-native';
2 |
3 | class AlertUtils {
4 |
5 | static deleteEntityPrompt = (item, callback) => {
6 | const message = item.kind
7 | ? `This will delete ${item.name || item.metadata.name} from your cluster`
8 | : `This will remove ${item} from your added clusters`;
9 |
10 | return Alert.alert(
11 | 'Are you sure?',
12 | message,
13 | [
14 | {
15 | text: 'Cancel',
16 | onPress: () => null,
17 | style: 'cancel',
18 | },
19 | {
20 | text: 'Delete', onPress: () => {
21 | callback();
22 | }
23 | , style: 'destructive',
24 | },
25 | ],
26 | { cancelable: false },
27 | );
28 | };
29 |
30 | static deleteSuccessAlert = item => {
31 | const messageTitle = item.kind
32 | ? 'Delete Successful'
33 | : 'Remove Successful';
34 |
35 | const message = item.kind
36 | ? `${item.name || item.metadata.name} has been deleted.`
37 | : `${item} has been removed.`;
38 |
39 | return Alert.alert(
40 | messageTitle,
41 | message,
42 | [
43 | {
44 | text: 'OK',
45 | style: 'default',
46 | },
47 | ]
48 | );
49 | }
50 | }
51 |
52 | export default AlertUtils;
53 |
--------------------------------------------------------------------------------
/android/app/_BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.shipm8",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.shipm8",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/ios/shipm8/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "SHIPM8_LogoNew 40x40.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "SHIPM8_LogoNew 60x60.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "SHIPM8_LogoNew 58x58.png",
19 | "scale" : "2x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "SHIPM8_LogoNew 87x87.png",
25 | "scale" : "3x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "SHIPM8_LogoNew 80x80.png",
31 | "scale" : "2x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "SHIPM8_LogoNew 120x120.png",
37 | "scale" : "3x"
38 | },
39 | {
40 | "size" : "60x60",
41 | "idiom" : "iphone",
42 | "filename" : "SHIPM8_LogoNew 120x120-1.png",
43 | "scale" : "2x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "SHIPM8_LogoNew 180x180.png",
49 | "scale" : "3x"
50 | },
51 | {
52 | "size" : "1024x1024",
53 | "idiom" : "ios-marketing",
54 | "filename" : "SHIPM8_LogoNew.png",
55 | "scale" : "1x"
56 | }
57 | ],
58 | "info" : {
59 | "version" : 1,
60 | "author" : "xcode"
61 | }
62 | }
--------------------------------------------------------------------------------
/ios/shipm8-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | NSAppTransportSecurity
26 |
27 | NSExceptionDomains
28 |
29 | localhost
30 |
31 | NSExceptionAllowsInsecureHTTPLoads
32 |
33 |
34 |
35 |
36 | NSLocationWhenInUseUsageDescription
37 |
38 | UILaunchStoryboardName
39 | LaunchScreen
40 | UIRequiredDeviceCapabilities
41 |
42 | armv7
43 |
44 | UISupportedInterfaceOrientations
45 |
46 | UIInterfaceOrientationPortrait
47 | UIInterfaceOrientationLandscapeLeft
48 | UIInterfaceOrientationLandscapeRight
49 |
50 | UIViewControllerBasedStatusBarAppearance
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/ios/shipm8/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import "AppDelegate.h"
9 |
10 | #import
11 | #import
12 | #import
13 |
14 | @implementation AppDelegate
15 |
16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
17 | {
18 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
19 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
20 | moduleName:@"ShipM8"
21 | initialProperties:nil];
22 |
23 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
24 |
25 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
26 | UIViewController *rootViewController = [UIViewController new];
27 | rootViewController.view = rootView;
28 | self.window.rootViewController = rootViewController;
29 | [self.window makeKeyAndVisible];
30 | return YES;
31 | }
32 |
33 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
34 | {
35 | #if DEBUG
36 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
37 | #else
38 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
39 | #endif
40 | }
41 |
42 | #if RCT_DEV
43 | - (BOOL)bridge:(RCTBridge *)bridge didNotFindModule:(NSString *)moduleName {
44 | return YES;
45 | }
46 | #endif
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "shipm8",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "start": "react-native start",
9 | "test": "jest",
10 | "lint": "eslint ."
11 | },
12 | "dependencies": {
13 | "@react-native-community/async-storage": "^1.7.1",
14 | "@react-native-community/google-signin": "^3.0.4",
15 | "@react-native-community/masked-view": "^0.1.6",
16 | "@react-navigation/native": "^5.1.2",
17 | "@react-navigation/stack": "^5.2.4",
18 | "@reduxjs/toolkit": "^1.2.3",
19 | "js-base64": "^2.5.1",
20 | "react": "16.9.0",
21 | "react-native": "0.61.5",
22 | "react-native-elements": "^1.2.7",
23 | "react-native-extended-stylesheet": "^0.12.0",
24 | "react-native-gesture-handler": "^1.5.3",
25 | "react-native-material-dropdown": "^0.11.1",
26 | "react-native-safe-area-context": "^0.6.2",
27 | "react-native-screens": "^2.4.0",
28 | "react-native-swipe-list-view": "^2.1.3",
29 | "react-native-vector-icons": "^6.6.0",
30 | "react-redux": "^7.1.3",
31 | "redux-persist": "^6.0.0",
32 | "redux-thunk": "^2.3.0",
33 | "rn-fetch-blob": "^0.12.0"
34 | },
35 | "devDependencies": {
36 | "@babel/core": "^7.6.2",
37 | "@babel/runtime": "^7.6.2",
38 | "babel-jest": "^24.9.0",
39 | "eslint": "^6.5.1",
40 | "@react-native-community/eslint-config": "^0.0.5",
41 | "eslint-plugin-react-hooks": "^2.3.0",
42 | "jest": "^24.9.0",
43 | "metro-react-native-babel-preset": "^0.56.0",
44 | "react-test-renderer": "16.9.0"
45 | },
46 | "jest": {
47 | "preset": "react-native",
48 | "transformIgnorePatterns": [
49 | "node_modules/(?!(@react-native-community|react-native|react-navigation|react-native-elements|react-native-vector-icons|react-redux))"
50 | ]
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/ios/shipm8/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | $(PRODUCT_NAME)
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleURLTypes
24 |
25 |
26 | CFBundleTypeRole
27 | Editor
28 | CFBundleURLSchemes
29 |
30 | com.googleusercontent.apps.535704856722-soaqblnbbcf050at58k7bhbenk9fui5p
31 |
32 |
33 |
34 | CFBundleVersion
35 | $(CURRENT_PROJECT_VERSION)
36 | LSRequiresIPhoneOS
37 |
38 | NSAppTransportSecurity
39 |
40 | NSAllowsArbitraryLoads
41 |
42 | NSExceptionDomains
43 |
44 | localhost
45 |
46 | NSExceptionAllowsInsecureHTTPLoads
47 |
48 |
49 |
50 |
51 | NSLocationWhenInUseUsageDescription
52 |
53 | UIAppFonts
54 |
55 | UILaunchStoryboardName
56 | LaunchScreen
57 | UIRequiredDeviceCapabilities
58 |
59 | armv7
60 |
61 | UISupportedInterfaceOrientations
62 |
63 | UIInterfaceOrientationPortrait
64 | UIInterfaceOrientationLandscapeLeft
65 | UIInterfaceOrientationLandscapeRight
66 |
67 | UIViewControllerBasedStatusBarAppearance
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/ios/ShipM8Tests/shipm8Tests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 |
11 | #import
12 | #import
13 |
14 | #define TIMEOUT_SECONDS 600
15 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
16 |
17 | @interface ShipM8Tests : XCTestCase
18 |
19 | @end
20 |
21 | @implementation shipm8Tests
22 |
23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
24 | {
25 | if (test(view)) {
26 | return YES;
27 | }
28 | for (UIView *subview in [view subviews]) {
29 | if ([self findSubviewInView:subview matching:test]) {
30 | return YES;
31 | }
32 | }
33 | return NO;
34 | }
35 |
36 | - (void)testRendersWelcomeScreen
37 | {
38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
40 | BOOL foundElement = NO;
41 |
42 | __block NSString *redboxError = nil;
43 | #ifdef DEBUG
44 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
45 | if (level >= RCTLogLevelError) {
46 | redboxError = message;
47 | }
48 | });
49 | #endif
50 |
51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
54 |
55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
57 | return YES;
58 | }
59 | return NO;
60 | }];
61 | }
62 |
63 | #ifdef DEBUG
64 | RCTSetLogFunction(RCTDefaultLogFunction);
65 | #endif
66 |
67 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
68 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
69 | }
70 |
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore polyfills
9 | node_modules/react-native/Libraries/polyfills/.*
10 |
11 | ; These should not be required directly
12 | ; require from fbjs/lib instead: require('fbjs/lib/warning')
13 | node_modules/warning/.*
14 |
15 | ; Flow doesn't support platforms
16 | .*/Libraries/Utilities/LoadingView.js
17 |
18 | [untyped]
19 | .*/node_modules/@react-native-community/cli/.*/.*
20 |
21 | [include]
22 |
23 | [libs]
24 | node_modules/react-native/Libraries/react-native/react-native-interface.js
25 | node_modules/react-native/flow/
26 |
27 | [options]
28 | emoji=true
29 |
30 | esproposal.optional_chaining=enable
31 | esproposal.nullish_coalescing=enable
32 |
33 | module.file_ext=.js
34 | module.file_ext=.json
35 | module.file_ext=.ios.js
36 |
37 | munge_underscores=true
38 |
39 | module.name_mapper='^react-native$' -> '/node_modules/react-native/Libraries/react-native/react-native-implementation'
40 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1'
41 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub'
42 |
43 | suppress_type=$FlowIssue
44 | suppress_type=$FlowFixMe
45 | suppress_type=$FlowFixMeProps
46 | suppress_type=$FlowFixMeState
47 |
48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
50 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
51 |
52 | [lints]
53 | sketchy-null-number=warn
54 | sketchy-null-mixed=warn
55 | sketchy-number=warn
56 | untyped-type-import=warn
57 | nonstrict-import=warn
58 | deprecated-type=warn
59 | unsafe-getters-setters=warn
60 | inexact-spread=warn
61 | unnecessary-invariant=warn
62 | signature-verification-failure=warn
63 | deprecated-utility=error
64 |
65 | [strict]
66 | deprecated-type
67 | nonstrict-import
68 | sketchy-null
69 | unclear-type
70 | unsafe-getters-setters
71 | untyped-import
72 | untyped-type-import
73 |
74 | [version]
75 | ^0.105.0
76 |
--------------------------------------------------------------------------------
/src/reducers/AwsSlice.js:
--------------------------------------------------------------------------------
1 | import { createSlice } from '@reduxjs/toolkit';
2 |
3 | import AwsApi from '../api/AwsApi';
4 | import { startLoading, loadingFailed } from '../utils/LoadingUtils';
5 |
6 | const Aws = createSlice({
7 | name: 'Aws',
8 | initialState: {
9 | isLoading: false,
10 | error: null,
11 | selectedRegion: null,
12 | credentials: null,
13 | clusters: null,
14 | },
15 | reducers: {
16 | checkAwsCredentialsStart: startLoading,
17 | checkAwsCredentialsFailed: loadingFailed,
18 | checkAwsCredentialsSuccess(state, action) {
19 | const credentials = action.payload;
20 | state.credentials = credentials;
21 | state.isLoading = false;
22 | },
23 | deleteCredentials(state, action) {
24 | state.credentials = null;
25 | },
26 | fetchEksClustersStart: startLoading,
27 | fetchEksClustersFailed: loadingFailed,
28 | fetchEksClustersSuccess(state, action) {
29 | const clusters = action.payload;
30 | state.clusters = clusters;
31 | state.isLoading = false;
32 | },
33 | },
34 | });
35 |
36 | export const {
37 | checkAwsCredentialsStart,
38 | checkAwsCredentialsFailed,
39 | checkAwsCredentialsSuccess,
40 | deleteCredentials,
41 | fetchEksClustersStart,
42 | fetchEksClustersFailed,
43 | fetchEksClustersSuccess,
44 | } = Aws.actions;
45 |
46 | export default Aws.reducer;
47 |
48 | export const checkAwsCredentials = credentials =>
49 | async dispatch => {
50 | try {
51 | dispatch(checkAwsCredentialsStart());
52 | const data = await AwsApi.fetchEksClusterNames('us-west-2', credentials);
53 | if (data) {
54 | dispatch(checkAwsCredentialsSuccess(credentials));
55 | return true;
56 | } else {
57 | dispatch(checkAwsCredentialsFailed());
58 | return false;
59 | }
60 | } catch (err) {
61 | dispatch(checkAwsCredentialsFailed());
62 | return Promise.resolve(err);
63 | }
64 | };
65 |
66 | export const fetchEksClusters = region =>
67 | async (dispatch, getState) => {
68 | try {
69 | dispatch(fetchEksClustersStart());
70 | const state = getState();
71 | const AwsCredentials = state.aws.credentials;
72 | const clusters = await AwsApi.describeAllEksClusters(region, AwsCredentials);
73 | dispatch(fetchEksClustersSuccess(clusters));
74 | return Promise.resolve();
75 | } catch (err) {
76 | dispatch(fetchEksClustersFailed(err.toString()));
77 | }
78 | };
79 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/shipm8/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.shipm8;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 | import com.facebook.react.PackageList;
6 | import com.facebook.react.ReactApplication;
7 | import com.facebook.react.ReactNativeHost;
8 | import com.facebook.react.ReactPackage;
9 | import com.facebook.soloader.SoLoader;
10 | import java.lang.reflect.InvocationTargetException;
11 | import java.util.List;
12 |
13 | public class MainApplication extends Application implements ReactApplication {
14 |
15 | private final ReactNativeHost mReactNativeHost =
16 | new ReactNativeHost(this) {
17 | @Override
18 | public boolean getUseDeveloperSupport() {
19 | return BuildConfig.DEBUG;
20 | }
21 |
22 | @Override
23 | protected List getPackages() {
24 | @SuppressWarnings("UnnecessaryLocalVariable")
25 | List packages = new PackageList(this).getPackages();
26 | // Packages that cannot be autolinked yet can be added manually here, for example:
27 | // packages.add(new MyReactNativePackage());
28 | return packages;
29 | }
30 |
31 | @Override
32 | protected String getJSMainModuleName() {
33 | return "index";
34 | }
35 | };
36 |
37 | @Override
38 | public ReactNativeHost getReactNativeHost() {
39 | return mReactNativeHost;
40 | }
41 |
42 | @Override
43 | public void onCreate() {
44 | super.onCreate();
45 | SoLoader.init(this, /* native exopackage */ false);
46 | initializeFlipper(this); // Remove this line if you don't want Flipper enabled
47 | }
48 |
49 | /**
50 | * Loads Flipper in React Native templates.
51 | *
52 | * @param context
53 | */
54 | private static void initializeFlipper(Context context) {
55 | if (BuildConfig.DEBUG) {
56 | try {
57 | /*
58 | We use reflection here to pick up the class that initializes Flipper,
59 | since Flipper library is not available in release mode
60 | */
61 | Class> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
62 | aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
63 | } catch (ClassNotFoundException e) {
64 | e.printStackTrace();
65 | } catch (NoSuchMethodException e) {
66 | e.printStackTrace();
67 | } catch (IllegalAccessException e) {
68 | e.printStackTrace();
69 | } catch (InvocationTargetException e) {
70 | e.printStackTrace();
71 | }
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/src/reducers/PodsSlice.js:
--------------------------------------------------------------------------------
1 | import { createSlice } from '@reduxjs/toolkit';
2 |
3 | import K8sApi from '../api/K8sApi';
4 | import AlertUtils from '../utils/AlertUtils';
5 | import { getAuthToken } from './ClustersSlice';
6 | import { startLoading, loadingFailed } from '../utils/LoadingUtils';
7 |
8 | const Pods = createSlice({
9 | name: 'Pods',
10 | initialState: {
11 | current: null,
12 | isLoading: false,
13 | byCluster: {},
14 | },
15 | reducers: {
16 | setCurrentPod(state, action) {
17 | const pod = action.payload;
18 | state.current = pod.metadata.uid;
19 | },
20 | deletePodStart: startLoading,
21 | deletePodFailed: loadingFailed,
22 | deletePodSuccess(state, action) {
23 | const { cluster, uid } = action.payload;
24 | delete state.byCluster[cluster.url][uid];
25 | state.isLoading = false;
26 | },
27 | fetchPodsStart: startLoading,
28 | fetchPodsFailed: loadingFailed,
29 | fetchPodsSuccess(state, action) {
30 | const { cluster, podsByUid } = action.payload;
31 | state.byCluster[cluster.url] = podsByUid;
32 | state.isLoading = false;
33 | },
34 | },
35 | });
36 |
37 | export const {
38 | setCurrentPod,
39 | deletePodStart,
40 | deletePodFailed,
41 | deletePodSuccess,
42 | fetchPodsStart,
43 | fetchPodsFailed,
44 | fetchPodsSuccess,
45 | } = Pods.actions;
46 |
47 | export default Pods.reducer;
48 |
49 | // Thunks
50 | export const fetchPods = cluster =>
51 | async (dispatch, getState) => {
52 | try {
53 | const state = getState();
54 | if (state.pods.isLoading) { return; }
55 | dispatch(fetchPodsStart());
56 | const clusterWithAuth = await dispatch(getAuthToken(cluster));
57 | const pods = await K8sApi.fetchPods(clusterWithAuth);
58 | const podsByUid = {};
59 | pods.forEach(pod => {
60 | pod.kind = 'pods';
61 | podsByUid[pod.metadata.uid] = pod;
62 | });
63 | dispatch(fetchPodsSuccess({ cluster, podsByUid }));
64 | return Promise.resolve();
65 | } catch (err) {
66 | dispatch(fetchPodsFailed(err.toString()));
67 | }
68 | };
69 |
70 | export const deletePod = (cluster, pod) =>
71 | async dispatch => {
72 | try {
73 | dispatch(deletePodStart());
74 | const clusterWithAuth = await dispatch(getAuthToken(cluster));
75 | const response = await K8sApi.deleteEntity(clusterWithAuth, pod);
76 | if (response.kind === 'Pod') {
77 | const uid = response.metadata.uid;
78 | dispatch(deletePodSuccess({ cluster, uid }));
79 | return AlertUtils.deleteSuccessAlert(pod);
80 | } else {
81 | return AlertUtils.deleteFailedAlert(response);
82 | }
83 | } catch (err) {
84 | dispatch(deletePodFailed(err.toString()));
85 | }
86 | };
87 |
--------------------------------------------------------------------------------
/src/navigation/Routes.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { useSelector } from 'react-redux';
3 | import { createStackNavigator } from '@react-navigation/stack';
4 | import { TransitionPresets } from '@react-navigation/stack';
5 |
6 | import PodInfo from '../components/Pods/PodInfo';
7 | import Loading from '../components/common/Loading';
8 | import Welcome from '../components/common/Welcome';
9 | import PodsDisplay from '../components/Pods/PodsDisplay';
10 | import CloudLogin from '../components/common/CloudLogin';
11 | import AddCluster from '../components/Clusters/AddCluster';
12 | import ClustersIndex from '../components/Clusters/ClustersIndex';
13 |
14 | const RootStack = createStackNavigator();
15 |
16 | const forFade = ({ current }) => ({
17 | cardStyle: {
18 | opacity: current.progress,
19 | },
20 | });
21 |
22 | const RootStackScreen = ({ navigation, route }) => {
23 | const isReady = useSelector(state => state.clusters.isReady);
24 | const gcpSignedIn = useSelector(state => state.gcp.user !== null);
25 | const awsSignedIn = useSelector(state => state.aws.credentials !== null);
26 |
27 | const INITIAL_ROUTE_NAME = awsSignedIn || gcpSignedIn ? 'ShipM8' : 'Welcome';
28 |
29 | if (!isReady) {
30 | return (
31 |
32 | );
33 | }
34 |
35 | return (
36 |
48 |
56 |
63 |
68 | null,
75 | headerBackTitle: 'Cancel',
76 | headerBackTitleStyle: {
77 | marginLeft: 25,
78 | },
79 | }}
80 | />
81 |
82 |
83 |
84 | );
85 | };
86 |
87 | export default RootStackScreen;
88 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '12.0'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | target 'ShipM8' do
5 | # Pods for shipm8
6 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
7 | pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
8 | pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
9 | pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
10 | pod 'React', :path => '../node_modules/react-native/'
11 | pod 'React-Core', :path => '../node_modules/react-native/'
12 | pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
13 | pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
14 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
15 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
16 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
17 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
18 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
19 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
20 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
21 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
22 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
23 | pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
24 | pod 'GoogleSignIn', '~> 5.0.2'
25 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
26 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
27 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
28 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
29 | pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
30 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
31 | pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
32 |
33 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
34 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
35 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
36 |
37 |
38 | target 'ShipM8Tests' do
39 | inherit! :search_paths
40 | # Pods for testing
41 | end
42 |
43 | use_native_modules!
44 | end
45 |
46 | target 'ShipM8-tvOS' do
47 | # Pods for shipm8-tvOS
48 |
49 | target 'ShipM8-tvOSTests' do
50 | inherit! :search_paths
51 | # Pods for testing
52 | end
53 |
54 | end
55 |
--------------------------------------------------------------------------------
/__tests__/__snapshots__/Launch.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Launch Component renders correctly 1`] = `
4 |
17 |
27 | WELCOME
28 |
29 |
47 |
48 |
62 | Monitor Your K8s Clusters Anywhere!
63 |
64 |
73 |
80 |
101 |
111 | Get Started
112 |
113 |
114 |
115 |
116 |
117 | `;
118 |
--------------------------------------------------------------------------------
/src/api/AwsApi.js:
--------------------------------------------------------------------------------
1 | import { Base64 } from 'js-base64';
2 | import { sign } from '../utils/aws4';
3 |
4 | class AwsApi {
5 |
6 | /**
7 | *
8 | * AWS Kubernetes API Authorization from Outside a Cluster:
9 | * https://github.com/kubernetes-sigs/aws-iam-authenticator#api-authorization-from-outside-a-cluster
10 | *
11 | */
12 |
13 | static getAuthToken = (clusterName, AwsCredentials) => {
14 | /* Declare options for STS API Query */
15 | try {
16 | const queryOptions = {
17 | host: 'sts.amazonaws.com',
18 | service: 'sts',
19 | path: '/?Action=GetCallerIdentity&Version=2011-06-15&X-Amz-Expires=60',
20 | headers: {
21 | 'x-k8s-aws-id': clusterName,
22 | },
23 | signQuery: true,
24 | };
25 | /* Sign STS API Query with AWS4 Signature */
26 | const signedQuery = sign(queryOptions, AwsCredentials);
27 | /* Pull out signed host & path */
28 | const signedURL = `https://${signedQuery.host}${signedQuery.path}`;
29 | /* Base64 encode signed URL */
30 | const encodedURL = Base64.encodeURI(signedURL);
31 | /* Remove any Base64 encoding padding */
32 | const token = encodedURL.replace(/=+$/, '');
33 | /* Prepend result with required string */
34 | const authToken = `k8s-aws-v1.${token}`;
35 | return authToken;
36 | } catch (err) {
37 | return Promise.reject(err);
38 | }
39 | };
40 |
41 | static eksFetch = async (region, path, AwsCredentials) => {
42 | const queryOptions = {
43 | host: `eks.${region}.amazonaws.com`,
44 | path: path,
45 | };
46 | const query = sign(queryOptions, AwsCredentials);
47 | try {
48 | const res = await fetch(`https://eks.${region}.amazonaws.com${path}`, {
49 | headers: query.headers,
50 | });
51 | return res.json();
52 | }
53 | catch (err) {
54 | return Promise.reject(err);
55 | }
56 | };
57 |
58 | static fetchEksClusterNames = async (region, AwsCredentials) => {
59 | try {
60 | const clusters = await this.eksFetch(region, '/clusters', AwsCredentials);
61 | return clusters.clusters;
62 | }
63 | catch (err) {
64 | return Promise.reject(err);
65 | }
66 | };
67 |
68 | static describeAllEksClusters = async (region, AwsCredentials) => {
69 | try {
70 | const clusterNameList = await this.fetchEksClusterNames(region, AwsCredentials);
71 | const clusterList = await Promise.all(clusterNameList.map(async clusterName => {
72 | const cluster = await this.eksFetch(region, `/clusters/${clusterName}`, AwsCredentials);
73 | const newCluster = {
74 | url: cluster.cluster.endpoint,
75 | name: cluster.cluster.name,
76 | status: cluster.cluster.status,
77 | createdAt: cluster.cluster.createdAt,
78 | cloudProvider: 'aws',
79 | namespaces: [],
80 | };
81 | return newCluster;
82 | }));
83 | return clusterList;
84 | }
85 | catch (err) {
86 | return Promise.reject(err);
87 | }
88 | };
89 | }
90 |
91 | export default AwsApi;
92 |
--------------------------------------------------------------------------------
/src/components/common/Welcome.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { View, Text, Image, TouchableOpacity } from 'react-native';
3 | import EStyleSheet from 'react-native-extended-stylesheet';
4 |
5 | EStyleSheet.build();
6 |
7 | const Welcome = ({ navigation }) => {
8 | return (
9 |
10 |
11 |
12 | Mobile Kubernetes Monitoring
13 |
14 |
18 | +
19 |
20 |
25 |
26 |
27 | {
30 | navigation.reset({
31 | index: 0,
32 | routes: [{ name: 'Cloud Login' }],
33 | });
34 | }}>
35 |
36 | Get Started
37 |
38 |
39 |
40 |
41 | );
42 | };
43 |
44 | export default React.memo(Welcome);
45 |
46 | const styles = EStyleSheet.create({
47 | container: {
48 | flex: 1,
49 | width: '100%',
50 | backgroundColor: 'white',
51 | alignItems: 'center',
52 | },
53 | innerContainer: {
54 | flex: 1,
55 | width: '90%',
56 | alignItems: 'center',
57 | },
58 | getStartedText: {
59 | fontSize: '1.2rem',
60 | color: 'white',
61 | },
62 | buttonContainer: {
63 | alignItems: 'center',
64 | width: '70%',
65 | borderStyle: 'solid',
66 | borderColor: '#151B54',
67 | borderWidth: '.2rem',
68 | borderRadius: '.5rem',
69 | padding: '.7rem',
70 | backgroundColor: '#1589FF',
71 | marginBottom: '3rem',
72 | },
73 | bannerLineOne: {
74 | fontSize: '1.1rem',
75 | fontWeight: 'bold',
76 | color: '#151B54',
77 | },
78 | cloudLogoContainer: {
79 | flex: 1,
80 | flexDirection: 'row',
81 | width: '85%',
82 | alignItems: 'center',
83 | },
84 | textStyle: {
85 | color: '#151B54',
86 | fontSize: '1.3rem',
87 | fontWeight: 'bold',
88 | marginBottom: 5,
89 | },
90 | logo: {
91 | flex: 4,
92 | justifyContent: 'center',
93 | width: '100%',
94 | borderColor: '#151B54',
95 | borderWidth: '.2rem',
96 | borderRadius: '.5rem',
97 | marginTop: '8%',
98 | marginBottom: '5%',
99 | },
100 | googleCloud: {
101 | flex: 1,
102 | width: '2.2rem',
103 | height: '2.2rem',
104 | marginLeft: 15,
105 | marginRight: 15,
106 | },
107 | awsLogoContainer: {
108 | flex: 1,
109 | height: '2.3rem',
110 | marginBottom: '1rem',
111 | },
112 | awsLogo: {
113 | flex: 1,
114 | width: undefined,
115 | height: undefined,
116 | },
117 | });
118 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem http://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 |
35 | @rem Find java.exe
36 | if defined JAVA_HOME goto findJavaFromJavaHome
37 |
38 | set JAVA_EXE=java.exe
39 | %JAVA_EXE% -version >NUL 2>&1
40 | if "%ERRORLEVEL%" == "0" goto init
41 |
42 | echo.
43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44 | echo.
45 | echo Please set the JAVA_HOME variable in your environment to match the
46 | echo location of your Java installation.
47 |
48 | goto fail
49 |
50 | :findJavaFromJavaHome
51 | set JAVA_HOME=%JAVA_HOME:"=%
52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53 |
54 | if exist "%JAVA_EXE%" goto init
55 |
56 | echo.
57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58 | echo.
59 | echo Please set the JAVA_HOME variable in your environment to match the
60 | echo location of your Java installation.
61 |
62 | goto fail
63 |
64 | :init
65 | @rem Get command-line arguments, handling Windows variants
66 |
67 | if not "%OS%" == "Windows_NT" goto win9xME_args
68 |
69 | :win9xME_args
70 | @rem Slurp the command line arguments.
71 | set CMD_LINE_ARGS=
72 | set _SKIP=2
73 |
74 | :win9xME_args_slurp
75 | if "x%~1" == "x" goto execute
76 |
77 | set CMD_LINE_ARGS=%*
78 |
79 | :execute
80 | @rem Setup the command line
81 |
82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83 |
84 | @rem Execute Gradle
85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86 |
87 | :end
88 | @rem End local scope for the variables with windows NT shell
89 | if "%ERRORLEVEL%"=="0" goto mainEnd
90 |
91 | :fail
92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93 | rem the _cmd.exe /c_ return code!
94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95 | exit /b 1
96 |
97 | :mainEnd
98 | if "%OS%"=="Windows_NT" endlocal
99 |
100 | :omega
101 |
--------------------------------------------------------------------------------
/src/api/K8sApi.js:
--------------------------------------------------------------------------------
1 | import RNFetchBlob from 'rn-fetch-blob';
2 |
3 | class K8sApi {
4 |
5 | static apiFetch = async ({ apiUrl, cluster, method = 'get', body }) => {
6 | const { url: endpoint, token } = cluster;
7 |
8 | const url = endpoint.indexOf('https') !== -1
9 | ? endpoint
10 | : `https://${endpoint}`;
11 |
12 | const authHeader = {
13 | Authorization: `Bearer ${token}`,
14 | };
15 |
16 | try {
17 | const res = await RNFetchBlob.config({
18 | trusty: true,
19 | })
20 | .fetch(method, `${url}${apiUrl}`, authHeader, body);
21 | return res.json();
22 | }
23 | catch (err) {
24 | return Promise.reject(err);
25 | }
26 | };
27 |
28 | static post(apiUrl, cluster, body) {
29 | return this.apiFetch({ method: 'post', apiUrl, body, cluster });
30 | }
31 |
32 | static get(apiUrl, cluster) {
33 | return this.apiFetch({ method: 'get', apiUrl, cluster });
34 | }
35 |
36 | static put(apiUrl, cluster, body) {
37 | return this.apiFetch({ method: 'put', apiUrl, body, cluster });
38 | }
39 |
40 | static patch(apiUrl, cluster, body) {
41 | return this.apiFetch({ method: 'patch', apiUrl, body, cluster });
42 | }
43 |
44 | static delete(apiUrl, cluster, body) {
45 | return this.apiFetch({ method: 'delete', apiUrl, body, cluster });
46 | }
47 |
48 | static fetchNamespaces = async cluster => {
49 | const res = await this.get('/api/v1/namespaces', cluster);
50 | return res.items.map(namespace => namespace.metadata.name);
51 | }
52 |
53 | static checkCluster = async cluster => {
54 | try {
55 | const response = await this.get('/api/v1', cluster);
56 | return Promise.resolve({ up: true, response });
57 | } catch (err) {
58 | if (err.message.indexOf('Unauthorized') !== -1) {
59 | return Promise.resolve({ up: true, response: 'Unauthorized' });
60 | }
61 | return Promise.resolve({ up: false });
62 | }
63 | }
64 |
65 | static fetchPods = async cluster => {
66 | const podsList = await this.get('/api/v1/pods', cluster);
67 | return podsList.items;
68 | }
69 |
70 | static deleteEntity = async (cluster, entity) => {
71 | const entityType = entity.kind.toLowerCase();
72 | const url = `/api/v1/namespaces/${entity.metadata.namespace}/${entityType}/${entity.metadata.name}`;
73 | return await this.delete(url, cluster);
74 | }
75 |
76 | static fetchNodes = async cluster => {
77 | return await this.get('/api/v1/nodes', cluster);
78 | }
79 |
80 | static fetchServices = async cluster => {
81 | return await this.get('/api/v1/services', cluster);
82 | }
83 |
84 | static fetchDeployments = async cluster => {
85 | return await this.get('/apis/apps/v1/deployments', cluster);
86 | }
87 |
88 | static fetchReplicaSets = async cluster => {
89 | return await this.get('/apis/apps/v1/replicasets', cluster);
90 | }
91 |
92 | static fetchReplicationControllers = async cluster => {
93 | return await this.get('/api/v1/replicationcontrollers', cluster);
94 | }
95 |
96 | static fetchIngresses = async cluster => {
97 | return await this.get('/apis/networking.k8s.io/v1beta1/ingresses', cluster);
98 | }
99 |
100 | static fetchEndpoints = async cluster => {
101 | return await this.get('/api/v1/endpoints', cluster);
102 | }
103 |
104 | static fetchSecrets = async cluster => {
105 | return await this.get('/api/v1/secrets', cluster);
106 | }
107 |
108 | }
109 |
110 | export default K8sApi;
111 |
--------------------------------------------------------------------------------
/ios/shipm8/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/data/FakeData.js:
--------------------------------------------------------------------------------
1 | // AwsApi.fetchPodInfo(`https://56A5C5E4A41FCDF92D169B33AB0A5A5F.sk1.us-west-2.eks.amazonaws.com`, 'default', 'repark-deployment-7997f8b86d-4k5dd', 'awsTestCluster1')
2 | // .then(res => console.log(res.spec.containers[0]))
3 | // gray #EFEFF4
4 | /***/
5 | const fetchPods = {
6 | apiVersion: "v1",
7 | kind: "Pod",
8 | metadata: {
9 | annotations: {
10 | "kubernetes.io/psp": "eks.privileged"
11 | },
12 | creationTimestamp: "2020-01-29T00:27:40Z",
13 | generateName: "repark-deployment-7997f8b86d-",
14 | labels: {
15 | "pod-template-hash": "7997f8b86d", "repark": "web"
16 | },
17 | name: "repark-deployment-7997f8b86d-4k5dd",
18 | namespace: "default",
19 | ownerReferences: [[Object]],
20 | resourceVersion: "5456",
21 | selfLink: "/api/v1/namespaces/default/pods/repark-deployment-7997f8b86d-4k5dd",
22 | uid: "287db3d7-422e-11ea-a037-02b853562b6a"
23 | },
24 | spec: {
25 | containers: [[Object]],
26 | dnsPolicy: "ClusterFirst",
27 | enableServiceLinks: true,
28 | priority: 0,
29 | restartPolicy: "Always",
30 | schedulerName: "default-scheduler",
31 | securityContext: {},
32 | serviceAccount: "default",
33 | serviceAccountName: "default",
34 | terminationGracePeriodSeconds: 30,
35 | tolerations: [[Object], [Object]],
36 | volumes: [[Object]]
37 | },
38 | status: {
39 | conditions: [[Object]],
40 | phase: "Pending",
41 | qosClass: "BestEffort"
42 | }
43 | }
44 |
45 | // metadata.ownerReferences: [{"apiVersion": "apps/v1", "blockOwnerDeletion": true, "controller": true, "kind": "ReplicaSet", "name": "repark-deployment-7997f8b86d", "uid": "287b9558-422e-11ea-a037-02b853562b6a"}]
46 |
47 | // spec: {"containers": [{"image": "051216103138.dkr.ecr.us-west-2.amazonaws.com/repark/repark:1.1", "imagePullPolicy": "IfNotPresent", "name": "repark-site", "resources": [Object], "terminationMessagePath":
48 | // "/dev/termination-log", "terminationMessagePolicy": "File", "volumeMounts": [Array]}], "dnsPolicy": "ClusterFirst", "enableServiceLinks": true, "priority": 0, "restartPolicy": "Always",
49 | // "schedulerName": "default-scheduler", "securityContext": {}, "serviceAccount": "default", "serviceAccountName": "default", "terminationGracePeriodSeconds": 30, "tolerations": [{"effect": "NoExecute",
50 | // "key": "node.kubernetes.io/not-ready", "operator": "Exists", "tolerationSeconds": 300}, {"effect": "NoExecute",
51 | // "key": "node.kubernetes.io/unreachable", "operator": "Exists", "tolerationSeconds": 300}], "volumes": [{"name": "default-token-5rr84", "secret": [Object]}]}
52 |
53 | // spec.containers: [{"image": "051216103138.dkr.ecr.us-west-2.amazonaws.com/repark/repark:1.1", "imagePullPolicy": "IfNotPresent", "name": "repark-site", "resources": {},
54 | // "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File", "volumeMounts": [[Object]]}]
55 |
56 | // spec.containers[0]: {"image": "051216103138.dkr.ecr.us-west-2.amazonaws.com/repark/repark:1.1", "imagePullPolicy": "IfNotPresent", "name": "repark-site", "resources": {},
57 | // "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File", "volumeMounts": [{"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
58 | // "name": "default-token-5rr84", "readOnly": true}]}
59 |
60 | const GoogleCloudApigetProjects = {
61 | projects: [
62 | {
63 | createTime: "2020-01-18T20:27:17.915Z",
64 | lifecycleState: "ACTIVE",
65 | name: "My Project 66285",
66 | projectId: "primordial-saga-265520",
67 | projectNumber: "535704856722"
68 | },
69 | {
70 | createTime: "2020-01-14T22:42:41.634Z",
71 | lifecycleState: "ACTIVE",
72 | name: "Learning Kubernetes",
73 | projectId: "learning-kubernetes-265122",
74 | projectNumber: "1048432399638"
75 | }
76 | ]
77 | }
--------------------------------------------------------------------------------
/src/components/Clusters/ClustersIndex.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useCallback } from 'react';
2 | import {
3 | View,
4 | Button,
5 | SafeAreaView,
6 | TouchableOpacity,
7 | } from 'react-native';
8 | import { useDispatch, useSelector } from 'react-redux';
9 | import Icon from 'react-native-vector-icons/FontAwesome';
10 | import { Dropdown } from 'react-native-material-dropdown';
11 | import EStyleSheet from 'react-native-extended-stylesheet';
12 |
13 | import {
14 | checkClusters,
15 | removeCluster,
16 | fetchNamespaces,
17 | setCurrentCluster,
18 | setCurrentProvider,
19 | } from '../../reducers/ClustersSlice';
20 | import AlertUtils from '../../utils/AlertUtils';
21 | import SwipeableList from '../common/SwipeableList';
22 | import CloudProviders from '../../data/CloudProviders';
23 |
24 | const ClustersIndex = ({ navigation }) => {
25 | const dispatch = useDispatch();
26 |
27 | const currentProvider = useSelector(state =>
28 | state.clusters.currentProvider
29 | );
30 |
31 | const clusters = useSelector(state => {
32 | return Object.values(state.clusters.byUrl)
33 | .filter(cluster => cluster.cloudProvider === currentProvider);
34 | });
35 |
36 | useEffect(() => {
37 | dispatch(checkClusters());
38 | }, [dispatch]);
39 |
40 | const handleProviderChange = useCallback(provider => {
41 | dispatch(setCurrentProvider(provider));
42 | }, [dispatch]);
43 |
44 | const handleClusterPress = useCallback(cluster => {
45 | dispatch(setCurrentCluster(cluster));
46 | dispatch(fetchNamespaces(cluster));
47 | navigation.navigate('Pods');
48 | }, [dispatch, navigation]);
49 |
50 | const handleDeletePress = useCallback(cluster => {
51 | AlertUtils.deleteEntityPrompt(
52 | cluster.name,
53 | () => dispatch(removeCluster(cluster))
54 | );
55 | }, [dispatch]);
56 |
57 | const handleRefresh = useCallback(async () => {
58 | return await dispatch(checkClusters());
59 | }, [dispatch]);
60 |
61 | return (
62 |
63 |
64 |
74 |
75 |
82 | < View >
83 | navigation.navigate('Add Cluster')}>
84 |
90 |
91 |
92 |
93 |
99 |
100 | );
101 | };
102 |
103 | export default React.memo(ClustersIndex);
104 |
105 | const styles = EStyleSheet.create({
106 | noContentText: {
107 | textAlign: 'center',
108 | marginTop: '9rem',
109 | fontSize: '1.3rem',
110 | color: 'gray',
111 | },
112 | dropDown: {
113 | textAlign: 'center',
114 | alignItems: 'center',
115 | fontSize: '1.1rem',
116 | },
117 | dropDownView: {
118 | width: '90%',
119 | alignSelf: 'center',
120 | marginTop: '8%',
121 | backgroundColor: 'white',
122 | },
123 | dropDownOffset: {
124 | top: 15,
125 | left: 0,
126 | },
127 | safeArea: {
128 | backgroundColor: 'white',
129 | marginHorizontal: '3%',
130 | height: '100%',
131 | },
132 | clusterScroll: {
133 | marginTop: '3%',
134 | borderRadius: 5,
135 | marginBottom: '.2rem',
136 | backgroundColor: 'white',
137 | },
138 | signOut: {
139 | marginTop: '3rem',
140 | backgroundColor: 'white',
141 | width: '30%',
142 | alignSelf: 'center',
143 | },
144 | addClusterIcon: {
145 | alignSelf: 'center',
146 | marginBottom: '-1.7rem',
147 | },
148 | });
149 |
--------------------------------------------------------------------------------
/src/reducers/ClustersSlice.js:
--------------------------------------------------------------------------------
1 | import { createSlice } from '@reduxjs/toolkit';
2 |
3 | import AwsApi from '../api/AwsApi';
4 | import K8sApi from '../api/K8sApi';
5 | import GoogleCloudApi from '../api/GoogleCloudApi';
6 | import { startLoading, loadingFailed } from '../utils/LoadingUtils';
7 |
8 | const Clusters = createSlice({
9 | name: 'Clusters',
10 | initialState: {
11 | isReady: true,
12 | isLoading: false,
13 | current: null,
14 | error: null,
15 | currentProvider: null,
16 | byUrl: {},
17 | },
18 | reducers: {
19 | addCluster(state, action) {
20 | const clusterToAdd = action.payload;
21 | state.byUrl[clusterToAdd.url] = clusterToAdd;
22 | },
23 | removeCluster(state, action) {
24 | const clusterToRemove = action.payload;
25 | delete state.byUrl[clusterToRemove.url];
26 | },
27 | updateCluster(state, action) {
28 | const updatedCluster = action.payload;
29 | state.byUrl[updatedCluster.url] = updatedCluster;
30 | },
31 | setCurrentCluster(state, action) {
32 | const selectedCluster = action.payload;
33 | state.current = selectedCluster.url;
34 | },
35 | setCurrentNamespace(state, action) {
36 | const { currentCluster: cluster, namespace } = action.payload;
37 | state.byUrl[cluster.url].currentNamespace = namespace;
38 | },
39 | setCurrentProvider(state, action) {
40 | const provider = action.payload;
41 | state.currentProvider = provider;
42 | },
43 | getAuthTokenFailed: loadingFailed,
44 | getAuthTokenSuccess(state, action) {
45 | const { cluster, token } = action.payload;
46 | state.byUrl[cluster.url].token = token;
47 | },
48 | checkClusterStart(state, action) {
49 | const cluster = action.payload;
50 | state.byUrl[cluster.url].status = 'CHECKING';
51 | },
52 | checkClusterSuccess(state, action) {
53 | const { cluster, up, response } = action.payload;
54 | if (state.byUrl[cluster.url]) {
55 | let newStatus = up ? 'RUNNING' : 'DOWN';
56 | if (response === 'Unauthorized') {
57 | newStatus = 'UNAUTHORIZED';
58 | }
59 | state.byUrl[cluster.url].status = newStatus;
60 | }
61 | },
62 | fetchNamespacesStart: startLoading,
63 | fetchNamespacesFailed: loadingFailed,
64 | fetchNamespacesSuccess(state, action) {
65 | const { cluster, namespaces } = action.payload;
66 | state.byUrl[cluster.url].namespaces = namespaces;
67 | state.isLoading = false;
68 | },
69 | },
70 | });
71 |
72 | export const {
73 | addCluster,
74 | removeCluster,
75 | updateCluster,
76 | setCurrentCluster,
77 | setCurrentNamespace,
78 | setCurrentProvider,
79 | getAuthTokenSuccess,
80 | getAuthTokenFailed,
81 | checkClusterStart,
82 | checkClusterSuccess,
83 | fetchNamespacesStart,
84 | fetchNamespacesSuccess,
85 | fetchNamespacesFailed,
86 | } = Clusters.actions;
87 |
88 | export default Clusters.reducer;
89 |
90 | // Thunks
91 | export const checkClusters = () =>
92 | async (dispatch, getState) => {
93 | const state = getState();
94 | const clusters = Object.values(state.clusters.byUrl);
95 | return Promise.all(clusters.map(cluster => {
96 | return dispatch(checkCluster(cluster));
97 | }));
98 | };
99 |
100 | export const checkCluster = cluster =>
101 | async dispatch => {
102 | dispatch(checkClusterStart(cluster));
103 | const { up, response } = await K8sApi.checkCluster(cluster);
104 | dispatch(checkClusterSuccess({ cluster, up, response }));
105 | return Promise.resolve();
106 | };
107 |
108 | export const fetchNamespaces = cluster =>
109 | async dispatch => {
110 | try {
111 | dispatch(fetchNamespacesStart());
112 | const clusterWithToken = await dispatch(getAuthToken(cluster));
113 | const namespaces = await K8sApi.fetchNamespaces(clusterWithToken);
114 | dispatch(fetchNamespacesSuccess({ cluster: clusterWithToken, namespaces }));
115 | } catch (err) {
116 | dispatch(fetchNamespacesFailed(err.toString()));
117 | return Promise.reject(err);
118 | }
119 | };
120 |
121 | export const getAuthToken = cluster =>
122 | async (dispatch, getState) => {
123 | try {
124 | let state = getState();
125 | let token;
126 |
127 | if (cluster.cloudProvider === 'aws') {
128 | token = AwsApi.getAuthToken(cluster.name, state.aws.credentials);
129 | } else if (cluster.cloudProvider === 'gcp') {
130 | token = await GoogleCloudApi.refreshAccessToken(state.gcp.user.refreshToken);
131 | }
132 |
133 | dispatch(getAuthTokenSuccess({ cluster, token }));
134 | state = getState();
135 | const clusterWithToken = state.clusters.byUrl[cluster.url];
136 | return Promise.resolve(clusterWithToken);
137 | } catch (err) {
138 | dispatch(getAuthTokenFailed(err.toString()));
139 | return Promise.reject(err);
140 | }
141 | };
142 |
--------------------------------------------------------------------------------
/src/components/Pods/PodInfo.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {
3 | View,
4 | Text,
5 | Image,
6 | ScrollView,
7 | SafeAreaView,
8 | } from 'react-native';
9 | import { useSelector } from 'react-redux';
10 | import { Badge, Divider } from 'react-native-elements';
11 | import EStyleSheet from 'react-native-extended-stylesheet';
12 |
13 | const PodInfo = ({ navigation }) => {
14 | const currentPod = useSelector(
15 | state => state.pods.byCluster[state.clusters.current][state.pods.current],
16 | );
17 |
18 | const checkStatus = text => {
19 | if (text === 'Running') {
20 | return 'success';
21 | } else if (text === 'Pending') {
22 | return 'warning';
23 | } else {
24 | return 'error';
25 | }
26 | };
27 |
28 | return (
29 |
30 |
31 |
32 |
33 |
37 |
38 |
39 | Name:{' '}
40 | {currentPod.metadata.name}
41 |
42 |
43 |
44 | Namespace:{' '}
45 |
46 | {currentPod.metadata.namespace}
47 |
48 |
49 |
50 |
51 | Status:{' '}
52 | {currentPod.status.phase}
53 |
54 |
55 |
56 |
57 |
58 |
59 | Host IP:{' '}
60 | {currentPod.status.hostIP}
61 |
62 |
63 |
64 | Pod IP:{' '}
65 | {currentPod.status.podIP}
66 |
67 |
68 |
69 | Time Created:{' '}
70 |
71 | {currentPod.metadata.creationTimestamp}
72 |
73 |
74 |
75 |
76 | Labels:{' '}
77 |
78 | {Object.keys(currentPod.metadata.labels).length > 0 &&
79 | Object.keys(currentPod.metadata.labels).map(label => {
80 | return `${label}:${currentPod.metadata.labels[label]}`;
81 | })}
82 | {' '}
83 |
84 |
85 |
86 | UID:{' '}
87 | {currentPod.metadata.uid}{' '}
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | );
96 | };
97 |
98 | export default React.memo(PodInfo);
99 |
100 | const styles = EStyleSheet.create({
101 | container: {
102 | flex: 1,
103 | backgroundColor: 'white',
104 | justifyContent: 'center',
105 | alignItems: 'center',
106 | },
107 | podScroll: {
108 | backgroundColor: 'white',
109 | borderStyle: 'solid',
110 | borderColor: '#063CB9',
111 | borderWidth: 2,
112 | borderRadius: 10,
113 | marginTop: '5%',
114 | marginHorizontal: '0%',
115 | color: 'white',
116 | },
117 | safeArea: {
118 | backgroundColor: 'white',
119 | marginHorizontal: '3%',
120 | height: '100%',
121 | },
122 | text: {
123 | fontSize: '.95rem',
124 | marginBottom: '1rem',
125 | marginTop: '1.4rem',
126 | color: 'gray',
127 | },
128 | outerTextView: {
129 | marginHorizontal: '3%',
130 | marginTop: '2%',
131 | },
132 | innerTextView: {
133 | backgroundColor: 'white',
134 | marginTop: '6%',
135 | borderRadius: 5,
136 | height: '100%',
137 | },
138 | innerText: {
139 | color: 'black',
140 | overflow: 'scroll',
141 | },
142 |
143 | podLogo: {
144 | width: '7rem',
145 | height: '7rem',
146 | alignSelf: 'center',
147 | marginTop: '-1rem',
148 | },
149 | });
150 |
--------------------------------------------------------------------------------
/src/reducers/GoogleCloudSlice.js:
--------------------------------------------------------------------------------
1 | import { createSlice } from '@reduxjs/toolkit';
2 |
3 | import GoogleCloudApi from '../api/GoogleCloudApi';
4 | import { startLoading, loadingFailed } from '../utils/LoadingUtils';
5 |
6 | const GoogleCloud = createSlice({
7 | name: 'GoogleCloud',
8 | initialState: {
9 | isLoading: false,
10 | error: null,
11 | user: null,
12 | zones: null,
13 | projects: null,
14 | clusters: null,
15 | },
16 | reducers: {
17 | fetchGcpProjectsStart: startLoading,
18 | fetchGcpProjectsFailed: loadingFailed,
19 | fetchGcpProjectsSuccess(state, action) {
20 | const projects = action.payload;
21 | state.projects = projects;
22 | state.isLoading = false;
23 | },
24 | fetchGcpZonesStart: startLoading,
25 | fetchGcpZonesFailed: loadingFailed,
26 | fetchGcpZonesSuccess(state, action) {
27 | const zones = action.payload;
28 | state.zones = zones;
29 | state.isLoading = false;
30 | },
31 | fetchGkeClustersStart: startLoading,
32 | fetchGkeClustersFailed: loadingFailed,
33 | fetchGkeClustersSuccess(state, action) {
34 | const clusters = action.payload;
35 | state.clusters = clusters;
36 | state.isLoading = false;
37 | },
38 | googleSignInStart: startLoading,
39 | googleSignInFailed: loadingFailed,
40 | googleSignInSuccess(state, action) {
41 | const user = action.payload;
42 | state.user = user;
43 | state.isLoading = false;
44 | },
45 | googleSignOutStart: startLoading,
46 | googleSignOutFailed: loadingFailed,
47 | googleSignOutSuccess(state, action) {
48 | state.user = null;
49 | state.isLoading = false;
50 | },
51 | },
52 | });
53 |
54 | export const {
55 | fetchGcpProjectsStart,
56 | fetchGcpProjectsFailed,
57 | fetchGcpProjectsSuccess,
58 | fetchGcpZonesStart,
59 | fetchGcpZonesFailed,
60 | fetchGcpZonesSuccess,
61 | fetchGkeClustersStart,
62 | fetchGkeClustersFailed,
63 | fetchGkeClustersSuccess,
64 | googleSignInStart,
65 | googleSignInFailed,
66 | googleSignInSuccess,
67 | googleSignOutStart,
68 | googleSignOutFailed,
69 | googleSignOutSuccess,
70 | } = GoogleCloud.actions;
71 |
72 | export default GoogleCloud.reducer;
73 |
74 | // Thunks
75 | export const googleSignIn = () =>
76 | async dispatch => {
77 | try {
78 | dispatch(googleSignInStart());
79 | const user = await GoogleCloudApi.signIn();
80 | if (!user) {
81 | dispatch(googleSignInFailed('Sign in Canceled'));
82 | return Promise.resolve('Sign in Canceled');
83 | }
84 | dispatch(googleSignInSuccess(user));
85 | return Promise.resolve(true);
86 | } catch (err) {
87 | dispatch(googleSignInFailed(err.toString()));
88 | return Promise.reject(err);
89 | }
90 | };
91 |
92 | export const googleSignOut = () =>
93 | async dispatch => {
94 | try {
95 | dispatch(googleSignOutStart());
96 | await GoogleCloudApi.signOut();
97 | dispatch(googleSignOutSuccess());
98 | return Promise.resolve();
99 | } catch (err) {
100 | dispatch(googleSignOutFailed(err.toString()));
101 | return Promise.reject(err);
102 | }
103 | };
104 |
105 | export const fetchGkeClusters = (projectId, zone) =>
106 | async (dispatch, getState) => {
107 | try {
108 | const state = getState();
109 | dispatch(fetchGkeClustersStart());
110 | const refreshToken = state.gcp.user.refreshToken;
111 | const clusters = await GoogleCloudApi.fetchGkeClusters({ projectId, zone, refreshToken });
112 | dispatch(fetchGkeClustersSuccess(clusters));
113 | return Promise.resolve();
114 | } catch (err) {
115 | dispatch(fetchGkeClustersFailed(err.toString()));
116 | return Promise.reject(err);
117 | }
118 | };
119 |
120 | export const fetchGcpProjects = pageToken =>
121 | async (dispatch, getState) => {
122 | try {
123 | const state = getState();
124 | dispatch(fetchGcpProjectsStart());
125 | const refreshToken = state.gcp.user.refreshToken;
126 | const projects = await GoogleCloudApi.fetchProjects({ pageToken, refreshToken });
127 | if (projects.error) {
128 | dispatch(fetchGcpProjectsFailed(projects.error.toString()));
129 | return Promise.reject(projects.error.message);
130 | }
131 | dispatch(fetchGcpProjectsSuccess(projects.projects));
132 | if (projects.nextPageToken) { return dispatch(fetchGcpProjects(projects.nextPageToken)); }
133 | return Promise.resolve();
134 | } catch (err) {
135 | dispatch(fetchGcpProjectsFailed(err.toString()));
136 | return Promise.reject(err);
137 | }
138 | };
139 |
140 | export const fetchGcpZones = (projectId, pageToken) =>
141 | async (dispatch, getState) => {
142 | try {
143 | dispatch(fetchGcpZonesStart());
144 | const state = getState();
145 | const refreshToken = state.gcp.user.refreshToken;
146 | const zones = await GoogleCloudApi.fetchZones({ projectId, pageToken, refreshToken });
147 | dispatch(fetchGcpZonesSuccess(zones.zones));
148 | if (zones.nextPageToken) {
149 | return dispatch(fetchGcpZones(projectId, zones.nextPageToken));
150 | }
151 | return Promise.resolve();
152 | } catch (err) {
153 | dispatch(fetchGcpZonesFailed(err.toString()));
154 | return Promise.reject(err);
155 | }
156 | };
157 |
--------------------------------------------------------------------------------
/src/api/GoogleCloudApi.js:
--------------------------------------------------------------------------------
1 | import {
2 | GoogleSignin,
3 | statusCodes,
4 | } from '@react-native-community/google-signin';
5 |
6 | const googleInfo = {
7 | iosClientId: '535704856722-soaqblnbbcf050at58k7bhbenk9fui5p.apps.googleusercontent.com',
8 | webClientId: '535704856722-bkjtacpeoclh9is24uuddft3mujs9h5u.apps.googleusercontent.com',
9 | webClientSecret: 'avRYeo9c9VYDGk9SgGJarvO-',
10 | };
11 |
12 | class GoogleCloudApi {
13 | static configureGoogleSignin = () => {
14 | GoogleSignin.configure({
15 | offlineAccess: true,
16 | iosClientId: googleInfo.iosClientId,
17 | webClientId: googleInfo.webClientId,
18 | scopes: ['https://www.googleapis.com/auth/cloud-platform'],
19 | });
20 | };
21 |
22 | static signIn = async () => {
23 | try {
24 | this.configureGoogleSignin();
25 | await GoogleSignin.hasPlayServices();
26 | const user = await GoogleSignin.signIn();
27 | const tokens = await this.getAuthTokens(user.serverAuthCode);
28 | user.accessToken = tokens.access_token;
29 | user.refreshToken = tokens.refresh_token;
30 | return user;
31 | } catch (error) {
32 | if (error.code === statusCodes.SIGN_IN_CANCELLED) {
33 | // user cancelled the login flow
34 | return false;
35 | } else if (error.code === statusCodes.IN_PROGRESS) {
36 | // operation (e.g. sign in) is in progress already
37 | return false;
38 | } else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
39 | // play services not available or outdated
40 | return false;
41 | } else {
42 | // some other error happened
43 | return false;
44 | }
45 | }
46 | };
47 |
48 | static refreshAccessToken = async refreshToken => {
49 | const url = 'https://oauth2.googleapis.com/token?' +
50 | `client_id=${googleInfo.webClientId}&` +
51 | `client_secret=${googleInfo.webClientSecret}&` +
52 | `refresh_token=${refreshToken}&` +
53 | 'grant_type=refresh_token';
54 |
55 | const newAccessToken = await fetch(url, {
56 | method: 'POST',
57 | headers: {
58 | 'Content-Type': 'application/x-www-form-urlencoded',
59 | },
60 | }).then(res => res.json());
61 |
62 | return newAccessToken.access_token;
63 | }
64 |
65 | static getAuthTokens = async serverAuthCode => {
66 | try {
67 | const url = 'https://oauth2.googleapis.com/token?' +
68 | `client_id=${googleInfo.webClientId}&` +
69 | `client_secret=${googleInfo.webClientSecret}&` +
70 | `code=${serverAuthCode}&` +
71 | 'grant_type=authorization_code&' +
72 | 'redirect_uri=';
73 |
74 | const tokens = await fetch(url, {
75 | method: 'POST',
76 | headers: {
77 | 'Content-Type': 'application/x-www-form-urlencoded',
78 | },
79 | }).then(res => res.json());
80 |
81 | return tokens;
82 | } catch (err) {
83 | return Promise.reject(err);
84 | }
85 | }
86 |
87 | static signOut = async () => {
88 | try {
89 | await GoogleSignin.revokeAccess();
90 | await GoogleSignin.signOut();
91 | return Promise.resolve();
92 | } catch (err) {
93 | return Promise.reject(err);
94 | }
95 | };
96 |
97 | static gcpFetch = async ({ url, method = 'get', body, refreshToken }) => {
98 | const accessToken = await this.refreshAccessToken(refreshToken);
99 |
100 | const headers = {
101 | Authorization: `Bearer ${accessToken}`,
102 | };
103 |
104 | const res = await fetch(url, {
105 | headers,
106 | method,
107 | body,
108 | });
109 |
110 | return res.json();
111 | }
112 |
113 | static fetchProjects = async ({ pageToken, refreshToken }) => {
114 | const url = pageToken
115 | ? `https://cloudresourcemanager.googleapis.com/v1/projects?pageSize=50&pageToken=${pageToken}`
116 | : 'https://cloudresourcemanager.googleapis.com/v1/projects?pageSize=50';
117 |
118 | try {
119 | const projects = await this.gcpFetch({ url, refreshToken });
120 |
121 | if (projects.error) {
122 | return alert(projects.error.message);
123 | }
124 | return projects;
125 |
126 | } catch (err) {
127 | Promise.reject(err);
128 | }
129 | }
130 |
131 | static fetchZones = async ({ projectId, pageToken, refreshToken }) => {
132 | const url = pageToken
133 | ? `https://compute.googleapis.com/compute/v1/projects/${projectId}/zones?pageToken=${pageToken}`
134 | : `https://compute.googleapis.com/compute/v1/projects/${projectId}/zones`;
135 |
136 | try {
137 | const zones = await this.gcpFetch({ url, refreshToken });
138 | if (zones.error) {
139 | return alert(zones.error.message);
140 | }
141 | return zones;
142 |
143 | } catch (err) {
144 | return Promise.reject(err);
145 | }
146 | }
147 |
148 | static fetchGkeClusters = async ({ projectId, zone = '-', refreshToken }) => {
149 | try {
150 | const url = `https://container.googleapis.com/v1/projects/${projectId}/locations/${zone}/clusters`;
151 | const clusters = await this.gcpFetch({ url, refreshToken });
152 | if (!clusters.clusters) { return []; }
153 | const clusterList = clusters.clusters.map(cluster => {
154 | return {
155 | url: cluster.endpoint,
156 | name: cluster.name,
157 | status: cluster.status,
158 | createdAt: cluster.createTime,
159 | cloudProvider: 'gcp',
160 | namespaces: [],
161 | };
162 | });
163 | if (clusters.error) {
164 | return alert(clusters.error.message);
165 | }
166 | return clusterList;
167 |
168 | } catch (err) {
169 | return Promise.reject(err);
170 | }
171 | }
172 | }
173 |
174 | export default GoogleCloudApi;
175 |
--------------------------------------------------------------------------------
/src/components/Pods/PodsDisplay.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect, useCallback } from 'react';
2 | import {
3 | View,
4 | ScrollView,
5 | SafeAreaView,
6 | } from 'react-native';
7 | import { Dropdown } from 'react-native-material-dropdown';
8 | import EStyleSheet from 'react-native-extended-stylesheet';
9 | import { useDispatch, useSelector, shallowEqual } from 'react-redux';
10 |
11 | import Loading from '../common/Loading';
12 | import AlertUtils from '../../utils/AlertUtils';
13 | import SwipeableList from '../common/SwipeableList';
14 | import { setCurrentNamespace } from '../../reducers/ClustersSlice';
15 | import { setCurrentPod, fetchPods, deletePod } from '../../reducers/PodsSlice';
16 |
17 | const PodsDisplay = ({ navigation }) => {
18 | const dispatch = useDispatch();
19 | const [isRefreshing, setIsRefreshing] = useState(false);
20 |
21 | const isLoading = useSelector(state => state.pods.isLoading);
22 | const currentCluster = useSelector(state =>
23 | state.clusters.byUrl[state.clusters.current]
24 | );
25 | const currentNamespace = useSelector(state =>
26 | state.clusters.byUrl[state.clusters.current].currentNamespace
27 | );
28 |
29 | useEffect(() => {
30 | dispatch(fetchPods(currentCluster));
31 | }, [currentCluster, dispatch]);
32 |
33 | const filterPods = podsToFilter => {
34 | return podsToFilter
35 | .filter(pod => {
36 | if (!currentNamespace || currentNamespace === 'All Namespaces') { return true; }
37 | return pod.metadata.namespace === currentNamespace;
38 | });
39 | };
40 |
41 | const pods = useSelector(state => {
42 | if (state.pods.byCluster[currentCluster.url]) {
43 | const allPods = Object.values(state.pods.byCluster[currentCluster.url]);
44 | return filterPods(allPods);
45 | }
46 | return [];
47 | }, shallowEqual);
48 |
49 | const handleNamespaceChange = useCallback(namespace => {
50 | dispatch(setCurrentNamespace({ currentCluster, namespace }));
51 | }, [currentCluster, dispatch]);
52 |
53 | const handlePodPress = useCallback(pod => {
54 | dispatch(setCurrentPod(pod));
55 | navigation.navigate('Pod Details');
56 | }, [dispatch, navigation]);
57 |
58 | const handleDeletePress = useCallback(pod => {
59 | AlertUtils.deleteEntityPrompt(
60 | pod,
61 | () => dispatch(deletePod(currentCluster, pod))
62 | );
63 | }, [currentCluster, dispatch]);
64 |
65 | const handleRefresh = useCallback(async () => {
66 | setIsRefreshing(true);
67 | await dispatch(fetchPods(currentCluster));
68 | setIsRefreshing(false);
69 | }, [currentCluster, dispatch]);
70 |
71 | const createNamespaceList = namespaces => {
72 | const namespaceList = namespaces.map(namespace => {
73 | return { value: namespace };
74 | });
75 | return [{ value: 'All Namespaces' }, ...namespaceList];
76 | };
77 |
78 | return (
79 |
80 |
81 |
94 |
95 |
96 | {isLoading && !isRefreshing && !pods.length ? (
97 |
98 |
99 |
100 | ) : (
101 |
108 | )}
109 |
110 |
111 | );
112 | };
113 |
114 | export default React.memo(PodsDisplay);
115 |
116 | const styles = EStyleSheet.create({
117 | safeArea: {
118 | height: '100%',
119 | flex: 1,
120 | backgroundColor: 'white',
121 | },
122 | dropDownView: {
123 | width: '90%',
124 | alignSelf: 'center',
125 | marginTop: '7%',
126 | backgroundColor: 'white',
127 | },
128 | loading: {
129 | alignItems: 'center',
130 | flex: 1,
131 | },
132 | dropDownOffset: {
133 | top: 15,
134 | left: 0,
135 | },
136 | dropDown: {
137 | textAlign: 'center',
138 | alignItems: 'center',
139 | backgroundColor: 'white',
140 | },
141 | noPodsFound: {
142 | textAlign: 'center',
143 | marginTop: '9rem',
144 | fontSize: '1.3rem',
145 | color: 'gray',
146 | },
147 | podScroll: {
148 | justifyContent: 'center',
149 | alignSelf: 'center',
150 | flex: 1,
151 | height: '100%',
152 | width: '94%',
153 | marginTop: '1%',
154 | borderRadius: 5,
155 | marginBottom: '1.2rem',
156 | },
157 | podContainer: {
158 | marginTop: '.7rem',
159 | backgroundColor: 'white',
160 | flexDirection: 'row',
161 | height: '3rem',
162 | width: '96%',
163 | paddingLeft: '1%',
164 | borderStyle: 'solid',
165 | borderColor: '#063CB9',
166 | borderWidth: 1,
167 | borderRadius: 8,
168 | alignItems: 'center',
169 | alignSelf: 'center',
170 | },
171 | logo: {
172 | width: '2.4rem',
173 | height: '2.4rem',
174 | },
175 | podText: {
176 | fontSize: '1rem',
177 | marginLeft: '.5rem',
178 | width: '12.2rem',
179 | marginRight: '1.2rem',
180 | backgroundColor: 'white',
181 | overflow: 'scroll',
182 | },
183 | statusText: {
184 | fontSize: '1rem',
185 | backgroundColor: 'white',
186 | color: 'gray',
187 | textAlign: 'right',
188 | },
189 | badge: {
190 | marginLeft: '.6rem',
191 | marginTop: '.1rem',
192 | marginRight: '.2rem',
193 | },
194 | arrow: {
195 | marginLeft: '.4rem',
196 | marginTop: '.2rem',
197 | },
198 | });
199 |
--------------------------------------------------------------------------------
/src/components/Clusters/AddCluster.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect, useCallback } from 'react';
2 | import {
3 | View,
4 | Text,
5 | ScrollView,
6 | SafeAreaView,
7 | } from 'react-native';
8 | import { useDispatch, useSelector } from 'react-redux';
9 | import { Dropdown } from 'react-native-material-dropdown';
10 | import EStyleSheet from 'react-native-extended-stylesheet';
11 |
12 | import {
13 | fetchGkeClusters,
14 | fetchGcpProjects,
15 | } from '../../reducers/GoogleCloudSlice';
16 | import Loading from '../common/Loading';
17 | import Regions from '../../data/Regions';
18 | import SwipeableList from '../common/SwipeableList';
19 | import { fetchEksClusters } from '../../reducers/AwsSlice';
20 | import { addCluster, setCurrentProvider } from '../../reducers/ClustersSlice';
21 |
22 | const AddCluster = ({ navigation }) => {
23 | const dispatch = useDispatch();
24 | const [isRefreshing, setIsRefreshing] = useState(false);
25 | const [dropdownValue, setDropdownValue] = useState(null);
26 |
27 | const currentProvider = useSelector(state => state.clusters.currentProvider);
28 | const isLoading = useSelector(state => state[currentProvider].isLoading);
29 | const clusters = useSelector(state => {
30 | if (state[currentProvider].clusters) {
31 | return state[currentProvider].clusters;
32 | }
33 | return [];
34 | });
35 |
36 | const gcpProjects = useSelector(state => {
37 | if (state.gcp.projects) {
38 | return state.gcp.projects.map(project => {
39 | return {
40 | label: project.name,
41 | value: project.projectId,
42 | };
43 | });
44 | }
45 | return null;
46 | });
47 |
48 | useEffect(() => {
49 | currentProvider === 'gcp' && dispatch(fetchGcpProjects());
50 | }, [currentProvider, dispatch]);
51 |
52 | const fetchClusters = async value => {
53 | if (!value) { value = dropdownValue; }
54 | return currentProvider === 'aws'
55 | ? await dispatch(fetchEksClusters(value))
56 | : await dispatch(fetchGkeClusters(value));
57 | };
58 |
59 | const handleClusterPress = useCallback(cluster => {
60 | dispatch(addCluster(cluster));
61 | dispatch(setCurrentProvider(cluster.cloudProvider));
62 | navigation.goBack();
63 | }, [dispatch, navigation]);
64 |
65 | const handleRefresh = async () => {
66 | setIsRefreshing(true);
67 | await fetchClusters();
68 | setIsRefreshing(false);
69 | };
70 |
71 | const handleDropdownChange = value => {
72 | setDropdownValue(value);
73 | fetchClusters(value);
74 | };
75 |
76 | const setDropdownValues = () => {
77 | return currentProvider === 'aws'
78 | ? Regions
79 | : gcpProjects || [{ value: 'Loading' }];
80 | };
81 |
82 | const regionOrProjectLabel = currentProvider === 'aws'
83 | ? 'Region' : 'Project';
84 |
85 | const setNoValueSelectedText = () => {
86 | return `Please select a ${regionOrProjectLabel} to view
87 | available clusters`;
88 | };
89 |
90 | const setDropdownLabel = () => {
91 | return `Select a ${regionOrProjectLabel}`;
92 | };
93 |
94 | return (
95 |
96 |
97 |
98 |
107 |
108 | {isLoading && !isRefreshing ? (
109 |
110 |
111 |
112 | ) : (
113 |
114 | {dropdownValue && (
115 |
122 | )}
123 | {!dropdownValue && (
124 |
125 | {setNoValueSelectedText()}
126 |
127 | )}
128 |
129 | )}
130 |
131 |
132 | );
133 | };
134 |
135 | export default React.memo(AddCluster);
136 |
137 | const styles = EStyleSheet.create({
138 | noContentText: {
139 | textAlign: 'center',
140 | marginTop: '9rem',
141 | fontSize: '1.3rem',
142 | color: 'gray',
143 | },
144 | dropDown: {
145 | textAlign: 'center',
146 | alignItems: 'center',
147 | fontSize: '1.1rem',
148 | },
149 | dropDownView: {
150 | width: '90%',
151 | alignSelf: 'center',
152 | marginTop: '8%',
153 | backgroundColor: 'white',
154 | },
155 | dropDownOffset: {
156 | top: 15,
157 | left: 0,
158 | },
159 | safeArea: {
160 | backgroundColor: 'white',
161 | marginHorizontal: '3%',
162 | height: '100%',
163 | },
164 |
165 | clusterContainer: {
166 | marginTop: '3%',
167 | backgroundColor: 'white',
168 | flexDirection: 'row',
169 | height: '3rem',
170 | width: '96%',
171 | paddingVertical: 12,
172 | paddingLeft: 8,
173 | borderStyle: 'solid',
174 | borderColor: '#063CB9',
175 | borderWidth: 1,
176 | borderRadius: 8,
177 | alignSelf: 'center',
178 | },
179 | clusterText: {
180 | fontSize: '1rem',
181 | marginRight: '3.8rem',
182 | width: '46%',
183 | backgroundColor: 'white',
184 | overflow: 'scroll',
185 | },
186 | statusText: {
187 | fontSize: '1rem',
188 | textAlign: 'right',
189 | backgroundColor: 'white',
190 | width: '5.65rem',
191 | color: 'gray',
192 | marginRight: '.18rem',
193 | },
194 | clusterScroll: {
195 | marginTop: '3%',
196 | height: '36rem',
197 | backgroundColor: 'white',
198 | },
199 | arrow: {
200 | marginLeft: '.4rem',
201 | marginTop: '.2rem',
202 | },
203 | badge: {
204 | marginLeft: '.4rem',
205 | marginTop: '.37rem',
206 | marginRight: '.2rem',
207 | },
208 | });
209 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin, switch paths to Windows format before running java
129 | if $cygwin ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=$((i+1))
158 | done
159 | case $i in
160 | (0) set -- ;;
161 | (1) set -- "$args0" ;;
162 | (2) set -- "$args0" "$args1" ;;
163 | (3) set -- "$args0" "$args1" "$args2" ;;
164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=$(save "$@")
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185 | cd "$(dirname "$0")"
186 | fi
187 |
188 | exec "$JAVACMD" "$@"
189 |
--------------------------------------------------------------------------------
/src/components/common/CloudLogin.js:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react';
2 | import {
3 | View,
4 | Text,
5 | Alert,
6 | Image,
7 | Dimensions,
8 | TouchableHighlight,
9 | KeyboardAvoidingView,
10 | } from 'react-native';
11 | import { useDispatch } from 'react-redux';
12 | import { StackActions } from '@react-navigation/native';
13 |
14 | import { Input, Divider } from 'react-native-elements';
15 | import Icon from 'react-native-vector-icons/FontAwesome';
16 | import EStyleSheet from 'react-native-extended-stylesheet';
17 | import { GoogleSigninButton } from '@react-native-community/google-signin';
18 |
19 | import { checkAwsCredentials } from '../../reducers/AwsSlice';
20 | import { setCurrentProvider } from '../../reducers/ClustersSlice';
21 | import { googleSignIn, fetchGcpProjects } from '../../reducers/GoogleCloudSlice';
22 |
23 | Icon.loadFont();
24 | EStyleSheet.build();
25 |
26 | const { height, width } = Dimensions.get('window');
27 |
28 | const CloudLogin = ({ navigation, route }) => {
29 | const dispatch = useDispatch();
30 |
31 | const [loginState, setLoginState] = useState({
32 | accessKeyId: '',
33 | secretAccessKey: '',
34 | });
35 |
36 | const handleAwsLoginPress = async () => {
37 | if (loginState.accessKeyId !== '' && loginState.secretAccessKey !== '') {
38 | const isValidCredentials = await dispatch(
39 | checkAwsCredentials(loginState)
40 | );
41 | if (isValidCredentials) {
42 | dispatch(setCurrentProvider('aws'));
43 | navigation.navigate('Add Cluster');
44 | } else {
45 | Alert.alert('Invalid Credentials', 'Please enter valid access keys and ensure you have correct permissions.');
46 | }
47 | } else {
48 | Alert.alert('Invalid Entry', 'Please enter Access Key ID and Secret Access Key.');
49 | }
50 | };
51 |
52 | const handleGoogleSigninPress = async () => {
53 | const signInStatus = await dispatch(googleSignIn());
54 | if (signInStatus === true) {
55 | dispatch(setCurrentProvider('gcp'));
56 | dispatch(fetchGcpProjects());
57 | navigation.navigate('Add Cluster');
58 | // Wait for screen animation before replacing Cloud Login screen
59 | // with ShipM8 screen in navigation stack
60 | setTimeout(() => {
61 | navigation.dispatch({
62 | ...StackActions.replace('ShipM8'),
63 | source: route.key,
64 | });
65 | }, 500);
66 | } else {
67 | Alert.alert(signInStatus);
68 | }
69 | };
70 |
71 | return (
72 |
73 |
74 | Add Cluster from Cloud Provider
75 |
76 |
80 |
81 |
82 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
99 | setLoginState({ ...loginState, accessKeyId: text })
100 | }
101 | label="Access Key ID"
102 | placeholder="Enter Access Key ID Here"
103 | leftIcon={}
104 | />
105 |
106 |
107 |
110 | setLoginState({ ...loginState, secretAccessKey: text })
111 | }
112 | label="Secret Access Key"
113 | placeholder="Enter Secret Access Key Here"
114 | leftIcon={}
115 | />
116 |
117 |
118 |
119 | handleAwsLoginPress()}>
123 | Sign in with AWS
124 |
125 |
126 |
127 |
128 | );
129 | };
130 |
131 | export default React.memo(CloudLogin);
132 |
133 | const styles = EStyleSheet.create({
134 | container: {
135 | flex: 1,
136 | alignItems: 'center',
137 | },
138 | innerContainer: {
139 | flex: 1,
140 | backgroundColor: 'white',
141 | alignItems: 'center',
142 | justifyContent: 'center',
143 | height: height,
144 | width: width,
145 | paddingTop: '2rem',
146 | paddingBottom: '2rem',
147 | },
148 | textStyle: {
149 | textAlign: 'center',
150 | color: '#151B54',
151 | fontSize: '1.2rem',
152 | fontWeight: 'bold',
153 | marginBottom: '2 rem',
154 | },
155 | googleLogoContainer: {
156 | flex: 1,
157 | width: '100%',
158 | height: '100%',
159 | },
160 | googleSignInContainer: {
161 | flex: 1,
162 | justifyContent: 'center',
163 | },
164 | awsLogoContainer: {
165 | flex: 1,
166 | width: '35%',
167 | },
168 | divider: {
169 | width: '85%',
170 | },
171 | icon: {
172 | marginRight: '0.8rem',
173 | color: 'gray',
174 | },
175 | awsInputView: {
176 | flex: 1,
177 | alignItems: 'center',
178 | paddingTop: '1rem',
179 | paddingBottom: '1rem',
180 | },
181 | accessKeyIdInput: {
182 | flex: 1,
183 | width: width - (0.15 * width),
184 | paddingBottom: '1.5rem',
185 | },
186 | secretAccessKeyIdInput: {
187 | flex: 1,
188 | width: width - (0.15 * width),
189 | paddingTop: '1rem',
190 | },
191 | awsButtonContainer: {
192 | flex: 1,
193 | paddingBottom: '2rem',
194 | paddingTop: '2.5rem',
195 | },
196 | awsButton: {
197 | backgroundColor: '#1589FF',
198 | justifyContent: 'center',
199 | borderRadius: '.2rem',
200 | width: 250,
201 | height: 43,
202 | },
203 | buttonText: {
204 | textAlign: 'center',
205 | color: 'white',
206 | fontWeight: '700',
207 | fontSize: '0.9rem',
208 | },
209 | googleLogo: {
210 | flex: 1,
211 | height: undefined,
212 | width: undefined,
213 | resizeMode: 'contain',
214 | },
215 | awsLogo: {
216 | flex: 1,
217 | height: undefined,
218 | width: undefined,
219 | resizeMode: 'contain',
220 | },
221 | });
222 |
--------------------------------------------------------------------------------
/src/components/common/SwipeableList.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useCallback } from 'react';
2 | import {
3 | View,
4 | Text,
5 | Image,
6 | Animated,
7 | ScrollView,
8 | RefreshControl,
9 | TouchableHighlight,
10 | } from 'react-native';
11 | import Icon from 'react-native-vector-icons/FontAwesome';
12 | import EStyleSheet from 'react-native-extended-stylesheet';
13 | import { TouchableOpacity } from 'react-native-gesture-handler';
14 | import { SwipeListView, SwipeRow } from 'react-native-swipe-list-view';
15 |
16 | import EntityStatus from '../common/EntityStatus';
17 |
18 | const iconPod = require('../../assets/pod.png');
19 |
20 | const SwipeableList = ({ listData, onItemPress, onDeletePress, onRefresh, emptyValue }) => {
21 | const [isRefreshing, setIsRefreshing] = useState(false);
22 | const rowSwipeAnimatedValues = {};
23 |
24 | listData.forEach(item => {
25 | const name = item.name
26 | ? item.name
27 | : item.metadata.name;
28 | rowSwipeAnimatedValues[`${name}`] = new Animated.Value(0);
29 | });
30 |
31 | const handleRefresh = useCallback(async () => {
32 | if (onRefresh) {
33 | setIsRefreshing(true);
34 | await onRefresh();
35 | setIsRefreshing(false);
36 | }
37 | }, [onRefresh]);
38 |
39 | const onSwipeValueChange = useCallback(swipeData => {
40 | const { key, value } = swipeData;
41 | rowSwipeAnimatedValues[key].setValue(Math.abs(value));
42 | }, [rowSwipeAnimatedValues]);
43 |
44 | const renderItem = useCallback(data => {
45 | const status = typeof data.item.status === 'string'
46 | ? data.item.status
47 | : data.item.status.phase
48 | ? data.item.status.phase
49 | : false;
50 |
51 | const name = data.item.name
52 | ? data.item.name
53 | : data.item.metadata.name;
54 |
55 | return (
56 |
65 | {onDeletePress && (
66 | onDeletePress(data.item)}
68 | style={[styles.listItemButton, styles.backRightBtn]}
69 | >
70 |
92 |
96 |
97 |
98 | )}
99 | onItemPress(data.item)}
103 | key={name}
104 | >
105 |
106 |
107 | {data.item.kind === 'pods' && }
108 | {name}
109 |
110 |
111 |
112 |
118 |
119 |
120 |
121 |
122 | );
123 | }, [onDeletePress, onItemPress, onSwipeValueChange, rowSwipeAnimatedValues]);
124 |
125 | if (listData.length === 0) {
126 | return (
127 |
133 | }
134 | >
135 | No {`${emptyValue || 'Items'}`} Found
136 |
137 | );
138 | }
139 |
140 | return (
141 |
149 | }
150 | keyExtractor={item => item.name || item.metadata.name}
151 | />
152 | );
153 | };
154 |
155 | export default React.memo(SwipeableList);
156 |
157 | const styles = EStyleSheet.create({
158 | container: {
159 | flex: 1,
160 | },
161 | noContentText: {
162 | textAlign: 'center',
163 | marginTop: '9rem',
164 | fontSize: '1.3rem',
165 | color: 'gray',
166 | },
167 | arrow: {
168 | marginLeft: '.4rem',
169 | marginTop: '.2rem',
170 | },
171 | containerRight: {
172 | flex: 1,
173 | flexDirection: 'row',
174 | alignItems: 'center',
175 | justifyContent: 'flex-end',
176 | marginRight: '.6rem',
177 | },
178 | containerLeft: {
179 | flex: 3,
180 | flexDirection: 'row',
181 | alignItems: 'center',
182 | justifyContent: 'flex-end',
183 | },
184 | containerLeftNoStatus: {
185 | flex: 20,
186 | flexDirection: 'row',
187 | alignItems: 'center',
188 | justifyContent: 'flex-end',
189 | },
190 | badge: {
191 | marginLeft: '.6rem',
192 | marginTop: '.1rem',
193 | marginRight: '.2rem',
194 | },
195 | listItemButton: {
196 | marginTop: '.4rem',
197 | justifyContent: 'center',
198 | backgroundColor: 'white',
199 | height: '3.5rem',
200 | borderRadius: 8,
201 | alignSelf: 'center',
202 | },
203 | itemContainer: {
204 | flexDirection: 'row',
205 | flex: 1,
206 | justifyContent: 'center',
207 | width: '98%',
208 | paddingLeft: '2.5%',
209 | borderStyle: 'solid',
210 | borderColor: '#063CB9',
211 | borderWidth: 1,
212 | borderRadius: 8,
213 | alignItems: 'center',
214 | alignSelf: 'center',
215 | },
216 | itemText: {
217 | fontSize: '1rem',
218 | flex: 1,
219 | marginLeft: '.5rem',
220 | marginRight: '2rem',
221 | overflow: 'scroll',
222 | },
223 | itemIcon: {
224 | width: '2rem',
225 | height: '2rem',
226 | },
227 | backRightBtn: {
228 | alignItems: 'center',
229 | alignSelf: 'flex-end',
230 | justifyContent: 'center',
231 | width: '4.7rem',
232 | borderRadius: 8,
233 | marginRight: '.3rem',
234 | backgroundColor: 'red',
235 | },
236 | trash: {
237 | height: '1.5rem',
238 | width: '1.5rem',
239 | },
240 | });
241 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation
19 | * entryFile: "index.android.js",
20 | *
21 | * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
22 | * bundleCommand: "ram-bundle",
23 | *
24 | * // whether to bundle JS and assets in debug mode
25 | * bundleInDebug: false,
26 | *
27 | * // whether to bundle JS and assets in release mode
28 | * bundleInRelease: true,
29 | *
30 | * // whether to bundle JS and assets in another build variant (if configured).
31 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
32 | * // The configuration property can be in the following formats
33 | * // 'bundleIn${productFlavor}${buildType}'
34 | * // 'bundleIn${buildType}'
35 | * // bundleInFreeDebug: true,
36 | * // bundleInPaidRelease: true,
37 | * // bundleInBeta: true,
38 | *
39 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
40 | * // for example: to disable dev mode in the staging build type (if configured)
41 | * devDisabledInStaging: true,
42 | * // The configuration property can be in the following formats
43 | * // 'devDisabledIn${productFlavor}${buildType}'
44 | * // 'devDisabledIn${buildType}'
45 | *
46 | * // the root of your project, i.e. where "package.json" lives
47 | * root: "../../",
48 | *
49 | * // where to put the JS bundle asset in debug mode
50 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
51 | *
52 | * // where to put the JS bundle asset in release mode
53 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
54 | *
55 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
56 | * // require('./image.png')), in debug mode
57 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
58 | *
59 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
60 | * // require('./image.png')), in release mode
61 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
62 | *
63 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
64 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
65 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
66 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
67 | * // for example, you might want to remove it from here.
68 | * inputExcludes: ["android/**", "ios/**"],
69 | *
70 | * // override which node gets called and with what additional arguments
71 | * nodeExecutableAndArgs: ["node"],
72 | *
73 | * // supply additional arguments to the packager
74 | * extraPackagerArgs: []
75 | * ]
76 | */
77 |
78 | project.ext.react = [
79 | entryFile: "index.js",
80 | enableHermes: false, // clean and rebuild if changing
81 | ]
82 |
83 | apply from: "../../node_modules/react-native/react.gradle"
84 |
85 | /**
86 | * Set this to true to create two separate APKs instead of one:
87 | * - An APK that only works on ARM devices
88 | * - An APK that only works on x86 devices
89 | * The advantage is the size of the APK is reduced by about 4MB.
90 | * Upload all the APKs to the Play Store and people will download
91 | * the correct one based on the CPU architecture of their device.
92 | */
93 | def enableSeparateBuildPerCPUArchitecture = false
94 |
95 | /**
96 | * Run Proguard to shrink the Java bytecode in release builds.
97 | */
98 | def enableProguardInReleaseBuilds = false
99 |
100 | /**
101 | * The preferred build flavor of JavaScriptCore.
102 | *
103 | * For example, to use the international variant, you can use:
104 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
105 | *
106 | * The international variant includes ICU i18n library and necessary data
107 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
108 | * give correct results when using with locales other than en-US. Note that
109 | * this variant is about 6MiB larger per architecture than default.
110 | */
111 | def jscFlavor = 'org.webkit:android-jsc:+'
112 |
113 | /**
114 | * Whether to enable the Hermes VM.
115 | *
116 | * This should be set on project.ext.react and mirrored here. If it is not set
117 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
118 | * and the benefits of using Hermes will therefore be sharply reduced.
119 | */
120 | def enableHermes = project.ext.react.get("enableHermes", false);
121 |
122 | android {
123 | compileSdkVersion rootProject.ext.compileSdkVersion
124 |
125 | compileOptions {
126 | sourceCompatibility JavaVersion.VERSION_1_8
127 | targetCompatibility JavaVersion.VERSION_1_8
128 | }
129 |
130 | defaultConfig {
131 | applicationId "com.shipm8"
132 | minSdkVersion rootProject.ext.minSdkVersion
133 | targetSdkVersion rootProject.ext.targetSdkVersion
134 | versionCode 1
135 | versionName "1.0"
136 | }
137 | splits {
138 | abi {
139 | reset()
140 | enable enableSeparateBuildPerCPUArchitecture
141 | universalApk false // If true, also generate a universal APK
142 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
143 | }
144 | }
145 | signingConfigs {
146 | debug {
147 | storeFile file('debug.keystore')
148 | storePassword 'android'
149 | keyAlias 'androiddebugkey'
150 | keyPassword 'android'
151 | }
152 | }
153 | buildTypes {
154 | debug {
155 | signingConfig signingConfigs.debug
156 | }
157 | release {
158 | // Caution! In production, you need to generate your own keystore file.
159 | // see https://facebook.github.io/react-native/docs/signed-apk-android.
160 | signingConfig signingConfigs.debug
161 | minifyEnabled enableProguardInReleaseBuilds
162 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
163 | }
164 | }
165 | // applicationVariants are e.g. debug, release
166 | applicationVariants.all { variant ->
167 | variant.outputs.each { output ->
168 | // For each separate APK per architecture, set a unique version code as described here:
169 | // https://developer.android.com/studio/build/configure-apk-splits.html
170 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
171 | def abi = output.getFilter(OutputFile.ABI)
172 | if (abi != null) { // null for the universal-debug, universal-release variants
173 | output.versionCodeOverride =
174 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
175 | }
176 |
177 | }
178 | }
179 | }
180 |
181 | dependencies {
182 | implementation fileTree(dir: "libs", include: ["*.jar"])
183 | implementation "com.facebook.react:react-native:+" // From node_modules
184 |
185 | if (enableHermes) {
186 | def hermesPath = "../../node_modules/hermes-engine/android/";
187 | debugImplementation files(hermesPath + "hermes-debug.aar")
188 | releaseImplementation files(hermesPath + "hermes-release.aar")
189 | } else {
190 | implementation jscFlavor
191 | }
192 | }
193 |
194 | // Run this once to be able to run the application with BUCK
195 | // puts all compile dependencies into folder libs for BUCK to use
196 | task copyDownloadableDepsToLibs(type: Copy) {
197 | from configurations.compile
198 | into 'libs'
199 | }
200 |
201 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
202 |
--------------------------------------------------------------------------------
/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - AppAuth (1.3.0):
3 | - AppAuth/Core (= 1.3.0)
4 | - AppAuth/ExternalUserAgent (= 1.3.0)
5 | - AppAuth/Core (1.3.0)
6 | - AppAuth/ExternalUserAgent (1.3.0)
7 | - boost-for-react-native (1.63.0)
8 | - DoubleConversion (1.1.6)
9 | - FBLazyVector (0.61.5)
10 | - FBReactNativeSpec (0.61.5):
11 | - Folly (= 2018.10.22.00)
12 | - RCTRequired (= 0.61.5)
13 | - RCTTypeSafety (= 0.61.5)
14 | - React-Core (= 0.61.5)
15 | - React-jsi (= 0.61.5)
16 | - ReactCommon/turbomodule/core (= 0.61.5)
17 | - Folly (2018.10.22.00):
18 | - boost-for-react-native
19 | - DoubleConversion
20 | - Folly/Default (= 2018.10.22.00)
21 | - glog
22 | - Folly/Default (2018.10.22.00):
23 | - boost-for-react-native
24 | - DoubleConversion
25 | - glog
26 | - glog (0.3.5)
27 | - GoogleSignIn (5.0.2):
28 | - AppAuth (~> 1.2)
29 | - GTMAppAuth (~> 1.0)
30 | - GTMSessionFetcher/Core (~> 1.1)
31 | - GTMAppAuth (1.0.0):
32 | - AppAuth/Core (~> 1.0)
33 | - GTMSessionFetcher (~> 1.1)
34 | - GTMSessionFetcher (1.3.1):
35 | - GTMSessionFetcher/Full (= 1.3.1)
36 | - GTMSessionFetcher/Core (1.3.1)
37 | - GTMSessionFetcher/Full (1.3.1):
38 | - GTMSessionFetcher/Core (= 1.3.1)
39 | - RCTRequired (0.61.5)
40 | - RCTTypeSafety (0.61.5):
41 | - FBLazyVector (= 0.61.5)
42 | - Folly (= 2018.10.22.00)
43 | - RCTRequired (= 0.61.5)
44 | - React-Core (= 0.61.5)
45 | - React (0.61.5):
46 | - React-Core (= 0.61.5)
47 | - React-Core/DevSupport (= 0.61.5)
48 | - React-Core/RCTWebSocket (= 0.61.5)
49 | - React-RCTActionSheet (= 0.61.5)
50 | - React-RCTAnimation (= 0.61.5)
51 | - React-RCTBlob (= 0.61.5)
52 | - React-RCTImage (= 0.61.5)
53 | - React-RCTLinking (= 0.61.5)
54 | - React-RCTNetwork (= 0.61.5)
55 | - React-RCTSettings (= 0.61.5)
56 | - React-RCTText (= 0.61.5)
57 | - React-RCTVibration (= 0.61.5)
58 | - React-Core (0.61.5):
59 | - Folly (= 2018.10.22.00)
60 | - glog
61 | - React-Core/Default (= 0.61.5)
62 | - React-cxxreact (= 0.61.5)
63 | - React-jsi (= 0.61.5)
64 | - React-jsiexecutor (= 0.61.5)
65 | - Yoga
66 | - React-Core/CoreModulesHeaders (0.61.5):
67 | - Folly (= 2018.10.22.00)
68 | - glog
69 | - React-Core/Default
70 | - React-cxxreact (= 0.61.5)
71 | - React-jsi (= 0.61.5)
72 | - React-jsiexecutor (= 0.61.5)
73 | - Yoga
74 | - React-Core/Default (0.61.5):
75 | - Folly (= 2018.10.22.00)
76 | - glog
77 | - React-cxxreact (= 0.61.5)
78 | - React-jsi (= 0.61.5)
79 | - React-jsiexecutor (= 0.61.5)
80 | - Yoga
81 | - React-Core/DevSupport (0.61.5):
82 | - Folly (= 2018.10.22.00)
83 | - glog
84 | - React-Core/Default (= 0.61.5)
85 | - React-Core/RCTWebSocket (= 0.61.5)
86 | - React-cxxreact (= 0.61.5)
87 | - React-jsi (= 0.61.5)
88 | - React-jsiexecutor (= 0.61.5)
89 | - React-jsinspector (= 0.61.5)
90 | - Yoga
91 | - React-Core/RCTActionSheetHeaders (0.61.5):
92 | - Folly (= 2018.10.22.00)
93 | - glog
94 | - React-Core/Default
95 | - React-cxxreact (= 0.61.5)
96 | - React-jsi (= 0.61.5)
97 | - React-jsiexecutor (= 0.61.5)
98 | - Yoga
99 | - React-Core/RCTAnimationHeaders (0.61.5):
100 | - Folly (= 2018.10.22.00)
101 | - glog
102 | - React-Core/Default
103 | - React-cxxreact (= 0.61.5)
104 | - React-jsi (= 0.61.5)
105 | - React-jsiexecutor (= 0.61.5)
106 | - Yoga
107 | - React-Core/RCTBlobHeaders (0.61.5):
108 | - Folly (= 2018.10.22.00)
109 | - glog
110 | - React-Core/Default
111 | - React-cxxreact (= 0.61.5)
112 | - React-jsi (= 0.61.5)
113 | - React-jsiexecutor (= 0.61.5)
114 | - Yoga
115 | - React-Core/RCTImageHeaders (0.61.5):
116 | - Folly (= 2018.10.22.00)
117 | - glog
118 | - React-Core/Default
119 | - React-cxxreact (= 0.61.5)
120 | - React-jsi (= 0.61.5)
121 | - React-jsiexecutor (= 0.61.5)
122 | - Yoga
123 | - React-Core/RCTLinkingHeaders (0.61.5):
124 | - Folly (= 2018.10.22.00)
125 | - glog
126 | - React-Core/Default
127 | - React-cxxreact (= 0.61.5)
128 | - React-jsi (= 0.61.5)
129 | - React-jsiexecutor (= 0.61.5)
130 | - Yoga
131 | - React-Core/RCTNetworkHeaders (0.61.5):
132 | - Folly (= 2018.10.22.00)
133 | - glog
134 | - React-Core/Default
135 | - React-cxxreact (= 0.61.5)
136 | - React-jsi (= 0.61.5)
137 | - React-jsiexecutor (= 0.61.5)
138 | - Yoga
139 | - React-Core/RCTSettingsHeaders (0.61.5):
140 | - Folly (= 2018.10.22.00)
141 | - glog
142 | - React-Core/Default
143 | - React-cxxreact (= 0.61.5)
144 | - React-jsi (= 0.61.5)
145 | - React-jsiexecutor (= 0.61.5)
146 | - Yoga
147 | - React-Core/RCTTextHeaders (0.61.5):
148 | - Folly (= 2018.10.22.00)
149 | - glog
150 | - React-Core/Default
151 | - React-cxxreact (= 0.61.5)
152 | - React-jsi (= 0.61.5)
153 | - React-jsiexecutor (= 0.61.5)
154 | - Yoga
155 | - React-Core/RCTVibrationHeaders (0.61.5):
156 | - Folly (= 2018.10.22.00)
157 | - glog
158 | - React-Core/Default
159 | - React-cxxreact (= 0.61.5)
160 | - React-jsi (= 0.61.5)
161 | - React-jsiexecutor (= 0.61.5)
162 | - Yoga
163 | - React-Core/RCTWebSocket (0.61.5):
164 | - Folly (= 2018.10.22.00)
165 | - glog
166 | - React-Core/Default (= 0.61.5)
167 | - React-cxxreact (= 0.61.5)
168 | - React-jsi (= 0.61.5)
169 | - React-jsiexecutor (= 0.61.5)
170 | - Yoga
171 | - React-CoreModules (0.61.5):
172 | - FBReactNativeSpec (= 0.61.5)
173 | - Folly (= 2018.10.22.00)
174 | - RCTTypeSafety (= 0.61.5)
175 | - React-Core/CoreModulesHeaders (= 0.61.5)
176 | - React-RCTImage (= 0.61.5)
177 | - ReactCommon/turbomodule/core (= 0.61.5)
178 | - React-cxxreact (0.61.5):
179 | - boost-for-react-native (= 1.63.0)
180 | - DoubleConversion
181 | - Folly (= 2018.10.22.00)
182 | - glog
183 | - React-jsinspector (= 0.61.5)
184 | - React-jsi (0.61.5):
185 | - boost-for-react-native (= 1.63.0)
186 | - DoubleConversion
187 | - Folly (= 2018.10.22.00)
188 | - glog
189 | - React-jsi/Default (= 0.61.5)
190 | - React-jsi/Default (0.61.5):
191 | - boost-for-react-native (= 1.63.0)
192 | - DoubleConversion
193 | - Folly (= 2018.10.22.00)
194 | - glog
195 | - React-jsiexecutor (0.61.5):
196 | - DoubleConversion
197 | - Folly (= 2018.10.22.00)
198 | - glog
199 | - React-cxxreact (= 0.61.5)
200 | - React-jsi (= 0.61.5)
201 | - React-jsinspector (0.61.5)
202 | - react-native-safe-area-context (0.6.4):
203 | - React
204 | - React-RCTActionSheet (0.61.5):
205 | - React-Core/RCTActionSheetHeaders (= 0.61.5)
206 | - React-RCTAnimation (0.61.5):
207 | - React-Core/RCTAnimationHeaders (= 0.61.5)
208 | - React-RCTBlob (0.61.5):
209 | - React-Core/RCTBlobHeaders (= 0.61.5)
210 | - React-Core/RCTWebSocket (= 0.61.5)
211 | - React-jsi (= 0.61.5)
212 | - React-RCTNetwork (= 0.61.5)
213 | - React-RCTImage (0.61.5):
214 | - React-Core/RCTImageHeaders (= 0.61.5)
215 | - React-RCTNetwork (= 0.61.5)
216 | - React-RCTLinking (0.61.5):
217 | - React-Core/RCTLinkingHeaders (= 0.61.5)
218 | - React-RCTNetwork (0.61.5):
219 | - React-Core/RCTNetworkHeaders (= 0.61.5)
220 | - React-RCTSettings (0.61.5):
221 | - React-Core/RCTSettingsHeaders (= 0.61.5)
222 | - React-RCTText (0.61.5):
223 | - React-Core/RCTTextHeaders (= 0.61.5)
224 | - React-RCTVibration (0.61.5):
225 | - React-Core/RCTVibrationHeaders (= 0.61.5)
226 | - ReactCommon/jscallinvoker (0.61.5):
227 | - DoubleConversion
228 | - Folly (= 2018.10.22.00)
229 | - glog
230 | - React-cxxreact (= 0.61.5)
231 | - ReactCommon/turbomodule/core (0.61.5):
232 | - DoubleConversion
233 | - Folly (= 2018.10.22.00)
234 | - glog
235 | - React-Core (= 0.61.5)
236 | - React-cxxreact (= 0.61.5)
237 | - React-jsi (= 0.61.5)
238 | - ReactCommon/jscallinvoker (= 0.61.5)
239 | - rn-fetch-blob (0.12.0):
240 | - React-Core
241 | - RNCAsyncStorage (1.7.1):
242 | - React
243 | - RNCMaskedView (0.1.6):
244 | - React
245 | - RNGestureHandler (1.6.0):
246 | - React
247 | - RNGoogleSignin (3.0.4):
248 | - GoogleSignIn (~> 5.0.0)
249 | - React
250 | - RNScreens (2.0.0-beta.4):
251 | - React
252 | - RNVectorIcons (6.6.0):
253 | - React
254 | - Yoga (1.14.0)
255 |
256 | DEPENDENCIES:
257 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
258 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
259 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
260 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
261 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
262 | - GoogleSignIn (~> 5.0.2)
263 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
264 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
265 | - React (from `../node_modules/react-native/`)
266 | - React-Core (from `../node_modules/react-native/`)
267 | - React-Core/DevSupport (from `../node_modules/react-native/`)
268 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
269 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
270 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
271 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
272 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
273 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
274 | - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
275 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
276 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
277 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
278 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
279 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
280 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
281 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
282 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
283 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
284 | - ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)
285 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
286 | - rn-fetch-blob (from `../node_modules/rn-fetch-blob`)
287 | - "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
288 | - "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
289 | - RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
290 | - "RNGoogleSignin (from `../node_modules/@react-native-community/google-signin`)"
291 | - RNScreens (from `../node_modules/react-native-screens`)
292 | - RNVectorIcons (from `../node_modules/react-native-vector-icons`)
293 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
294 |
295 | SPEC REPOS:
296 | trunk:
297 | - AppAuth
298 | - boost-for-react-native
299 | - GoogleSignIn
300 | - GTMAppAuth
301 | - GTMSessionFetcher
302 |
303 | EXTERNAL SOURCES:
304 | DoubleConversion:
305 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
306 | FBLazyVector:
307 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
308 | FBReactNativeSpec:
309 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec"
310 | Folly:
311 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
312 | glog:
313 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
314 | RCTRequired:
315 | :path: "../node_modules/react-native/Libraries/RCTRequired"
316 | RCTTypeSafety:
317 | :path: "../node_modules/react-native/Libraries/TypeSafety"
318 | React:
319 | :path: "../node_modules/react-native/"
320 | React-Core:
321 | :path: "../node_modules/react-native/"
322 | React-CoreModules:
323 | :path: "../node_modules/react-native/React/CoreModules"
324 | React-cxxreact:
325 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
326 | React-jsi:
327 | :path: "../node_modules/react-native/ReactCommon/jsi"
328 | React-jsiexecutor:
329 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
330 | React-jsinspector:
331 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
332 | react-native-safe-area-context:
333 | :path: "../node_modules/react-native-safe-area-context"
334 | React-RCTActionSheet:
335 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
336 | React-RCTAnimation:
337 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
338 | React-RCTBlob:
339 | :path: "../node_modules/react-native/Libraries/Blob"
340 | React-RCTImage:
341 | :path: "../node_modules/react-native/Libraries/Image"
342 | React-RCTLinking:
343 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
344 | React-RCTNetwork:
345 | :path: "../node_modules/react-native/Libraries/Network"
346 | React-RCTSettings:
347 | :path: "../node_modules/react-native/Libraries/Settings"
348 | React-RCTText:
349 | :path: "../node_modules/react-native/Libraries/Text"
350 | React-RCTVibration:
351 | :path: "../node_modules/react-native/Libraries/Vibration"
352 | ReactCommon:
353 | :path: "../node_modules/react-native/ReactCommon"
354 | rn-fetch-blob:
355 | :path: "../node_modules/rn-fetch-blob"
356 | RNCAsyncStorage:
357 | :path: "../node_modules/@react-native-community/async-storage"
358 | RNCMaskedView:
359 | :path: "../node_modules/@react-native-community/masked-view"
360 | RNGestureHandler:
361 | :path: "../node_modules/react-native-gesture-handler"
362 | RNGoogleSignin:
363 | :path: "../node_modules/@react-native-community/google-signin"
364 | RNScreens:
365 | :path: "../node_modules/react-native-screens"
366 | RNVectorIcons:
367 | :path: "../node_modules/react-native-vector-icons"
368 | Yoga:
369 | :path: "../node_modules/react-native/ReactCommon/yoga"
370 |
371 | SPEC CHECKSUMS:
372 | AppAuth: 73574f3013a1e65b9601a3ddc8b3158cce68c09d
373 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
374 | DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
375 | FBLazyVector: aaeaf388755e4f29cd74acbc9e3b8da6d807c37f
376 | FBReactNativeSpec: 118d0d177724c2d67f08a59136eb29ef5943ec75
377 | Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
378 | glog: 1f3da668190260b06b429bb211bfbee5cd790c28
379 | GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213
380 | GTMAppAuth: 4deac854479704f348309e7b66189e604cf5e01e
381 | GTMSessionFetcher: cea130bbfe5a7edc8d06d3f0d17288c32ffe9925
382 | RCTRequired: b153add4da6e7dbc44aebf93f3cf4fcae392ddf1
383 | RCTTypeSafety: 9aa1b91d7f9310fc6eadc3cf95126ffe818af320
384 | React: b6a59ef847b2b40bb6e0180a97d0ca716969ac78
385 | React-Core: 688b451f7d616cc1134ac95295b593d1b5158a04
386 | React-CoreModules: d04f8494c1a328b69ec11db9d1137d667f916dcb
387 | React-cxxreact: d0f7bcafa196ae410e5300736b424455e7fb7ba7
388 | React-jsi: cb2cd74d7ccf4cffb071a46833613edc79cdf8f7
389 | React-jsiexecutor: d5525f9ed5f782fdbacb64b9b01a43a9323d2386
390 | React-jsinspector: fa0ecc501688c3c4c34f28834a76302233e29dc0
391 | react-native-safe-area-context: 042dfc9d4db17196841df962ba9497f6e7a5bd02
392 | React-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76
393 | React-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360
394 | React-RCTBlob: d89293cc0236d9cb0933d85e430b0bbe81ad1d72
395 | React-RCTImage: 6b8e8df449eb7c814c99a92d6b52de6fe39dea4e
396 | React-RCTLinking: 121bb231c7503cf9094f4d8461b96a130fabf4a5
397 | React-RCTNetwork: fb353640aafcee84ca8b78957297bd395f065c9a
398 | React-RCTSettings: 8db258ea2a5efee381fcf7a6d5044e2f8b68b640
399 | React-RCTText: 9ccc88273e9a3aacff5094d2175a605efa854dbe
400 | React-RCTVibration: a49a1f42bf8f5acf1c3e297097517c6b3af377ad
401 | ReactCommon: 198c7c8d3591f975e5431bec1b0b3b581aa1c5dd
402 | rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba
403 | RNCAsyncStorage: 8539fc80a0075fcc9c8e2dff84cd22dc5bf1dacf
404 | RNCMaskedView: e5b99bc191945f157adeede68da9d424462de177
405 | RNGestureHandler: dde546180bf24af0b5f737c8ad04b6f3fa51609a
406 | RNGoogleSignin: a00f87261ea13df9a5cea8deafa6927d6f2c3562
407 | RNScreens: 6053a007667bea81a69087caadf103bba04c032e
408 | RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4
409 | Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b
410 |
411 | PODFILE CHECKSUM: 194d0f946f73766016942df1932c32ec65f65e8f
412 |
413 | COCOAPODS: 1.9.1
414 |
--------------------------------------------------------------------------------