-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from unikorn-cloud/sk4
Get Projects Working
- Loading branch information
Showing
11 changed files
with
372 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,22 @@ | ||
<script> | ||
export let status = 'unknown'; | ||
</script> | ||
|
||
{#if status == 'ok'} | ||
<iconify-icon class="ok" icon="mdi:tick-circle-outline" /> | ||
{:else if status == 'warning'} | ||
<iconify-icon class="warning" icon="mdi:warning-circle-outline" /> | ||
{:else if status == 'error'} | ||
<iconify-icon class="error" icon="mdi:error-outline" /> | ||
{:else if status == 'progressing'} | ||
<iconify-icon class="progressing" icon="svg-spinners:ring-resize" /> | ||
{:else} | ||
<iconify-icon class="unknown" icon="mdi:question-mark" /> | ||
{/if} | ||
<script lang="ts"> | ||
export let status: string; | ||
<style> | ||
.ok { | ||
color: lightgreen; | ||
} | ||
.warning { | ||
color: orange; | ||
} | ||
.error { | ||
color: red; | ||
} | ||
.unknown { | ||
color: var(--light-grey); | ||
function getColor(status: string): string { | ||
if (status == 'Provisioned') return 'text-success-500'; | ||
if (status == 'Errored') return 'text-error-500'; | ||
if (status == 'Unknown') return 'text-warning-500'; | ||
return 'text-surface-500'; | ||
} | ||
.progressing { | ||
color: var(--light-grey); | ||
} | ||
iconify-icon { | ||
font-size: var(--icon-size); | ||
function getIcon(status: string): string { | ||
if (status == 'Provisioned') return 'mdi:tick-circle-outline'; | ||
if (status == 'Errored') return 'mdi:error-outline'; | ||
if (status == 'Unknown') return 'mdi:question-mark'; | ||
return 'svg-spinners:ring-resize'; | ||
} | ||
</style> | ||
$: color = getColor(status); | ||
$: icon = getIcon(status); | ||
</script> | ||
|
||
<iconify-icon class="text-2xl {color}" {icon} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Kubernetes Service API | ||
* The Kubernetes Service API provides services that allows provisioning and life cycle management of Kubernetes clusters. The API is logically composed of authentication services, platform provider specific calls to get a set of resource types that can be then used by abstract Kubernetes Service resources to create and manage Kubernetes clusters. Requests must specify the HTML content type header. | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import { exists, mapValues } from '../runtime'; | ||
import type { Project } from './Project'; | ||
import { | ||
ProjectFromJSON, | ||
ProjectFromJSONTyped, | ||
ProjectToJSON, | ||
} from './Project'; | ||
|
||
/** | ||
* A list of projects. | ||
* @export | ||
* @interface Projects | ||
*/ | ||
export interface Projects extends Array<Project> { | ||
} | ||
|
||
/** | ||
* Check if a given object implements the Projects interface. | ||
*/ | ||
export function instanceOfProjects(value: object): boolean { | ||
let isInstance = true; | ||
|
||
return isInstance; | ||
} | ||
|
||
export function ProjectsFromJSON(json: any): Projects { | ||
return ProjectsFromJSONTyped(json, false); | ||
} | ||
|
||
export function ProjectsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Projects { | ||
return json; | ||
} | ||
|
||
export function ProjectsToJSON(value?: Projects | null): any { | ||
return value; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.