-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add config tab for Prometheus and multi-cluster support #67
Conversation
f1f5bc1
to
aa99d38
Compare
b7d2590
to
b0b211e
Compare
93f5449
to
c8a4321
Compare
c8a4321
to
5af7fa1
Compare
5af7fa1
to
11f9d5a
Compare
226a42e
to
2c2c237
Compare
b541113
to
49a466c
Compare
49a466c
to
cfd6cc4
Compare
@@ -80,53 +70,69 @@ public function hasBeenSubmitted(): bool | |||
}; | |||
|
|||
$form = (new NotificationsConfigForm()) | |||
->setKConfig($kconfig) | |||
->populate(['cluster_uuid' => $this->getRequest()->get('id')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename id
to cluster_uuid
and retrieve the default value from the session. This ensures that any changes a user makes to the displayed cluster are automatically reflected when working with the config. If the session is empty, we still populate null
so that the form defaults to the first database entry in the cluster table.
} | ||
|
||
Notification::success( | ||
$this->translate('New configuration has successfully been stored.') | ||
); | ||
|
||
$this->redirectNow('__REFRESH__'); | ||
$this->redirectNow(Url::fromPath('kubernetes/config/notifications', ['id' => $clusterUuid])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename id
to cluster_uuid
.
public function prometheusAction() | ||
{ | ||
$form = (new PrometheusConfigForm()) | ||
->populate(['cluster_uuid' => $this->getRequest()->get('id')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename id
to cluster_uuid
and get the default value from the session.
} | ||
|
||
Notification::success($this->translate('New configuration has successfully been stored')); | ||
$this->redirectNow(Url::fromPath('kubernetes/config/prometheus', ['id' => $clusterUuid])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename id
to cluster_uuid
and add a newline before this line.
And please also reword your wip commit. |
cfd6cc4
to
416e890
Compare
416e890
to
0301350
Compare
Add a new config tab for Prometheus. If the config is provided via yaml the data is locked and the form is disabled.