Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontend: Add create resource UI #1996

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

frontend: Add create resource UI #1996

wants to merge 2 commits into from

Conversation

skoeva
Copy link
Contributor

@skoeva skoeva commented May 28, 2024

These changes introduce a new UI feature that allows users to create resources from the associated list view. Clicking the 'Create' button opens up the EditorDialog used in the generic 'Create / Apply' button, now accepting generic YAML/JSON text rather than explicitly expecting an item that looks like a Kubernetes resource. The dialog box also includes a generic template for each resource. The apply logic for this new feature (as well as the original 'Create / Apply' button) has been consolidated in EditorDialog, with a flag allowing external components to utilize their own dispatch functionality.

Fixes: #1820

Testing

Create resource button

  • Open a cluster in Headlamp (cd app & npm start) and navigate to a resource (e.g. Config Maps)
  • Click the + sign in the header and ensure the appropriate template appears in the editor
  • Apply changes and ensure the created resource appears in the list view

EditorDialog changes

  • Open Headlamp (cd app & npm start) and click the 'Create / Apply' button
  • Pass in a list of resources to the editor (e.g. a list of Config Maps)
  • Apply changes and ensure that all the resources in the list appear in the list view

Screenshots

image
image

@skoeva skoeva force-pushed the create-resource-ui branch 6 times, most recently from d1de90b to fe2cec7 Compare May 28, 2024 13:10
@skoeva skoeva marked this pull request as ready for review May 28, 2024 13:29
@skoeva skoeva requested a review from joaquimrocha May 28, 2024 13:29
@skoeva skoeva self-assigned this May 28, 2024
@skoeva skoeva added the frontend Issues related to the frontend label May 28, 2024
@ashu8912
Copy link
Member

These are some nice set of changes thanks @skoeva I was wandering what all resources we are covering to have the create resource button on?? And what is the reasoning behind adding it to some and not to others if that's the case?

@skoeva
Copy link
Contributor Author

skoeva commented Jun 10, 2024

These are some nice set of changes thanks @skoeva I was wandering what all resources we are covering to have the create resource button on?? And what is the reasoning behind adding it to some and not to others if that's the case?

@ashu8912 Currently covering config maps, secrets, leases, and runtime classes as those I already found with base templates in their associated directories, though if needed, we can add templates for more resources and cover those as well

Copy link
Collaborator

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

I left a few notes for your consideration.

As well as a CreateResourceButton.stories.tsx, maybe a few small pieces could be unit tested, and perhaps an e2e test would be useful for the overall feature?

(ps. it also needs rebasing against main now)
(pps. good work on adding the kube-ish function, we should validate the data matches what we're expecting a bit more... especially since we need to fix a bunch of types still)

@illume
Copy link
Collaborator

illume commented Jun 19, 2024

These are some nice set of changes thanks @skoeva I was wandering what all resources we are covering to have the create resource button on?? And what is the reasoning behind adding it to some and not to others if that's the case?

@ashu8912 Currently covering config maps, secrets, leases, and runtime classes as those I already found with base templates in their associated directories, though if needed, we can add templates for more resources and cover those as well

Probably you know this already... but the k8s website gives example yaml for each resource in their docs. But adding defaults for all the resources could be left for a future PR I reckon... it shouldn't block merging IMHO.

@illume illume marked this pull request as draft June 19, 2024 10:45
@skoeva skoeva force-pushed the create-resource-ui branch 2 times, most recently from 4fda387 to fe2cec7 Compare June 21, 2024 13:55
@skoeva skoeva force-pushed the create-resource-ui branch 5 times, most recently from 2af16dd to 205914c Compare June 27, 2024 18:20
@skoeva skoeva force-pushed the create-resource-ui branch 3 times, most recently from ccb85e4 to 5268668 Compare July 8, 2024 14:18
frontend/src/components/configmap/List.tsx Outdated Show resolved Hide resolved
frontend/src/components/configmap/List.tsx Outdated Show resolved Hide resolved
frontend/src/components/common/CreateResourceButton.tsx Outdated Show resolved Hide resolved
@skoeva skoeva force-pushed the create-resource-ui branch 4 times, most recently from 5536809 to ae5828a Compare August 30, 2024 13:11
Copy link

github-actions bot commented Sep 4, 2024

Backend Code coverage changed from 53.2% to 53.4%. Change: .2% 😃.

Copy link
Collaborator

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's some unrelated changes I think from a messed up merge in this PR.

.github/workflows/app-artifacts-mac.yml Outdated Show resolved Hide resolved
app/electron/plugin-management.ts Outdated Show resolved Hide resolved
@illume illume marked this pull request as draft September 11, 2024 11:27
@skoeva skoeva force-pushed the create-resource-ui branch 2 times, most recently from c5e93f8 to 5f5599f Compare September 11, 2024 17:48
Copy link

Backend Code coverage changed from 60.2% to 60.4%. Change: .2% 😃.

@skoeva skoeva force-pushed the create-resource-ui branch 2 times, most recently from ddd6c4a to 664e8c1 Compare September 11, 2024 18:39
@skoeva skoeva marked this pull request as ready for review September 12, 2024 20:46
@skoeva skoeva requested a review from illume September 16, 2024 14:29
Copy link
Collaborator

@joaquimrocha joaquimrocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave it another go. A few things need to be improved but is getting there.

frontend/src/components/common/CreateResourceButton.tsx Outdated Show resolved Hide resolved

const newItemDefs = obj!;

if (!applyOnSave) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be if applyOnSave is true? We are calling the apply function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is essentially checking whether or not to use an external dispatch (formerly called externalDispatch). The name might be a bit confusing so I think it could be changed to something closer to what it was originally, but setting this to true means no dispatch is performed when creating a resource and 2 dispatches are performed when editing

frontend/src/lib/k8s/lease.ts Outdated Show resolved Hide resolved
Comment on lines 13 to 18
static getBaseObject(): KubeSecret {
const baseObject = super.getBaseObject() as KubeSecret;
return {
...baseObject,
kind: Secret.kind,
metadata: { ...baseObject.metadata, name: 'base-secret' },
};
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping we could make things work without having to override this function everywhere (but only in cases where e.g. the objectName is not matching the kind).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine it makes more sense to keep the attributes (metadata, etc.) in each resource's respective file (meaning keeping this function override) over consolidating it all somehow in cluster.ts?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I mean is that I think there should be a way for us to have this logic abstract enough in the cluster.ts that it adapts correctly to most of the subclasses. We should definitely not move individual resources' logic into the cluster.ts file.

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Sep 27, 2024
Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
These changes introduce a new UI feature that allows users to create
resources from the associated list view. Clicking the 'Create' button
opens up the EditorDialog used in the generic 'Create / Apply' button,
now accepting generic YAML/JSON text rather than explicitly expecting an
item that looks like a Kubernetes resource. The dialog box also includes
a generic template for each resource. The apply logic for this new
feature (as well as the original 'Create / Apply' button) has been
consolidated in EditorDialog, with a flag allowing external components
to utilize their own dispatch functionality.

Fixes: #1820

Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
@skoeva skoeva force-pushed the create-resource-ui branch 6 times, most recently from 6f3ad30 to 88d8c26 Compare September 27, 2024 20:45
Copy link

Backend Code coverage changed from 60.1% to 60.3%. Change: .2% 😃.

Coverage report
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:91:			ServeHTTP				71.4%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:123:			fileExists				100.0%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:133:			copyReplace				63.6%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:157:			baseURLReplace				100.0%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:185:			getOidcCallbackURL			91.7%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:212:			serveWithNoCacheHeader			33.3%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:221:			defaultKubeConfigPersistenceDir		61.5%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:249:			defaultKubeConfigPersistenceFile	75.0%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:262:			addPluginRoutes				54.2%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:310:			createHeadlampHandler			40.3%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:677:			parseClusterAndToken			100.0%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:694:			decodePayload				71.4%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:708:			getExpiryTime				75.0%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:717:			isTokenAboutToExpire			61.5%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:741:			refreshAndCacheNewToken			0.0%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:811:			OIDCTokenRefreshMiddleware		30.8%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:862:			StartHeadlampServer			66.7%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:876:			getHelmHandler				53.8%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:904:			checkHeadlampBackendToken		100.0%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:917:			handleClusterHelm			33.3%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:996:			handleClusterAPI			55.6%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1044:			handleClusterRequests			66.7%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1052:			getClusters				81.8%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1086:			parseCustomNameClusters			38.1%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1140:			parseClusterFromKubeConfig		78.3%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1184:			getConfig				75.0%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1195:			addCluster				55.6%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1305:			deleteCluster				0.0%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1354:			getKubeConfigPath			66.7%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1363:			handleStatelessClusterRename		50.0%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1377:			customNameToExtenstions			45.5%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1410:			updateCustomContextToCache		50.0%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1443:			getPathAndLoadKubeconfig		55.6%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1466:			renameCluster				53.1%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1529:			addClusterSetupRoute			100.0%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1551:			handleNodeDrain				45.5%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1616:			drainNode				37.5%
github.com/headlamp-k8s/headlamp/backend/cmd/headlamp.go:1666:			handleNodeDrainStatus			52.0%
github.com/headlamp-k8s/headlamp/backend/cmd/server.go:13:			main					0.0%
github.com/headlamp-k8s/headlamp/backend/cmd/stateless.go:17:			MarshalCustomObject			60.0%
github.com/headlamp-k8s/headlamp/backend/cmd/stateless.go:42:			setKeyInCache				50.0%
github.com/headlamp-k8s/headlamp/backend/cmd/stateless.go:69:			handleStatelessReq			58.1%
github.com/headlamp-k8s/headlamp/backend/cmd/stateless.go:135:			parseKubeConfig				75.0%
github.com/headlamp-k8s/headlamp/backend/cmd/stateless.go:174:			websocketConnContextKey			100.0%
github.com/headlamp-k8s/headlamp/backend/cmd/stateless.go:224:			getContextKeyForRequest			76.9%
github.com/headlamp-k8s/headlamp/backend/pkg/cache/cache.go:40:			New					100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/cache/cache.go:52:			Set					100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/cache/cache.go:57:			SetWithTTL				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/cache/cache.go:75:			Delete					100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/cache/cache.go:85:			Get					100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/cache/cache.go:102:		GetAll					100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/cache/cache.go:122:		cleanUp					100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/cache/cache.go:140:		UpdateTTL				88.9%
github.com/headlamp-k8s/headlamp/backend/pkg/config/config.go:40:		Validate				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/config/config.go:62:		Parse					74.4%
github.com/headlamp-k8s/headlamp/backend/pkg/config/config.go:149:		flagset					100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/config/config.go:174:		defaultPluginDir			61.5%
github.com/headlamp-k8s/headlamp/backend/pkg/config/config.go:207:		GetDefaultKubeConfigPath		66.7%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/charts.go:27:			listCharts				89.5%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/charts.go:77:			ListCharts				72.7%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/handler.go:35:		NewActionConfig				87.5%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/handler.go:54:		NewHandler				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/handler.go:60:		NewHandlerWithSettings			60.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/handler.go:85:		ToRESTConfig				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/handler.go:89:		ToRawKubeConfigLoader			100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/handler.go:93:		ToDiscoveryClient			83.3%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/handler.go:109:		ToRESTMapper				71.4%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/handler.go:129:		getReleaseStatus			0.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/handler.go:165:		setReleaseStatus			60.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/handler.go:188:		setReleaseStatusSilent			66.7%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:53:		getReleases				57.1%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:112:		ListRelease				68.4%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:158:		GetRelease				0.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:217:		GetReleaseHistory			46.2%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:277:		UninstallRelease			55.6%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:334:		uninstallRelease			71.4%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:357:		Validate				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:362:		RollbackRelease				51.6%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:421:		rollbackRelease				75.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:453:		Validate				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:458:		handleError				0.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:463:		returnResponse				71.4%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:479:		InstallRelease				72.2%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:513:		getChart				35.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:565:		installRelease				60.7%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:625:		Validate				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:630:		UpgradeRelease				60.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:666:		logActionState				75.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:687:		upgradeRelease				63.6%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:731:		Validate				0.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/release.go:749:		GetActionStatus				0.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/repository.go:35:		createFileIfNotThere			100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/repository.go:47:		lockRepositoryFile			87.5%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/repository.go:68:		addRepository				61.8%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/repository.go:131:		AddRepo					72.2%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/repository.go:176:		createFullPath				66.7%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/repository.go:184:		listRepositories			69.2%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/repository.go:213:		ListRepo				58.3%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/repository.go:236:		RemoveRepository			64.0%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/repository.go:279:		RemoveRepo				66.7%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/repository.go:291:		UpdateRepository			68.2%
github.com/headlamp-k8s/headlamp/backend/pkg/helm/repository.go:333:		UpdateRepository			81.8%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/contextStore.go:26:	NewContextStore				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/contextStore.go:35:	AddContext				23.1%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/contextStore.go:64:	GetContexts				85.7%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/contextStore.go:80:	GetContext				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/contextStore.go:90:	RemoveContext				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/contextStore.go:95:	AddContextWithKeyAndTTL			100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/contextStore.go:100:	UpdateTTL				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/file.go:14:		WriteToFile				86.7%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/file.go:48:		RemoveContextFromFile			75.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:61:	DeepCopyObject				0.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:66:	DeepCopy				0.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:86:	Error					0.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:97:	Error					100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:108:	Error					100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:119:	Error					100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:124:	ClientConfig				80.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:158:	RESTConfig				75.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:168:	OidcConfig				0.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:186:	ProxyRequest				83.3%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:200:	ClientSetWithToken			66.7%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:214:	SourceStr				60.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:228:	SetupProxy				91.7%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:253:	AuthType				66.7%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:265:	LoadContextsFromFile			100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:278:	LoadContextsFromBase64String		100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:291:	loadContextsFromData			100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:328:	parseAndValidateConfig			90.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:353:	createContext				90.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:398:	findCluster				82.6%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:447:	findAuthInfo				86.7%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:480:	createAuthProvider			91.7%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:508:	createExecConfig			0.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:539:	createExtensions			30.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:570:	createKubeContext			60.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:615:	LoadContextsFromAPIConfig		76.5%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:654:	LoadContextsFromMultipleFiles		100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:674:	splitKubeConfigPath			75.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:684:	GetInClusterContext			0.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:730:	LoadAndStoreKubeConfigs			88.9%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:749:	makeDNSFriendly				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:758:	SetClusterField				83.3%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:774:	setClusterStringField			60.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:797:	setClusterBoolField			87.5%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:816:	setClusterBase64Data			87.5%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:833:	setClusterExtensions			60.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:846:	SetAuthInfoField			87.5%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:866:	setBase64Data				81.8%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:890:	setStringField				53.8%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:919:	setStringSliceField			80.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:931:	setMapStringStringSliceField		80.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:943:	setExecField				0.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/kubeconfig.go:955:	setAuthProviderField			80.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/watcher.go:16:		LoadAndWatchFiles			80.0%
github.com/headlamp-k8s/headlamp/backend/pkg/kubeconfig/watcher.go:69:		addFilesToWatcher			82.4%
github.com/headlamp-k8s/headlamp/backend/pkg/logger/logger.go:29:		Log					100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/logger/logger.go:36:		log					75.0%
github.com/headlamp-k8s/headlamp/backend/pkg/logger/logger.go:80:		SetLogFunc				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/plugins/plugins.go:27:		Watch					77.8%
github.com/headlamp-k8s/headlamp/backend/pkg/plugins/plugins.go:48:		periodicallyWatchSubfolders		75.0%
github.com/headlamp-k8s/headlamp/backend/pkg/plugins/plugins.go:81:		GeneratePluginPaths			91.7%
github.com/headlamp-k8s/headlamp/backend/pkg/plugins/plugins.go:107:		pluginBasePathListForDir		86.4%
github.com/headlamp-k8s/headlamp/backend/pkg/plugins/plugins.go:155:		HandlePluginEvents			70.0%
github.com/headlamp-k8s/headlamp/backend/pkg/plugins/plugins.go:179:		PopulatePluginsCache			66.7%
github.com/headlamp-k8s/headlamp/backend/pkg/plugins/plugins.go:205:		HandlePluginReload			76.9%
github.com/headlamp-k8s/headlamp/backend/pkg/plugins/plugins.go:236:		Delete					85.7%
github.com/headlamp-k8s/headlamp/backend/pkg/plugins/plugins.go:251:		isSubdirectory				75.0%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/handler.go:46:		Validate				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/handler.go:80:		getFreePort				75.0%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/handler.go:99:		StartPortForward			50.0%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/handler.go:173:	startPortForward			61.4%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/handler.go:269:	checkIfPodIsRunning			71.4%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/handler.go:291:	Validate				100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/handler.go:304:	StopOrDeletePortForward			47.1%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/handler.go:336:	GetPortForwards				45.5%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/handler.go:358:	GetPortForwardByID			45.5%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/store.go:16:		portforwardKeyGenerator			100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/store.go:33:		portforwardstore			75.0%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/store.go:46:		stopOrDeletePortForward			69.2%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/store.go:74:		getPortForwardList			77.8%
github.com/headlamp-k8s/headlamp/backend/pkg/portforward/store.go:94:		getPortForwardByID			100.0%
github.com/headlamp-k8s/headlamp/backend/pkg/utils/utils.go:4:			Contains				100.0%
total:										(statements)				60.3%

Html coverage report download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Issues related to the frontend size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make create/editor dialog work with a given YAML/JSON
5 participants